Wishlist feature

Mark Martinec Mark.Martinec+amavis at ijs.si
Tue Sep 20 19:52:33 CEST 2011


> I found a problem with using amavis with a milter. I use postfix and
> normally I could use smtpd_proxy_filter to get mails over amavis.
> But for some reason, I need to use milters before amavis. So I need
> amavisd-milter, which uses $unix_socket in amavisd. This is okay,
> if I only have amavis listening on one TCP port, i.e. the incoming MTA
> port. But what about the submission port or any other port that
> normally would live inside a policy bank?
> As far as I could see, currently I would have to run amavisd-milter and
> amavisd in multi instance mode and could not use policy_banks anymore.
> That is very sad, as it destroys the nice concept.
> So here comes my wish list: Is it possible to deal with unix-sockets the
> same way as with TCP? Having a list of unix-sockets in amavisd that
> I could map to different policy_banks? So I could use at least one instance
> of amavisd and only would need multiple instances of amavisd-milter
> with -S option pointing to the different unix sockets.

This is possible with 2.7.0: loading a policy bank based on
a path of a Unix socket receiving a connection.
Apparently I forgot to document it in release notes.

@listen_sockets = (

$interface_policy{"$helpers_home/amavisd.sock1"} = 'UX-S1';
$interface_policy{"$helpers_home/amavisd.sock2"} = 'UX-S2';
$interface_policy{"$helpers_home/amavisd.sock3"} = 'UX-S3';

$policy_bank{'UX-S1'} = { ... };
$policy_bank{'UX-S2'} = { ... };
$policy_bank{'UX-S3'} = { ... };

The approach suggested by Andreas is fine too.


More information about the amavis-users mailing list