Re: Exim and .forward

Etusivu
Poista viesti
Vastaa
Lähettäjä: Nigel Metheringham
Päiväys:  
Vastaanottaja: Keith Russell
Kopio: exim-users
Aihe: Re: Exim and .forward
} I have been trying to set up a .forward file to pass my messages to
} procmail, as described in the Filtering Mail FAQ, but the .forward
} syntax appears to be different for exim than for sendmail, and I have
} been totally unsuccessful. Based on the above-mentioned FAQ and the
} Procmail FAQ, I have tried all the following variations (and variations
} of the variations!):
}
} "|exec /usr/local/bin/procmail #keithr"
} "|exec /usr/local/bin/procmail USER=keithr"
} "|IFS=' ';exec /usr/local/bin/procmail #keithr"
} "|IFS=' ';exec /usr/local/bin/procmail USER=keithr"
} "|/usr/local/bin/procmail #keithr"
} "|IFS=' '&&p=/usr/local/bin/procmail&&test -f $p&&exec $p -f-||exit
} 75#moo"

I find it amazing that all of these examples are trying to work round a
set of functional and security bugs in sendmail, and that it is now
assumed that this lousy behaviour is a basic function of MTAs.

Sendmail used to have this problem where if two people had the same thing
in their .forward file, and a message was sent to both of them, then it
"optomised" the delivery list by deleting one of the duplicates. This is
OK for normal addresses, but not good for pipes to programs. To make
matters worse the user id that pipes were executed under tended to vary
between versions and other whims (often things ran as daemon). Hence
people used to add rubbish to the end of the command to make it unique.

Smail, exim and other sane mailers have always been able to tell that a
delivery to 2 identical piped commands invoked fom .forward files with
different UIDs are distinct - basically the thing compared is the command
line and the invoking user.

Sendmail invokes pipes with an intermediate shell, which can be a security
hole, so people add in fluff such as IFS=' ' etc to try and keep things
under control. Exim invokes the pipe directly doing its own argument
parsing.

Hence all you need is
    |/usr/local/bin/procmail


    Nigel.



-- 
[ Nigel.Metheringham@???   -  Systems Software Engineer ]
[ Tel : +44 113 251 6012                   Fax : +44 113 224 0003 ]
[            Friends don't let friends use sendmail!              ]




--
* This is sent by the exim-users mailing list.  To unsubscribe send a
    mail with subject "unsubscribe" to exim-users-request@???
* Exim information can be found at http://www.exim.org/