Restrict or block Postfix Sender address

This article describes how to configure Postfix to restrict mails from a specific sender or domain. Firstly edit your /etc/postfix/main.cf file, and add the following: smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access Next create the file /etc/postfix/sender_access, below is an example: janedoe@acme.local REJECTjohndoe@acme.com OKacme.com REJECT Now you need to create a hash file: sudo…

Continue reading

Useful Postfix Commands

Below are a list of useful commands for managing a postfix mail server: mailq – Use to list items in your mails queues postcat -q MESSAGE_ID – Used to read messages that are in your postfix queue postsuper -d ALL – Delete all queued messages postsuper -d ALL deferred –…

Continue reading