In postfix, how could I disable incoming mail?
You can use the inet_interfaces
directive in /etc/postfix/main.cf
to control what address Postfix listens on for incoming connections. If you set it to the following it will only listen on the loopback interface, which means that connections can only originate from that machine.
inet_interfaces = loopback-only
You can disable incoming SMTP by editing master.cf
, just comment out the smtp
and submission
services. This will tell postfix not to spawn an smtpd
process, which would listen on port 25 (587 for submission) for incoming SMTP connections.