HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Tips/Tricks/Mods (http://www.howtoforge.com/forums/forumdisplay.php?f=19)
-   -   Postfix - Reject incoming email for specific user (http://www.howtoforge.com/forums/showthread.php?t=31433)

richi 17th February 2009 20:43

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.

till 18th February 2009 09:54

Quote:

I think this happens because postfix accepts mail for every system user which is the normal behaviour?!
If you dont wabt this behaviour, change the email style from sendmail to postfix in the config.inc.php file and then change a email user in ispconfig to update the config files.

richi 19th February 2009 13:43

Thanks for the Info, but since the "sendmail style" is the default for ISPconfig i would have to change this with every update of the Software. So the other solution keeps working after the update without additional configuration, or do i miss something here?

till 19th February 2009 15:26

ISPConfig remembers its config settings ;)


All times are GMT +2. The time now is 21:17.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.