On 22.07.2014 08:17, Nicolás wrote: > Having this configuration, anyone using my mail server as the relayhost > is able to send mails to the domains that I handle (not outside), even > without SASL. I guess that behavior is determined by > 'defer_unauth_destination', however, my aim is to specifically allow > certain IPs to use my mail server as relayhost, otherwise reject the > requests. > > I tried putting a 'reject' line after 'defer_unauth_destination' and > although it seemed to achieve the desired effect, this would block any > incoming e-mails from any sender, logically. > > So, here goes the question: Is there a way to only whitelist certain IPs > to use this server as the relayhost and reject anyone else but without > affecting incoming e-mails?
Sorry, I’m failing to understand what you want exactly. When you say “allow certain IPs to use my mail server as relayhost, otherwise reject the request”, does that include rejecting to relay to your *own* domains? If so, what do you mean by “incoming e-mails”? If not, permit_mynetworks might indeed be what you’re looking for. regards, jwi