I freely admit to knowing very little about this so I hope I can explain it clearly.
For my own purposes I use my catchall account and use aliases to direct mail to specific mailboxes, some aliases I direct to /dev/null when I am done with them.

Somehow they occasionally manage to get through.
After a little research I decided to try and use my sendmail reject file (on my control panel) to block these addresses. There is some anomaly though and I am stumped.
If I send an email to one of the blocked addresses then I get a delivery status failure as expected, so I know I at least have that much right.

line in access file:

thisuser@thisdomain.com REJECT

and the error:

(reason: 550 5.2.1 <thisuser@thisdomain.com>... Mailbox disabled for this recipient)

Somehow they are able to sneak through from time to time, I believe it has something to do with a message being delivered to multiple recipients during a single transmission based on the following.


Return-Path: <catheryn_xiaoky@ilisa.com>
Received: from mail.thisdomain.com (root@localhost)
by thisdomain.com (8.12.10/8.12.10) with ESMTP id n2M40wB8015735;
Sat, 21 Mar 2009 23:00:58 -0500
X-ClientAddr: 70.18.153.83
Received: from atsrhuic (pool-70-18-153-83.norf.east.verizon.net [70.18.153.83])
by mail.thisdomain.com (8.12.10/8.12.10) with ESMTP id n2M40qdq015727;
Sat, 21 Mar 2009 23:00:54 -0500
Message-ID: <1237687227.1996@ilisa.com>
X-Sender: <catheryn_xiaoky@ilisa.com>
Date: Sat, 21 Mar 2009 19:00:27 -0700
Reply-To: "Catheryn Xiao" <catheryn_xiaoky@ilisa.com>
From: "Catheryn Xiao" <catheryn_xiaoky@ilisa.com>
Sender: <catheryn_xiaoky@ilisa.com>
To: <thisuser@thisdomain.com>


Where thisuser@thisdomain.com is the user mentioned above that I get a failure report for. The peculiar thing is that the message will get delivered to more than 1 mailbox (this is NOT because I have any kind of alias that does this) EVERYTHING in the 2 headers is identical even the To: field.

In digging around trying to find the answer for myself I think that this is somehow related to the sendmail.cf file in the address rewriting section (I can not even begin to understand what is going on there) that maybe it has something to do with multiple recipients for the message but leaving the To: Field in it's original state.

I would like for the connection to be killed, the mail refused or sent to /dev/null if certain addresses are involved.

Maybe this has something to do with CC/BCC or undisclosed recipients?

I'm at a loss here and hope this was clear enough for a sendmail guru to understand.

Thanks,
John