View Full Version : Sendmail rejection works.... sometimes.

02-09-2004, 12:15 AM
Ive got sendmails access db set up to reject mail to my most heavyly spamed e-mail address. It works good, my spam is about half what it was before.
But, for some reason a few still get through to that e-mail address. Ive gotten five e-mails to the rejected address. No Cc's or multiple addresses are present.
I am using "spamedaddress@mydomain.com 550 Mail account disabled"

How is it possible for this mail to get around sendmails rejection?

02-09-2004, 01:52 AM
I've got an increasing amount of mail that comes to two or three addresses at once. So it may be To: badmail@domain.com and CC: okmail@domain.com

So one is rejected, one accepted and unless I look real close at the headers, it appears to have come to the bad mail address.

02-09-2004, 01:35 PM
Yeah, Ive gotten a few of those with CC's and/or multiple addresses. I understand that. Ive tested it throughly.
The messages in question have no CC's and seem to be to only one address. They seem to have gotten past the rejection somehow.

02-09-2004, 08:06 PM
Ok, I think I know why now. Jalal was right.
I just got another one of those e-mails. Here are the relevant parts of the header (edited)....

Received: ....by mydomain.com for <mydomain@mydomain.com>....
From: "Wyatt Justice" <spammer@spam.com>
Reply-To: "Wyatt Justice" <spammer@spam.com>
To: Mae <rejected@mydomain.com>

If I add "To: rejected@mydomain.com REJECT" to the access.db will that take care of messages like these?

I should not doubt the wisdom of jalal.

02-10-2004, 01:42 AM
I'm not sure if that will work. I get lots of spam to falsified To: addresses so I don't think that sendmail evens sees the To: address.

From the excerpt above it seems to be getting delivered to mydomain@mydomain.com despite having a different To: address.

If all else fails you can turn on mail logging and see if that gives you any further information.

02-10-2004, 03:27 PM
You could use Procmail to check the Received header for one address (the "real" one or the one that the mail is being delivered to), and then check the To: header to see if it is a false address - if both conditions are satisfied, delete the mail. I do something similar: like jalal, I also get Spam To: account@domain and CC: anotheraccount@domain - I use Procmail to check if this is the case, and if it is, I know it is Spam and I /dev/null it...

02-11-2004, 09:50 PM
I thought about doing that with procmail, but I would rather reject it with sendmail. Ive also looked for a procmail recipie for comparing received-for and to: header info.

Has anyone tried using sendmail to reject mail that is sent directly to domain@domain.com?

If my e-mail program was using domain@domain.com to send mail, it might be a problem.
However, my ISP will not let me use my outgoing SMTP mail server. So, I send mail via their server and can set up my e-mail as whatever@domain.com.

02-12-2004, 07:31 AM
Has anyone tried using sendmail to reject mail that is sent directly to domain@domain.com?

But doesn't all mail end up there at some point? I guess that is only if you use Aliases. If you have other full e-mail accounts setup maybe that would work.

03-31-2004, 02:25 PM
What is sendmail?

03-31-2004, 04:23 PM
Have a look at http://www.sendmail.org/email-explained.html

Basically, Sendmail handles mail on your account (incoming and outgoing). It's the program that receives connections from other mail servers to transfer/download mail that has been sent to you (and to make similar outgoing connections for you when you send mail).