Re: Filter works great, Milter does not (despite log shows actions performed)‏

Stef Simoens stef+au at
Mon Aug 4 20:05:22 CEST 2014


The default amavisd-new set-up should work just fine, without using any milter.

Have a look at the following documentation:
- [Advanced content filter example]

A quick run through the config files [this is a quick cut-and-paste from my config files; beware that the port numbers might not match the above documents]:


$notify_method  = 'smtp:[]:10025';
$forward_method = 'smtp:[]:10025';

$inet_socket_port = [10024, 10026];

$interface_policy{'10026'} = 'ORIGINATING';

$policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
  originating => 1,  # declare that mail was submitted by our smtp client
  allow_disclaimers => 1,  # enables disclaimer insertion if available

smtp      inet  n       -       n       -       -       smtpd
  -o content_filter = smtp-amavis:[]:10024

[ you can also have the above config_filter configuration in /etc/postfix/ as a default setting.
  The options below override the defaults in ]

smtp-amavis unix -      -       n       -       4       smtp
  -o smtp_data_done_timeout=1200
  -o smtp_send_xforward_command=yes
  -o disable_dns_lookups=yes
  -o max_use=20
  -o smtp_generic_maps=
localhost:10025 inet n  -       n       -       -       smtpd
  -o content_filter=
  -o local_recipient_maps=
  -o relay_recipient_maps=
  -o smtpd_delay_reject=no
  -o smtpd_authorized_xforward_hosts=,[::1]/128
  -o smtpd_authorized_xclient_hosts=,[::1]/128
  -o smtpd_client_restrictions=permit_mynetworks,reject
  -o smtpd_helo_restrictions=
  -o smtpd_sender_restrictions=
  -o smtpd_recipient_restrictions=permit_mynetworks,reject
  -o smtpd_data_restrictions=reject_unauth_pipelining
  -o smtpd_end_of_data_restrictions=
  -o smtpd_restriction_classes=
  -o mynetworks=,[::1]/128
  -o smtpd_error_sleep_time=0
  -o smtpd_soft_error_limit=1001
  -o smtpd_hard_error_limit=1000
  -o smtpd_client_connection_count_limit=0
  -o smtpd_client_connection_rate_limit=0
  -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
  -o local_header_rewrite_clients=
submission inet n       -       n       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  -o content_filter=smtp-amavis:[]:10026
pickup    unix  n       -       n       60      1       pickup
  -o content_filter=smtp-amavis:[]:10026

Quick comments:
- incoming e-mail enters on port 25; with the “content-filter” option, it is sent to a mavis on port 10024
- amavis scans, tags, quarantines, … — if mail goes through, it goes to (postfix) port 10025 (this is done with the “$forward_method” in amavisd.conf)
- postfix (listening on port 10025) delivers the e-mail

- outgoing e-mail should enter on the submission port [587] or delivered with the pickup service (“local e-mail”).
- postfix forwards this e-mail to amavis on port 10026 (!)
- the configuration of amavis is changed because of a “policy bank”
- again, amavis forwards e-mail to postfix on port 10025
- postfix (listening on port 10025) delivers e-mail

Kind regards,


Op 4-aug.-2014, om 19:33 heeft Christopher Kent <chriskent_developer at> het volgende geschreven:

> Hi Andreas,
> Thanks a lot for your time and response- hope you had a good weekend!
> I understand that I may be pushing my luck, but do you please know of a method to add signatures/modify the body of mails sent from local accounts?
> Thanks!
> > Date: Sat, 2 Aug 2014 15:37:33 +0200
> > From: sca at
> > To: amavis-users at
> > Subject: Re: Filter works great, Milter does not (despite log shows actions performed)‏
> > 
> > 
> > Christopher Kent:
> > 
> > > I guess this is a permissions issue, or is there a 
> > > config/restriction within amavisd-milter or amavisd-new? 
> > changing the message body is not implemented via milter interface
> > 
> > Andreas
> >

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the amavis-users mailing list