[Mimedefang] Forwarded Email Blocking

Joseph Brennan brennan at columbia.edu
Wed Aug 4 10:46:36 EDT 2004



--On Wednesday, August 4, 2004 10:18 AM -0400 "Kevin A. McGrail" 
<kmcgrail at pccc.com> wrote:

> I have email that is improperly being forwarded to my account and I want
> to block it.
>
> Currently, I am using filter_recipient and it does work.  Here is my code:
>
> if ($recip =~ /^<?phw@(mnsinc|mns|monumental)\.com>?$/i ) {
>     return ('DISCARD', "Invalid Account");
>     md_syslog('warning', "Discarding $recip - MNS/Monumental SPAM");
>   }
>
> My theory is that the $recip is the forwarded_to address but I'm not 100%
> sure.  Any insight appreciated.



If $recip = $recipient, it is the address as given in the RCPT command.
It is not yet rewritten by sendmail rules or aliases or .forward file.

Joseph Brennan
Academic Technologies Group, Academic Information Systems (AcIS)
Columbia University in the City of New York




More information about the MIMEDefang mailing list