Category: PostFix

Configure postfix to use Sendgrid as default Relay

Configure postfix to use Sendgrid as default Relay

If you would like to configure postfix to use Sendgrid as the mail relay, you can do so by editing the postfix main configuration file. vi /etc/postfix/main.cf And then paste the content below at...

Postfix Queue Management

Postfix Queue Management

Retry delivery of mail in queue : postqueue -f Flush mail for a domain to primary mail server from Relay server: postqueue -s domain.com Delete all email in queue for a domain: postqueue -p...

Postfix – Sender address rejected: User unknown in virtual mailbox table

Postfix – Sender address rejected: User unknown in virtual mailbox table

Sometimes you may want to be able to send  email from non existent email addresses on your own networks for notification purposes, you may get error ‚ÄúSender address rejected: User unknown in virtual mailbox...

Postfix Spam Control

Postfix Spam Control

Reject / Discard / Redirect emails based on header checks : vi /etc/postfix/main.cf header_checks = regexp:/etc/postfix/header_checks vi /etc/postfix/header_checks /^From: "Mechanic/ REJECT /^To: someone@example.com/ REDIRECT someone@example2.com /^To: bademail@example.com/ REJECT /^Subject: .*badWord/ DISCARD Reject By Subnet...