0

Can I configure Postfix or Sendmail to allow all IP's without authentication? I understand that this could lead to all sorts of abuse. We have some monitoring systems that send notifications out via an SMTP server but it doesn't support authentication so I plan on telling the firewall to allow only that IP to connect.

Thanks

3
  • What is the IP address(es) of your MTA? Aug 12, 2014 at 0:28
  • nice try to get the address of an open relay. ;)
    – deagh
    Aug 13, 2014 at 10:55
  • Yeahhhh... I wasn't falling for that one ;)
    – Doyley
    Aug 14, 2014 at 12:13

2 Answers 2

3

Don't open postfix for everyone.

You can allow relay access to one address (or network) with the following line in your main.cf

mynetworks = 127.0.0.0/8, xxx.xxx.xxx.xxx/yy

xxx.xxx.xxx.xxx => the address you want to permit yy => the netmask of your host (or network)

1
  • Thanks for this. It turns out I was having issues testing due to AWS blocking some outgoing ports, but this would have done what I asked.
    – Doyley
    Aug 14, 2014 at 12:14
2

You can configure specific ip-adresses to use your postfix or sendmail installation as an outgoing SMTP server or relay host without SMTP authentication, which is much better idea.

In sendmail that is configured with the access map, typically /etc/mail/access:

Connect:127.0.0.1         RELAY
Connect:10.9.8.7          RELAY
Connect:192.168.1         RELAY

Which allows relaying for localhost (the default), the IP-addres 10.9.8.7 and the 192.168.1.0/24 subnet.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .