LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Sendmail block email to particular user on same domain (http://www.linuxquestions.org/questions/slackware-14/sendmail-block-email-to-particular-user-on-same-domain-676596/)

CEdstrom 10-15-2008 02:52 PM

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.

rholder 10-15-2008 04:02 PM

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

bathory 10-15-2008 04:50 PM

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

rholder 10-15-2008 05:16 PM

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)

CEdstrom 10-16-2008 11:27 AM

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.


All times are GMT -5. The time now is 02:16 AM.