LinuxQuestions.org
Help answer threads with 0 replies.
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
  Search this Thread
Old 12-13-2006, 10: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, 02:24 AM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
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, 09: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, 07:17 PM   #4
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
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, 03: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



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 01:35 PM
User Management netwalker1 Linux - Software 2 12-07-2004 02:38 AM
user management newuser455 General 2 10-21-2004 09:38 PM
help with user management... dawn_angel Linux - Distributions 0 08-19-2004 12:30 AM
Postfix email user & linux user question. hct224 Linux - Newbie 0 11-30-2003 12:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 06:17 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration