0

In my postfix configuration, I've switched on smtpd_client_restrictions = reject_unknown_client_hostname as an anti-spam measure.

However, sometimes I fall foul of this myself when I make an authenticated SMTP connection to the server from remote hosts that don't have reverse DNS. My attempt to send an email gets rejected.

Is there any way to ignore smtpd_client_restrictions = reject_unknown_client_hostname in the case of an authenticated client?

2

To not restrict authenticated clients by the reject_unknown_client_hostname restrictions you can simply place the permit_sasl_authenticated directive before it. See http://www.postfix.org/postconf.5.html#permit_sasl_authenticated

Example:

smtpd_client_restrictions = 
    permit_sasl_authenticated,
    reject_unknown_client_hostname

Maybe you want to also permit "mynetworks".

Tip: in addition you can also use the reject_non_fqdn_helo_hostname and reject_unknown_helo_hostname restriction within the smtpd_helo_restrictions to minimize spam. But same as above, place permit_sasl_authenticated before it to not restrict your authenticated clients.

Example:

smtpd_helo_restrictions =
    permit_sasl_authenticated
    reject_non_fqdn_helo_hostname
    reject_unknown_helo_hostname
1

You just need to permit authenticated clients, for instance:

smtpd_client_restrictions = 
        permit_sasl_authenticated,
        reject_unknown_client_hostname,
        #...the rest of them,
        permit

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.