LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
LinkBack Search this Thread
Old 12-13-2006, 09:16 AM   #1
clpl1980
Member
 
Registered: Dec 2006
Posts: 32

Rep: Reputation: 15
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!
 
Old 12-14-2006, 01:24 AM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,614

Rep: Reputation: 164Reputation: 164
You can create a file called recipient_access (the name doesn't matter) containing:
Code:
uucp@    REJECT
mail@    REJECT
Then, postmap it:
Code:
 postmap /etc/postfix/recipient_access
And, finally, in main.cf:
Code:
smtpd_recipient_restriction =
  permit_mynetworks
  check_recipient_access hash:/etc/postfix/recipient_access
  reject_unauth_destination
This will still allow anyone in $mynetworks to send mail to those addresses. If you don't want even that, put
check_recipient_access above permit_mynetworks.
 
Old 12-14-2006, 08:07 AM   #3
clpl1980
Member
 
Registered: Dec 2006
Posts: 32

Original Poster
Rep: Reputation: 15
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!
 
Old 12-14-2006, 06:17 PM   #4
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,614

Rep: Reputation: 164Reputation: 164
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).
 
Old 12-15-2006, 02:31 AM   #5
clpl1980
Member
 
Registered: Dec 2006
Posts: 32

Original Poster
Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix unable to deliver mail because user@virtualdomain becomes user@hostname azrael808 Linux - Networking 0 04-29-2006 12:35 PM
User Management netwalker1 Linux - Software 2 12-07-2004 01:38 AM
user management newuser455 General 2 10-21-2004 08:38 PM
help with user management... dawn_angel Linux - Distributions 0 08-18-2004 11:30 PM
Postfix email user & linux user question. hct224 Linux - Newbie 0 11-29-2003 11:24 PM


All times are GMT -5. The time now is 01:12 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration