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.
Please find the master.cf and main.cf files, and make the configurations as are present in these files
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.
Restart the postfix service
Run the following command the restart postfix service
sudo systemctl restart postfix
Steps to send mail using Postfix:
- Type command- mail xyz.gmail.com (Press Enter)
- Enter Subject (Press Enter)
- Type the entire mail body (Press Enter)
- To end the mail type command- . (Press Enter)
- Type command- mail xyz.gmail.com (Press Enter)
- Enter Subject (Press Enter)
- Type the entire mail body (Press Enter)
- To end the mail type command- . (Press Enter)
Comments
Post a Comment