In gmane.os.openbsd.misc, you wrote:
> Hi Stuart:
>
> Thanks for the reply. I noticed that I had cut & pasted from two
> different messages, so here is an intact sample:
>
> (It's To: [email protected], which OpenBSD forwards to
> the Exchange server, From: [email protected]):

Ok, most likely scenario: spammer sends to [email protected],
hits Sendmail, Sendmail tries to pass it to Exchange.

Exchange generates a bounce *by email* to the sender
address (most Exchange versions don't reject "user unknown"
at the SMTP port, instead they fully bounce the email. oops.)

I guess you are also relaying outbound mail via the sendmail
box so Exchange sends it there, Sendmail tries to deliver it
and fails, then as you're receiving postmaster's mail you get
a copy of the "double bounce".

If that is what's happening, the fix is to reject mail for
invalid users before the message hits Sendmail. You can create
/etc/mail/access populated with a list of the valid addresses
on the Exchange server, something like:

To:myramstore.com               error:550 5.1.1 No such user
[email protected]        OK
[email protected]          OK
etc.

Then rebuild the hash file as shown in the comments.

You can actually build the list from the MS directory
fetching it via ldapsearch (from OpenLDAP) but the exact
command line is dependent on how the Windows server is 
arranged.

Keep an eye on /var/log/maillog (tail -f is good for this)
when you put this in place, and you might like to do it with
a test domain first.


> --- BEGIN SAMPLE ---
> Delivery has failed to these recipients or distribution lists:
>
> [email protected]
> The recipient's e-mail address was not found in the recipient's
> e-mail system. Microsoft Exchange will not try to redeliver this
> message for you. Please check the e-mail address and try resending
> this message, or provide the following diagnostic text to your
> system administrator.
>
> The following organization rejected your message:
> sitemail.everyone.net.
>
> Diagnostic information for administrators:
>
> Generating server: mail.cybernet.ca
>
> [email protected]
> sitemail.everyone.net #<sitemail.everyone.net #5.1.1 SMTP;
> 550 Recipient Rejected: No account by that name here> #SMTP#
>
> Original message headers:
>
> Return-Path: <MAILER-DAEMON>
> Received: from localhost (localhost)
>       by mail.cybernet.ca (8.13.4/8.13.4) id n06HNI36007149;
>       Tue, 6 Jan 2009 09:23:18 -0800 (PST)
> Date: Tue, 6 Jan 2009 09:23:18 -0800
> From: Mail Delivery Subsystem <MAILER-DAEMON>
> Message-ID: <[email protected]>
> To: <[email protected]>
> MIME-Version: 1.0
> Content-Type: text/plain
> Subject: Returned mail: see transcript for details
> Auto-Submitted: auto-generated (failure)
> --- END SAMPLE ---
>
> I'm mulling over a reply from L. V Lammert on this but still
> not quite clear on the sequence of events. Any further elucidation
> would be much appreciated.
>
> Thanks,
> Richard Koett.

Reply via email to