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 gooddomain.com. 2) All other users can receive and send mail from/to any domain. How do I do that? |
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: Code:
:0 For the outgoing, edit /etc/mail/access and use Code:
From:teamA@mydaomain.com REJECT Code:
makemap hash /etc/mail/access < /etc/mail/access |
Thanks bathory. I'll give it a try.
|
All times are GMT -5. The time now is 01:16 AM. |