User management in postfix
Dear Sirs,
I have a server with Fedora Core 5 installed and Postfix as MTA. In the system I have regular "human" users and some "virtual" users (the ones created by the system, for instance clamav, amavis, cups). I have a problem: when someone sends mail to "virtual" users, I can see it stored in the user's file inside /var/mail. I receive mail for uucp@myserver.com and mail@myserver.com which are not regular "human" users. I want not to receive mail for "virual" (system) users: how can I tell postfix not to deliver these messages? Thank you for your help! |
You can create a file called recipient_access (the name doesn't matter) containing:
Code:
uucp@ REJECT Code:
postmap /etc/postfix/recipient_access Code:
smtpd_recipient_restriction = check_recipient_access above permit_mynetworks. |
Thank you, that worked great!
But is there a way not to specify each single virtual user? I mean: how can I tell postfix to deliver mail ONLY to human users? (the users created by the system administrator) Thanx again! |
Unless you're using something like ldap or an sql database, there's no way to eliminate those users besides listing all the ones you want or all the ones you don't want. When querying ldap/sql postfix uses custom queries, which could check, for example, only against those users whose uid is greater than 100. This makes for an elegant way to exclude system users such as uucp from being valid recipients. But, by default, postfix only does a simple check against the passwd and alias databases (see postconf(5) under local_recipient_maps).
|
Perfect.
I told Postfix to refer only to aliases and for user names I inserted a recursive alias, for example: user: user to deliver mail to user@myserver.com Thank you very much |
All times are GMT -5. The time now is 03:32 PM. |