Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 05-04-2010, 02:00 AM   #1
LQ Newbie
Registered: May 2010
Posts: 12

Rep: Reputation: 0
Sendmail access.db question

Hello. I've got a request from one of my company's subsidiaries to block all incoming and outgoing mail for a group of users. I've read up some guides on access.db and I know how to do that, but now they want to allow these users to receive emails from a few select domains, and block the rest.

To summarize:

1) Block all incoming and outgoing email to users in team A, except mail from
2) All other users can receive and send mail from/to any domain.

How do I do that?
Old 05-04-2010, 07:15 AM   #2
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,479

Rep: Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481
Hi and welcome to LQ

For the incoming you'll need procmail, that comes with most distros. Create or edit /etc/procmailrc (if teamA has a homedir it's better to use ~/.procmailrc) and use the following:
* ! ^From:.*
If you use ~/.procmailrc the line "To: ..." is not needed

For the outgoing, edit /etc/mail/access and use
The run
makemap hash /etc/mail/access < /etc/mail/access

Last edited by bathory; 05-04-2010 at 09:19 AM.
1 members found this post helpful.
Old 05-05-2010, 03:15 AM   #3
LQ Newbie
Registered: May 2010
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks bathory. I'll give it a try.


access, sendmail

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
Sendmail config questions + Sendmail not reflecting changes to access db wbuik Linux - Networking 2 03-26-2009 05:02 AM
Sendmail access/configuration question NWBM Linux - Newbie 2 09-20-2008 07:24 AM
About sendmail access.db shipon_97 Linux - Networking 1 08-30-2006 12:31 AM
Sendmail /etc/mail/access issue (access.db) CactusS4 Linux - General 0 05-22-2004 07:59 PM
sendmail access db question jayjoboo Linux - Networking 0 05-23-2002 09:44 AM

All times are GMT -5. The time now is 05:44 PM.

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