[Greylist-users] relay-delay and Sendmail::Milter vs Sendmail::PMilter

susan barnes s.barnes at uni-koeln.de
Fri May 14 06:56:15 PDT 2004


Apologies if this has already been discussed, but it might be helpful for those having the same problems getting relay-delay and PMilter to work.

We have recently tried out relay-delay filter in the recommended setup, however transfering this setup to our main mailserver (SUNOS 5.8, sendmail 8.12.11, Perl 5.8.3) failed.

Sendmail::Milter seems to be unstable, so we tried to replace it with PMilter which claims to be fully compatible with Sendmail::Milter.


It isn't though, because function getsymval fails:
With each callback sendmail passes some of its macros to milter. These macros can be retrieved using the getsymval-function.

The original libmilter-docs say:

smfi_getsymval returns the value of the given macro as a null-terminated string, or NULL if the macro is not defined.

All macros stay in effect from the point they are received until the end of the connection for the first two sets, the end of the message for the third (xxfi_envfrom), and just for each recipient for the final set (xxfi_envrcpt).

Pmilter however forgets macros from preceding callbacks, since it clears $this->{symbols} (line 244 of Context.pm) with each callback.

An easy workaround is setting:

define(`confMILTER_MACROS_ENVRCPT', confMILTER_MACROS_ENVRCPT``, {i}, {auth_type}, {auth_authen}, {auth_ssf}, {auth_author}, {mail_mailer},{mail_host}, {mail_addr}, {if_addr},  {_}'')dnl

in sendmail.cf, which forces sendmail to pass on all needed macros with the RCPT_callback.


Susan Barnes <S.Barnes at rrz.uni-koeln.de>
(postmaster / listmaster services)
Zentrum fuer Angewandte Informatik - Universitaetsweiter Service RRZK
Universitaet zu Koeln / Cologne University        - Tel:0221-478-5594 

More information about the Greylist-users mailing list