Hi, I've a web server running multiple PHP sites. I only need to send emails for subscriptions or other site related stuff. This server doesn't get any incoming mail. I use Postfix on Debian. Now my SMTP port (25) is open. And I get lots of relay attempts. Is it possible to configure postfix for only sending emails? I want to close port 25 and get rid off relay attempts but I'm not sure sending mail will be possible that way.
Code: postconf -e inet_interfaces=loopback-only then restart postfix .. Port 25 will still be open, but only on the loopback interface, so your php scripts can still use it to poke mails in the queue.
Does this affect the receving of bounce messages? Say if Return-Path is the same as your sending domain?
no, because mydestinations will be containing localhost, hostname (and mostlikely also your domain.tld) .. the machine will handle those mails as local mail.
interesting, say the hostname is mymda.com, all mails can go out internally (eg [email protected]) and receive [email protected] for bounce messages, but does not receive mail on [email protected]?