LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-02-2002, 05:17 AM   #1
markng
LQ Newbie
 
Registered: Jan 2002
Posts: 19

Rep: Reputation: 0
How do I auto delete mails from a specific domains/users?


Can any one here tell me how do I set sendmail to automatically delete/reject emails from a specific domain or users?

For example, if I don't wanna receive emails from hotmail.com and loser@accessmedia.com.

I tried putting it in /etc/mail/access but that doesn't seem to work.

Thanks in advance.
 
Old 05-02-2002, 05:34 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
i'd recommend a procmail filter...

~/.procmailrc:

:0
* From:.*hotmail.com
| /dev/null

*should* work, check the procmailrc manpages for more info
 
Old 05-02-2002, 11:11 AM   #3
markng
LQ Newbie
 
Registered: Jan 2002
Posts: 19

Original Poster
Rep: Reputation: 0
Hi acid,

This procmailrc thingy that u're recommending.. does it applies to everyone in the system or just a particular user?

Everyone gets their email from this server using some pop3 client. None telnets into the server to check their email.

Also, regarding the /etc/mail/access file....

After editing the file, I know I'm suppose to enter the makemap hash command. The problem is that I'm seeing two different versions. The database file is access.db

Most sites states : makemap hash /etc/mail/access < /etc/mail/access WHILE some says makemap hash /etc/mail/access.db < /etc/mail/access. The latter does make more sense. Anyway, I've tried both but it doesn't. Mails from domain that I wanna block are still getting through

I just don't understand why its so difficult to do something so simple. Argghh!
 
Old 05-02-2002, 11:20 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
/etc/procmailrc will be applied globally to all mail on reciept, and will directly affect what sendmail recieves before it goes into the /var/spool/mail folders.

access.db is *usually* rebuilt each time sendmail is started, you shuoldn't need to do anythign with it. there's probably a line in the /etc/init.d/sendmail script that does it if you look.

http://www.linuxworld.com/linuxworld...03-geek_1.html
 
Old 05-02-2002, 10:41 PM   #5
markng
LQ Newbie
 
Registered: Jan 2002
Posts: 19

Original Poster
Rep: Reputation: 0
Thanks!

I think it works somehow. Last I tried, it successfully discarded all mails from hotmail.com..

The link u included was very useful.

Once again, thanks a million!
 
  


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
Blocking mails from specific email addresses/domains in postfix jomy Linux - Networking 1 07-15-2008 08:32 PM
How to make a specific command(s) work for specific users or group only naren_0101bits Linux - General 3 08-28-2005 05:22 PM
How to make postfix send mails for virtual domains? Chowroc Linux - Networking 0 12-24-2004 04:39 AM
auto delete old mails in sendmail - Pls Help maharajg Linux - Networking 3 11-10-2004 11:21 AM
Cannot receive mails from certain domains/sites Fluffybunny Linux - General 0 09-13-2002 08:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:27 PM.

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