Installation of SMTP server

The Postfix configuration procedure is as below:

The configuration files main-cf and master-cf are found in /etc/postfix folder. We can find where these files are located as shown below.

main and master location

Please find the master.cf and main.cf files, and make the configurations as are present in these files

main-cf   master-cf

By default, Postfix will forward mail from clients in authorized network blocks to any destination. Authorized networks are defined with the mynetworks configuration parameter. Many Virtual Machines can be relayed to an SMTP Server. For that the private IP’s of these VMs need to be specified in the mynetworks configuration parameter in main.cf file. In main.cf file edit the mynetworks parameter with the list of IPs of the VMs that uses the SMTP Server as a mailing Server. Specify the IP address of the machine in CIDR (network/mask) notation or simply specify your virtual machines ip.

main

Restart the postfix service

Run the following command the restart postfix service

sudo systemctl restart postfix

Steps to send mail using Postfix:

    1. Type command- mail xyz.gmail.com (Press Enter)
    2. Enter Subject (Press Enter)
    3. Type the entire mail body (Press Enter)
    4. To end the mail type command- . (Press Enter)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s