Help configuring a blackhole

Help configuring a blackhole

am 09.10.2007 22:53:12 von phillip.corchary

Can anyone point me to a guide on setting up a blackhole in sendmail.
My environment is that many app servers use several clustered (HW LB)
sendmail servers as a SmartHost for outbound relay. I do NOT have to
worry about inbound mail in this config.

I would like to be able to configure so that ALL OUTBOUND email for
particular addresses (e.g. foo@bar.net) are discarded immediately
(with log written). Currently emails for some bogus addresses are
filling my queues from time-to-time, and since the addresses can
change, I need to implement this in mail relay, not in app.

I've tried reading some chapters in the Sendmail book, and honestly
I'm more confused now than before about implementing a blackhole as I
described below ... I'm hoping someone has a cookbook or cheat-sheet
that can get me started down the path .... :-)

Thanks. phil

Re: Help configuring a blackhole

am 10.10.2007 06:48:26 von Bill Cole

In article <1191963192.680851.212320@r29g2000hsg.googlegroups.com>,
Phil wrote:

> Can anyone point me to a guide on setting up a blackhole in sendmail.
> My environment is that many app servers use several clustered (HW LB)
> sendmail servers as a SmartHost for outbound relay. I do NOT have to
> worry about inbound mail in this config.
>
> I would like to be able to configure so that ALL OUTBOUND email for
> particular addresses (e.g. foo@bar.net) are discarded immediately
> (with log written). Currently emails for some bogus addresses are
> filling my queues from time-to-time, and since the addresses can
> change, I need to implement this in mail relay, not in app.
>
> I've tried reading some chapters in the Sendmail book, and honestly
> I'm more confused now than before about implementing a blackhole as I
> described below ... I'm hoping someone has a cookbook or cheat-sheet
> that can get me started down the path .... :-)

Use the DISCARD feature of the access map:

To:foo@bar.net DISCARD

--
Now where did I hide that website...

Re: Help configuring a blackhole

am 10.10.2007 08:31:47 von Kees Theunissen

Bill Cole wrote:
> In article <1191963192.680851.212320@r29g2000hsg.googlegroups.com>,
> Phil wrote:
>
>> Can anyone point me to a guide on setting up a blackhole in sendmail.
>> My environment is that many app servers use several clustered (HW LB)
>> sendmail servers as a SmartHost for outbound relay. I do NOT have to
>> worry about inbound mail in this config.
>>
>> I would like to be able to configure so that ALL OUTBOUND email for
>> particular addresses (e.g. foo@bar.net) are discarded immediately
>> (with log written). Currently emails for some bogus addresses are
>> filling my queues from time-to-time, and since the addresses can
>> change, I need to implement this in mail relay, not in app.
>>
>> I've tried reading some chapters in the Sendmail book, and honestly
>> I'm more confused now than before about implementing a blackhole as I
>> described below ... I'm hoping someone has a cookbook or cheat-sheet
>> that can get me started down the path .... :-)
>
> Use the DISCARD feature of the access map:
>
> To:foo@bar.net DISCARD
>

Or REJECT with a permanent failure. Yes, I know, the OP was asking
for a blackhole not for a closed front door. A blackhole hides the
problem to the sender because discarded messages only show up in
the server's logs. If the senders are able to handle errors properly
-and they SHOULD be- then a REJECT is the best way to go. It puts
the burden of handling invalid destinations where it belongs: at the
sender side.

Regards,

Kees.

--
Kees Theunissen.

Re: Help configuring a blackhole

am 10.10.2007 14:37:58 von Bill Cole

In article <470c71b8$0$230$e4fe514c@news.xs4all.nl>,
Kees Theunissen wrote:

> Bill Cole wrote:
> > In article <1191963192.680851.212320@r29g2000hsg.googlegroups.com>,
> > Phil wrote:
> >
> >> Can anyone point me to a guide on setting up a blackhole in sendmail.
> >> My environment is that many app servers use several clustered (HW LB)
> >> sendmail servers as a SmartHost for outbound relay. I do NOT have to
> >> worry about inbound mail in this config.
> >>
> >> I would like to be able to configure so that ALL OUTBOUND email for
> >> particular addresses (e.g. foo@bar.net) are discarded immediately
> >> (with log written). Currently emails for some bogus addresses are
> >> filling my queues from time-to-time, and since the addresses can
> >> change, I need to implement this in mail relay, not in app.
> >>
> >> I've tried reading some chapters in the Sendmail book, and honestly
> >> I'm more confused now than before about implementing a blackhole as I
> >> described below ... I'm hoping someone has a cookbook or cheat-sheet
> >> that can get me started down the path .... :-)
> >
> > Use the DISCARD feature of the access map:
> >
> > To:foo@bar.net DISCARD
> >
>
> Or REJECT with a permanent failure.

Absolutely a better option as a general principle and in most specific
cases.

> Yes, I know, the OP was asking
> for a blackhole not for a closed front door. A blackhole hides the
> problem to the sender because discarded messages only show up in
> the server's logs. If the senders are able to handle errors properly
> -and they SHOULD be- then a REJECT is the best way to go. It puts
> the burden of handling invalid destinations where it belongs: at the
> sender side.

That's the best option, but there are narrow circumstances where just
sinking some mail intentionally is the most efficient path to an
inevitable outcome.

--
Now where did I hide that website...

Re: Help configuring a blackhole

am 10.10.2007 20:46:34 von Kees Theunissen

Bill Cole wrote:
> In article <470c71b8$0$230$e4fe514c@news.xs4all.nl>,
> Kees Theunissen wrote:
>
>
>>Bill Cole wrote:
>>
>>>In article <1191963192.680851.212320@r29g2000hsg.googlegroups.com>,
>>> Phil wrote:
>>>
>>>
>>>>Can anyone point me to a guide on setting up a blackhole in sendmail.
>>>>My environment is that many app servers use several clustered (HW LB)
>>>>sendmail servers as a SmartHost for outbound relay. I do NOT have to
>>>>worry about inbound mail in this config.
>>>>
>>>>I would like to be able to configure so that ALL OUTBOUND email for
>>>>particular addresses (e.g. foo@bar.net) are discarded immediately
>>>>(with log written). Currently emails for some bogus addresses are
>>>>filling my queues from time-to-time, and since the addresses can
>>>>change, I need to implement this in mail relay, not in app.
>>>>
>>>>I've tried reading some chapters in the Sendmail book, and honestly
>>>>I'm more confused now than before about implementing a blackhole as I
>>>>described below ... I'm hoping someone has a cookbook or cheat-sheet
>>>>that can get me started down the path .... :-)
>>>
>>>Use the DISCARD feature of the access map:
>>>
>>>To:foo@bar.net DISCARD
>>>
>>
>>Or REJECT with a permanent failure.
>
>
> Absolutely a better option as a general principle and in most specific
> cases.
>
>
>>Yes, I know, the OP was asking
>>for a blackhole not for a closed front door. A blackhole hides the
>>problem to the sender because discarded messages only show up in
>>the server's logs. If the senders are able to handle errors properly
>>-and they SHOULD be- then a REJECT is the best way to go. It puts
>>the burden of handling invalid destinations where it belongs: at the
>>sender side.
>
>
> That's the best option, but there are narrow circumstances where just
> sinking some mail intentionally is the most efficient path to an
> inevitable outcome.
>

I'm wondering what actually will happen with the message if
DISCARD is used.

From cf/README:

DISCARD Discard the message completely using the
$#discard mailer. If it is used in check_compat,
it affects only the designated recipient, not
the whole message as it does in all other cases.
This should only be used if really necessary.

This looks like the message will be dropped not only for
the blacklisted recipient(s) but for *all* recipients.
I'm not sure if that is what the OP wanted. At least it is
something he needs to be aware af.


Regards,

Kees.

--
Kees Theunissen.

Re: Help configuring a blackhole

am 10.10.2007 21:00:49 von phillip.corchary

On Oct 9, 10:48 pm, Bill Cole wrote:
> In article <1191963192.680851.212...@r29g2000hsg.googlegroups.com>,
>
> Phil wrote:
> > Can anyone point me to a guide on setting up a blackhole in sendmail.
> > My environment is that many app servers use several clustered (HW LB)
> > sendmail servers as a SmartHost for outbound relay.
>
> Use the DISCARD feature of the access map:
>
> To:f...@bar.net DISCARD

This sounds like exactly what I need, and to the other reply, I do not
want to reject back to the app-server (at least at this time), exactly
because that server will NOT know what to do with it, and I will
create a loop.

I tried to setup DISCARD before and it seemed a little less obvious
that just this ... any tips appreciated and I will go back and RTFM
again - but this is a pretty dense subject matter. :-)

Thank. phil