[Mimedefang] Testing aliased address

Jim McCullars jim at info.uah.edu
Fri Nov 21 22:25:54 EST 2003



On Fri, 21 Nov 2003, Alan Madill wrote:

> Where would be the best place to pick out the to address of aliased
> mail?  We get a fair bit of postmaster notify mail that gets aliased to
> root on machine A.  It gets aliased again to a real user and sent on to
> machine B where I'm testing MD and SA.  When it ends up in the real
> users mailbox the To: address is still postmaster at machineA .  I'm
> testing in filter recipient for that address but by then it is aliased
> and the HELO info is to realuser.

   Not the HELO info, but the envelope recipient. Take an analogy to the
Postal Service.  I type you a letter and the inside and outside address
are both address "A".  But I don't know that you have moved and the Post
Office is now forwarding your address to address "B".  Now even though the
letter on the inside is unchanged ("A"), the Post Office uses the address
on the envelope to determine where the mail goes.

   It's the same with sendmail.  Think of the headers (like the "To:"
header) as the letter inside, and what sendmail calls the envelope
recipient (and sender) as what is on the outside.

   If you want to check the value of the "To:" header rather than the
envelope recipient you will have to open the HEADERS file in your script,
look for the line that starts with To:, pick out the address part, and
then act upon it.  This is not as trivial as it may seem, since the
content of a "To:" header can be a lot more than just an address.

   HTH...

Jim




More information about the MIMEDefang mailing list