[milters] Archive

Lists Index Date Thread Search

Article: 1045
From: Anthony Howe
Date: 2006-07-18 12:16:34 -0400
Subject: Re: milter-gris and Popauth.db

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support
--------------------------------------------------------

Jim Galley wrote:
> Per your warning, i did not mess with the R$* code, but i did notice
> that there isn't a storage or {popauth_info} variable.  Perhaps

It would be easy to change this ruleset to set {popauth_info} in order 
to pass to the Snert milters.

> # List of IP addresses we allow relaying from.
> Klocalip hash -a<MATCH> /etc/mail/access
> Kpopip hash  -a<MATCH> /etc/mail/popip

Insert

Kassign macro

> R< $* >         $(popip $1 $)                Check full address.

Insert, replace TAB with one or more real tab characters.

R$+ <MATCH> TAB	$: $(assign {popauth_info} $@ $1 @ $&{client_addr} $)

> R$* < MATCH >        $#OK

This is of course untested, but it should work. I'm guessing the 
popip.db use an IP address as the key and saves the username as the 
value. So on a successful lookup, you should have in the pattern buffer:

	username<MATCH>

This matches the inserted rule, which simply saves the username and IP 
in the {popauth_info} macro before ending the ruleset in the following 
line. The format of the {popauth_info} macro set here is:

	username@ip

Now if the {popauth_info} is set (not NULL), the Snert milters should 
act on it, assuming that {popauth_info} is in the list of macros to be 
passed (see previous article on this) from sendmail to the milters.

-- 
Anthony C Howe          Skype: SirWumpus                    SnertSoft
+33 6 11 89 73 78         AIM: SirWumpus    Sendmail Milter Solutions
http://www.snert.com/     ICQ: 7116561
     http://www.snertsoft.com/

Lists Index Date Thread Search