anomy-list

Re: too many hops in sendmail

From: Bjarni R. Einarsson (10047@xyz.molar.is)
Date: Þri 13 Feb 2001 - 12:39:33 UTC


On 2001-02-13, 13:18:55 (+0100), Leandro Dardini wrote:
>
> # Sanitize with procmail:
> R$* < @usl4.toscana.it. > $* $#procmail $@/etc/sanitizer.rc
> $:$1<@usl4.toscana.it.CLEAN.>$2
> R$* < @usl4.tos.it. > $* $#procmail $@/etc/sanitizer.rc
> $:$1<@usl4.tos.it.CLEAN.>$2
>
...
>
> So I try to add another one sanitizer R$... something like
>
> R$* < @hpns1.usl4.toscana.it. > $* $#procmail $@/etc/sanitizer.rc
> $:$1<@hpns1.usl4.toscana.it.CLEAN.>$2

That should work fine, as long as you add it before everything else.
The order matters, so in general the most specific rule should precede
the less specific ones. Also it's very very important that all rules
passing stuff through the sanitizer (like the one above) precede these
two rules:

> R$* < @ $+ .CLEAN. > $* $1<@$2.>$3
> R$* < @ $+ .CLEAN > $* $1<@$2.>$3

If the order isn't the problem, then perhaps you are missing TAB characters
or something like that from the new line?

Another hint: a rule like this (split between lines for legibility) might
catch anything addressed to @*usl4.toscana.it so you won't need a rule for
every single machine:

R$* < @ $* usl4.toscana.it. > $* $#procmail $@/etc/sanitizer.rc
$:$1<@>$2<usl4.toscana.it.CLEAN.>$3

Note that I haven't tested this and may be getting something wrong. :)

For you the best solution may be to simply define a class of hostnames (in
an external file, much like /etc/sendmail.cw) and use a single class-based
rule, as discussed in the sanitizer manual.

-- 
Bjarni R. Einarsson                           PGP: 02764305, B7A3AB89
 10047@xyz.molar.is                -><-              http://bre.klaki.net/

Check out my open-source email sanitizer: http://mailtools.anomy.net/

-- This mailing list's home page is: http://mailtools.anomy.net/archives/anomy-list/ There you can find subscription instructions and possibly an archive. Molar.is is a free Icelandic mailing list service.



hosted by molar.is