I'm trying to disable Postfix error email notifications. I do not want to receive notification emails whenever a "User is unknown in virtual mailbox table".
I still want to receive bounce notifications.
main.cf :
notify_classes = bounce
bounce_notice_recipient = bounce@example.com
After restarting Postfix, I'm still receiving these emails
(sent to postmaster – not bounce).
Any ideas how to fix this? I'm receiving a lot of notification emails from spammers sending emails to non-existent addresses.
Postfix SMTP server: errors from example.com[11.22.33.44]
Transcript of session follows.
Out: 220 example.com ESMTP Postfix (3.2.0)
In: EHLO whatever.com
Out: 250-example.com
Out: 250-PIPELINING
Out: 250-SIZE 50000000
Out: 250-ETRN
Out: 250-STARTTLS
Out: 250-ENHANCEDSTATUSCODES
Out: 250-8BITMIME
Out: 250-DSN
Out: 250 SMTPUTF8
In: STARTTLS
Out: 220 2.0.0 Ready to start TLS
In: EHLO whatever.com
Out: 250-example.com
Out: 250-PIPELINING
Out: 250-SIZE 50000000
Out: 250-ETRN
Out: 250-AUTH PLAIN DIGEST-MD5 LOGIN
Out: 250-AUTH=PLAIN DIGEST-MD5 LOGIN
Out: 250-ENHANCEDSTATUSCODES
Out: 250-8BITMIME
Out: 250-DSN
Out: 250 SMTPUTF8
In: MAIL FROM:<spammer@spam.com> SIZE=2110
Out: 250 2.1.0 Ok
In: RCPT TO:<asdfasdf@example.com>
Out: 550 5.1.1 <asdfasdf@example.com>: Recipient address rejected: User
unknown in virtual mailbox table
In: RSET
Out: 250 2.0.0 Ok
In: QUIT
Out: 221 2.0.0 Bye
Best Answer
I solved the issue by adding this line to main.cf :
error_notice_recipient = blackhole@localhost
Then adding this line to /etc/aliases :
blackhole: /dev/null
Do not use this solution if your "notify_classes" line contains either policy, resource, software or protocol.