content-filter with Postfix

Mike Ray mray at
Thu Mar 9 22:33:38 CET 2017

You will want to avoid re-scanning mail that amavis is injecting back into postfix:
# send all mail to amavis for analysis
content_filter = smtp-amavis:[]:10024
# amavis re-queues via this, so don't bother re-checking things inet    n       -       y       -       -       smtpd
        -o content_filter=

I believe amavis is hard coded to use port 10025, but I am not completely certain.

In the above configuration, everything that is queued into postfix will be sent to amavis. You could add the "-o content_filter=" to other services that you wanted to avoid scanning. I would rather scan it all and be safe, but perhaps you wanna save resources and skip checking local things, so you'd add it to the "pickup" definition. You should read over some of the postfix documentation if you want to remove it from other services:

----- On Mar 8, 2017, at 2:25 PM, Robert Moskowitz rgm at wrote:

> On 03/08/2017 02:45 PM, DaLiV wrote:
>> All is simple:
>> when you pass to filter ALL mail - then can use directive ...
>> but when You want to make diffirent access to diffirent services /IP
>> or Port based/ then surelly more advisable to use, where
>> behavior is defined for each subservice ...
> And which services would one NOT pass to amavis?  So what you might do
> is have the global rule and for a couple services that break going to
> amavis, have them use content_filter=
> Like maybe amavis itself?  :)
>> Robert Moskowitz wrote:
>>> I am on Centos 7.
>>> I am reading a lot of different places, including:
>>> /usr/share/doc/amavisd-new-2.10.1/README_FILES/README.postfix
>>> that seem to imply that should have
>>> content_filter=amavisfeed:[]:10024
>>> instead of sprinkling it all over as a -o line.
>>> Does anyone have any knowledge on this?  if in, which
>>> services do NOT use amavis?
>>> thank you

More information about the amavis-users mailing list