SMTP — Configure a mail transfer agent (MTA) to accept inbound email from other systems
This is a simple one, by default postfix will accept only mail originating locally, and all it takes is updating a config file to change that.
- Install the necessary packages
- yum install postfix
- Edit the /etc/postfix/main.cf file
- Find the line inet_interfaces = localhost and change it to inet_interfaces = all
- Restart the service
- service postfix restart
- Open the firewall
- iptables -I INPUT -p tcp –dport 25 -j ACCEPT
You should be able to test this by telnetting from a remote computer. If you receive a connection, your good to go.
3 thoughts on “SMTP — Configure a mail transfer agent (MTA) to accept inbound email from other systems”
Isn't it IPTABLES -A INPUT ….
Here you have not specified any line number!!!
IPTABLES -A INPUT will place the rule at the bottom of the INPUT chain
whereas INPUT -I INPUT will place the rule at the top.
you are correct on iptables -I will place it at the top of the chain. However, it is recommended to set your policy to DROP [iptables -P INPUT DROP] and append (-A ) to that policy. By default iptables's policies are set to ACCEPT.