Home > computers > mail > postfix > postfixcheckclientaccess | About
Home > Computers > mail > MailWhitelisting > postfixcheckclientaccess | About

The IP is part of the client, it is not bound to a specific sender. For this reason, you want to use smtpd_client_restrictions instead of smtpd_sender_restrictions. As a restriction, you can check for client access permissions with check_client_access, like so (in main.cf) :

smtpd_client_restrictions = check_client_access hash:/etc/postfix/maps/whitelist_senders

The whitelisting is done by using a simple trick : you ask postfix to reinject the mail into postfix instead of relaying it to amavis (or any other content filter that you may have set). For this, use the FILTER action in your map, like this :

some ip FILTER smtp:[]:10025

This tells postfix to relay the mail to a mail filter which is listening on port 10025 on host, which is postfix itself. That port is usually used by the content filters to reinject mails back to postfix once they're done processing the incoming mails. Without this trick, the mail would go to amavis.

src : https://serverfault.com/questions/151320/amavis-new-whitelist

contact : @ychaouche yacinechaouche at yahoocom

QR Code
QR Code postfixcheckclientaccess (generated for current page)