I have recently found out the beuty of restriction classes.
So to reject senders from certain sites that usually misspell their sender
address I have set up the following:


smtpd_restriction_classes = verify_client_sender
verify_client_sender = reject_unverified_sender, permit

smtpd_client_restrictions =
        check_client_access hash:/etc/postfix/client-access,
        check_client_access pcre:/etc/postfix/client-pcre-access,
        permit_mynetworks,
        permit_sasl_authenticated,
        permit

client-access looks like this:
hostname_of_misspelled sender_1      verify_client_sender
hostname_of_misspelled sender_2      verify_client_sender
bla bla bla other hosts i dislike


It works!
But the sender(roundcube webmail) gets the errormessage "450 could not add
recipient"
It is not the recipientaddress that postfix blocks the email on, it is the
senderaddress.
Can I give a better errormessage to the users that insists on changing
their senderaddresses, explaining why the email is rejected?



Reply via email to