Problem setting up Amavisd-new

Hey all!

I'm setting up amavisd-new on my Linode as part of an anti-virus package. The instructions say to add the following to Postfix's main.cf file:

smtp-amavis unix - - y - 2 smtp

-o smtpdatadone_timeout=1200

-o disablednslookups=yes

127.0.0.1:10025 inet n - y - - smtpd

-o content_filter=

-o localrecipientmaps=

-o relayrecipientmaps=

-o smtpdrestrictionclasses=

-o smtpdclientrestrictions=

-o smtpdhelorestrictions=

-o smtpdsenderrestrictions=

-o smtpdrecipientrestrictions=permit_mynetworks,reject

-o mynetworks=127.0.0.0/8

-o strictrfc821envelopes=yes

When I do this and excecute a "postfix reload" command, I get the following error:

postfix: fatal: /etc/postfix/main.cf, line 30: missing '=' after attribute name: "smtp-amavis unix - - y - 2 smtp"

sushi:/etc/postfix#

I've seen the exact same instructions in a couple of different places (for reference, the ones I'm reading at the moment can be found here

Anyone know what I'm doing wrong?

8 Replies

In Main.cf I have:

content_filter = smtp-amavis:[127.0.0.1]:10024

And that's the only reference to amavis.

In Master.cf I have:

smtp-amavis unix - - n - 2 smtp

-o smtpdatadone_timeout=1200

This is also in master.cf:

127.0.0.1:10025 inet n - n - - smtpd

-o content_filter=

-o localrecipientmaps=

-o relayrecipientmaps=

-o smtpdrestrictionclasses=

-o smtpdclientrestrictions=

-o smtpdhelorestrictions=

-o smtpdsenderrestrictions=

-o smtpdrecipientrestrictions=permit_mynetworks,reject

-o mynetworks=127.0.0.0/8

-o strictrfc821envelopes=yes

-o smtpderrorsleep_time=0

-o smtpdsofterror_limit=1001

-o smtpdharderror_limit=1000

The following might be of interest …

/etc/postfix/main.cf

content_filter = smtp-amavis:[127.0.0.1]:10024

/etc/postfix/master.cf

127.0.0.1:10025 inet n  -       n     -       -  smtpd
    -o content_filter=
    -o local_recipient_maps=
    -o relay_recipient_maps=
    -o smtpd_restriction_classes=
    -o smtpd_client_restrictions=
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o mynetworks=127.0.0.0/8
    -o strict_rfc821_envelopes=yes

The following are some things to watch out for in /etc/amavisd.conf

@local_domains_acl = ( ".$mydomain", '.myhost.com );
#  The above prevents from the scanning of *out-going* email (if you have some out-look users, you want to have your out-going mail scanned, haha

$warnvirusrecip = 1;
$warnbannedrecip = 1;
#  You may wish to have your users be notified at least when they are send emails with viruses

$sa_tag_level_deflt  = 3.0;
$sa_tag2_level_deflt = 5.0;
$sa_kill_level_deflt = 100;
$sa_spam_subject_tag = '***SPAM*** ';
#  Some nice spamassassin settings.  Especially useful is the last, where you get the email with the ***SPAM*** thing in the subject.  It sticks out like a sore thumb and can easily be avoided. (If you want to do something similar with emails that have viruses, just ask)

I can't believe I repeated misread "master.cf" as "main.cf". :)

Well I've installed things and thought everything was OK. Unfortunately Postfix isn't starting. A peek at /var/log/mail.info reveals this line:

Mar 31 12:45:28 sushi postfix/master[427]: fatal: /etc/postfix/master.cf: line 108: bad transport type: smtpdatadone_timeout=1200

I've checked several sites (including the amavisd-new site) and this line should be correct. Can anyone offer some insight into this?

Is it

-o smtpdatadone_timeout=1200?

@asura:

Is it

-o smtpdatadone_timeout=1200?

Yep. That's the line. The part's that I've added to master.cf are:

smtp-amavis unix - - y - 2 smtp

-o smtpdatadone_timeout=1200

-o disablednslookups=yes

127.0.0.1:10025 inet n - y - - smtpd

-o content_filter=

-o localrecipientmaps=

-o relayrecipientmaps=

-o smtpdrestrictionclasses=

-o smtpdclientrestrictions=

-o smtpdhelorestrictions=

-o smtpdsenderrestrictions=

-o smtpdrecipientrestrictions=permit_mynetworks,reject

-o mynetworks=127.0.0.0/8

-o strictrfc821envelopes=yes

Hrm. Check your /var/log/maillog (or whatever filename you use) to see what postfix is doing. Doing a quick google, one of things mentioned is to make sure amavisd is running.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct