It is the simple mail transfer agent which is
frequently used for mail exchange service in Linux machines. Due to having use
of directory it is quite easy for all administrators to handle it. Postfix has
built-in many layers of security.
Important
Notes
-> Main.cf
file located in /etc/postfix/main.cf need to be edited.
-> Mail box
which we are going to include in main.cf file will receive all the mails.
Configuration Steps
First, we
need to install postfix by following command.
#yum install -y postfix
Go to /etc/postfix
folder and edit main.cf file with
your desire editor.
Here are few changes which need to be done
in that file.
option
|
Function
|
mydomain
|
Host which will be sending mail
|
myorigin
|
Host will be set to sending host.
|
home_mailbox
|
Mails will be delivered in this folder.
|
mynetwork
|
Network path has to be set as per your need.
|
inet_interfaces
|
Set interface to read all of the incoming mails
coming to home mailbox directory.
|
main.cf File Configuration
main.cf File Configuration |
After the
editing of main.cf file we need to create two users in the server to send and
receive the mail. To create user and to add password commands are showing
below.
#useradd postfix_test1
#passwd postfix_test1
#useradd postfix_test2
#passwd postfix_test2
Adding Usernames and Passwords |
Scenario
: Here
We will send mail from postfix_test1 user to postfix_test2 user through NetCat. If you do not have net cat
installed in your system, then install it through following command.
#yum instll -y nc
This
command will download and install nc
in your CentOS server.
Sending
mail from postfix_test1 to postfix_test2 user.
Now we will
be checking this mail by going into postfix_test2 user account which will be
lying into home folder.
Location : /home/postfix_test2
Now we will
send one mail from postfix_test2@chintangurjar.com to postfix_test1@chintangurjar.com using Outlook Express
in client machine windows XP. But
before that we need to configure postfix_test2@chintangurjar.com email account to outlook
express so that it can be able to send mail to postfix_test1@chintangurjar.com Here is the postfix_test2@chintangurjar.com email’s configuration part
in outlook.
If you are
facing connection problem or any kind of configuration problem, then you need
to check below things:
-> Check
you DHCP server is running and assigning IP to client XP machine. (Highly
Recommended)
->Your postfix server should be restarted after outlook
configuration.
->
Make sure your dovecot(IMAP) service should be run.
We need to
set certain things to work outlook without any errors.
->Mail
Account : mail.chintangurjar.com
->Name :
Postfix Test 2 ( You can give any name here)
->E-Mail
Address : postfix_test2@chintangurjar.com
Below
figure shows the configuration part of above three things. We can go to Tools-> account and then We need to
click on add to bring this dialog box properties.
After this
we need to set properties for our servers which incoming outgoing server we are
going to use and the credentials of user lying into the server.
-> My Incoming
mail server : POP3
->Incoming
mail (POP3): Your Default Gateway
-> Outgoing
Mail (SMTP): Your Default Gateway
->Account
Name: your server userid
->Password :
your user’s password
Below
figure shows the configuration part of server of my demonstration.
Once you
have done this, click on Send and
Receive all or press ctrl+m.
Outlook will be connect to the server machine and will open the email account
of postfix_test2@chintangurjar.com within it. Sending mail
from postfix_test1@chintangurjar.com to postfix_test2@chintangurjar.com.
Now
we will check this mail in our CentOS server.
For that we need to go to the /home/postfix_test1/chintan_inbox/new
folder as we have done this previously. It will give us a mail with its header.
Header contains so much information about mail such as from which ID it came,
on which date and time, To whom it was delivered and what was the return path
etc.
Thus whole
postfix task can be accomplished. Now we will move forward to our last part
which is openvpn.
No comments:
Post a Comment