LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-15-2008, 02:52 PM   #1
CEdstrom
LQ Newbie
 
Registered: Sep 2003
Location: Wisconsin
Distribution: Slackware
Posts: 27

Rep: Reputation: 15
Wink Sendmail block email to particular user on same domain


I have been searching around the net for a few weeks looking for a solution that would avoid deleting a user account on my Slackware 10.1 box. Its running sendmail 8.9, I believe.

My email address has been passed around more than a 40 year old h*****. Thanks to freinds and family, I now get some 100 spams a day, and thats the ones that don't get caught by Spamcop. I don't use the account for emails any longer so I want to stop getting all external emails. And if necessary, stop getting any emails period.

There would be a lot of work to setup a new id for myself with some of the webserver settings I have streamlined. The simplest solution would be to delete my account but I am trying to avoid that.

I have tried to use the sendmail access file to reject everthing for the user, but it seems that because the id is part of the same domain for sendmail, it ignores the access file completely and continues to send email.

So my simple questions is; can sendmail be setup to halt or block all email for a particular user who is in the domain served by sendmail?

I'm sure the answer won't be simple so thanks to anyone who replies.
 
Old 10-15-2008, 04:02 PM   #2
rholder
LQ Newbie
 
Registered: Aug 2002
Location: Sydney
Distribution: CentOS
Posts: 15

Rep: Reputation: 0
Reject mail for user.

Try editing this file:
/etc/mail/virtusertable (This file may be in a different location on your distro.)

With this entry:
user@domain error:nouser

Restart sendmail after editing.

This should block just "user@domain" and no the rest. I have used it for the same purpose you are describing for customers who get WAY too much spam.

Regards
 
Old 10-15-2008, 04:50 PM   #3
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,905

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Quote:
Try editing this file:
/etc/mail/virtusertable (This file may be in a different location on your distro.)
After that you should run:
Code:
makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable
Another quick (and dirty) way is to edit /etc/mail/aliases, add an entry:
Code:
user: /dev/null
and run:
Code:
newaliases
 
Old 10-15-2008, 05:16 PM   #4
rholder
LQ Newbie
 
Registered: Aug 2002
Location: Sydney
Distribution: CentOS
Posts: 15

Rep: Reputation: 0
Thanks

Thanks for adding to my post. Guess I should resist the urge to offer suggestions before my first cup of coffee.

By the way, to make things easier over all, I just use Webmin. (http://www.webmin.com)
 
Old 10-16-2008, 11:27 AM   #5
CEdstrom
LQ Newbie
 
Registered: Sep 2003
Location: Wisconsin
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: 15
Ok at first it didn't work until I realized I had to add the feature to the .cf file. And then correct a typo. That now returns an error to any sending to that email. Fantastic.

Thanks.

Last edited by CEdstrom; 10-16-2008 at 11:39 AM.
 
  


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
How would I block sending to specific email addresses using Sendmail? PhntmArcher Linux - Newbie 1 08-31-2008 04:53 PM
Configuring sendmail to allow SMTP traffic from my IP, domain, or email address hlslaughter Linux - Software 0 03-29-2007 02:19 PM
deleted user accont in sendmail how do i block incoming mail slack66 Linux - Security 2 11-18-2003 01:16 AM
cant send email (using sendmail) to newly added domain user sirjosi Linux - Newbie 0 10-22-2003 01:12 AM
how to refuse to send email to some domain with sendmail? lzyking Linux - Software 3 09-16-2003 08:21 AM


All times are GMT -5. The time now is 09:09 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