Postfix - Reject incoming email for specific user
Hi Folks,
while using ISPconfig for quite a long time i was confronted with the fact of growing files within the /var/spool/mail directory.
I think this happens because postfix accepts mail for every system user which is the normal behaviour?!
So even when postfix is configured to accept mail only for "valid email users" that are mapped via virtusertable to "real system users", emails for the Linux "default users" like nobody uucp or mail are accepted and delivered.
One solution to this is to reject those unwanted mails using smtpd_recipient_restrictions defined within main.cf.
Adding there "check_recipient_access hash:/etc/postfix/denied_recipients" before the "permit_mynetworks" statement allows you to reject those unwanted mails.
After adding them to this file (one address per line) in the form of
uucp@mydomain.tld REJECT recipient rejected
don´t forget to run
postsuper /etc/postfix/denied_recipients
and restart postfix.
On my systems i am using Debian Etch and perhaps there are other ways to achieve this, but for me it did the trick.
Last edited by richi; 17th February 2009 at 23:14.
|
Recent comments
7 hours 58 min ago
13 hours 3 min ago
17 hours 27 min ago
19 hours 16 min ago
1 day 9 hours ago
1 day 9 hours ago
1 day 14 hours ago
1 day 21 hours ago
1 day 22 hours ago
1 day 23 hours ago