procmail
[Top] [All Lists]

Re: Procmail and rbl.maps.vix.com

1998-02-07 17:05:17
At 16:14 -0500, 07 Feb. 1998, Walter Dnes <waltdnes(_at_)interlog(_dot_)com> 
wrote:
Aaron Schrab wrote:

be a way.  I currently grab the IP address from the first
Received: header inserted by my ISP

  Now, for a real challenge.  My ISP (Interlog) owns both the
interlog.com and interlog.net domains.  Sometimes incoming email
goes through 2 machines...

...and sometimes it goes through only one Interlog machine...

Since I sent that message, I got a tip from David Tamkin that let me
simplify my recipe a lot, by looking for the bottommost Received: header
inserted by my ISP:

  * $ 1^1 ^Received:.*\[\/[0-9.]+\]\)$S+by$S+${LOCALSERVER}

where $LOCALSERVER matches the names of my local mail servers, and $S
matches space or tab.  This should be able to use this just by modifying
$LOCALSERVER.

    How would you trap that?  Would a reply to an address like
postmaster(_at_)165(_dot_)227(_dot_)52(_dot_)1 work?  That would save the 
overhead of
spawning NSLOOKUP.

Actually, that should be postmaster(_at_)[165(_dot_)227(_dot_)52(_dot_)1], 
otherwise sendmail
(and probably other MTAs) will try to use it as a domain name.

It would probably work most of the time, but not all mail servers are
setup to accept mail to their IP address, there could also be mail
servers that are used just for outgoing mail (whose MX records point to
a different server hopefully) that refuse mail from most of the net (of
course you probably won't be getting much spam from them).

-- 
Aaron Schrab     aaron(_at_)schrab(_dot_)com      http://www.execpc.com/~aarons/
 Everyone can be taught to sculpt: Michelangelo would have had to be
 taught how _not_ to.  So it is with the great programmers.

<Prev in Thread] Current Thread [Next in Thread>