I am building a new system on CentOS7 that has postfix 2.10.1 and amavis-new 2.11.1

I am working from my notes of 2 years ago when I last did this successfully so either something has changed since then (quite likely), or I am missing something from my notes (also quite likely).

For main.cf I run:

postconf -e 'content_filter = amavis:[127.0.0.1]:10024'

Then I append to the default master.cf (working from my understanding that the last instruction in master.cf encountered is the one applied, rather than trying to edit what is there):

# ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (100) # ========================================================================== smtpd pass - - n - - smtpd submission inet n - n - - smtpd -o smtpd_recipient_restrictions= pickup unix n - n 60 1 pickup -o content_filter= relay unix - - n - - smtp -o fallback_relay= maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient} uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) ifmail unix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - n n - - pipe flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient # # spam/virus section # amavis unix - - y - 2 lmtp -o lmtp_data_done_timeout=1200 -o lmtp_send_xforward_command=yes -o disable_dns_lookups=yes -o max_use=20 127.0.0.1:10025 inet n - n - - smtpd -o content_filter= -o smtpd_delay_reject=no -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=127.0.0.0/8 -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_header_body_checks,no_unknown_recipient_checks,no_milters -o local_header_rewrite_clients= -o smtpd_milters= -o local_recipient_maps= -o relay_recipient_maps= # # Dovecot LDA dovecot unix - n n - - pipe flags=DRhu user=vmail:mail argv=/usr/libexec/dovecot/deliver -d ${recipient} # # Vacation mail vacation unix - n n - - pipe flags=Rq user=vacation argv=/var/spool/vacation/vacation.pl -f ${sender} -- ${recipient}


Dovecot is working just fine, BTW.  So I run a couple of tests:

sendmail -i r...@test.htt-consult.com < sample-virus-simple.txt

Feb  7 12:52:57 klovia postfix/pickup[11341]: 9347458EC: uid=0 from=<root>
Feb  7 12:52:57 klovia postfix/cleanup[11458]: 9347458EC: message-id=<20190207175257.934745...@klovia.htt-consult.com> Feb  7 12:52:57 klovia postfix/qmgr[6089]: 9347458EC: from=<r...@klovia.htt-consult.com>, size=430, nrcpt=1 (queue active) Feb  7 12:52:58 klovia dovecot: lda(r...@test.htt-consult.com): sieve: msgid=<20190207175257.934745...@klovia.htt-consult.com>: stored mail into mailbox 'INBOX' Feb  7 12:52:58 klovia postfix/pipe[11465]: 9347458EC: to=<r...@test.htt-consult.com>, relay=dovecot, delay=4.3, delays=3.4/0.08/0/0.77, dsn=2.0.0, status=sent (delivered via dovecot service)
Feb  7 12:52:58 klovia postfix/qmgr[6089]: 9347458EC: removed


sendmail -i r...@test.htt-consult.com < sample-spam-GTUBE-junk.txt

Feb  7 12:54:08 klovia postfix/pickup[11341]: 860DE58EC: uid=0 from=<root>
Feb  7 12:54:08 klovia postfix/cleanup[11458]: 860DE58EC: message-id=<gtube1.1010...@example.net> Feb  7 12:54:08 klovia postfix/qmgr[6089]: 860DE58EC: from=<r...@klovia.htt-consult.com>, size=941, nrcpt=1 (queue active) Feb  7 12:54:09 klovia dovecot: lda(r...@test.htt-consult.com): sieve: msgid=<gtube1.1010...@example.net>: stored mail into mailbox 'INBOX' Feb  7 12:54:09 klovia postfix/pipe[11465]: 860DE58EC: to=<r...@test.htt-consult.com>, relay=dovecot, delay=0.89, delays=0.37/0.02/0/0.5, dsn=2.0.0, status=sent (delivered via dovecot service)
Feb  7 12:54:09 klovia postfix/qmgr[6089]: 860DE58EC: removed


Both right to INBOX.  Obviously I am missing something.  I have spent the day reading over stuff, but I am missing what I am missing.

I hope someone here can lend a hand.  I suspect it is a 'small' oversight as that all it takes.

thanks


Oh, and here is the status of amavisd:

# systemctl -l status amavisd
● amavisd.service - Amavisd-new is an interface between MTA and content checkers.    Loaded: loaded (/usr/lib/systemd/system/amavisd.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2019-02-07 08:16:59 EST; 7h ago
     Docs: http://www.ijs.si/software/amavisd/#doc
  Process: 5715 ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf (code=exited, status=0/SUCCESS)
 Main PID: 6327 (/usr/sbin/amavi)
   CGroup: /system.slice/amavisd.service
           ├─6327 /usr/sbin/amavisd (master)
           ├─6336 /usr/sbin/amavisd (virgin child)
           └─6337 /usr/sbin/amavisd (virgin child)

Feb 07 08:16:59 klovia.htt-consult.com amavis[6327]: Found decoder for    .lha  at /usr/bin/7z Feb 07 08:16:59 klovia.htt-consult.com amavis[6327]: Found decoder for    .iso  at /usr/bin/7z Feb 07 08:16:59 klovia.htt-consult.com amavis[6327]: Found decoder for    .exe  at /usr/bin/unarj Feb 07 08:16:59 klovia.htt-consult.com amavis[6327]: Using primary internal av scanner code for ClamAV-clamd Feb 07 08:16:59 klovia.htt-consult.com amavis[6327]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan Feb 07 08:16:59 klovia.htt-consult.com amavis[6327]: Deleting db files __db.002,snmp.db,nanny.db,__db.001,__db.003 in /var/spool/amavisd/db Feb 07 08:16:59 klovia.htt-consult.com amavis[6327]: Creating db in /var/spool/amavisd/db/; BerkeleyDB 0.51, libdb 5.3 Feb 07 08:17:00 klovia.htt-consult.com amavis[6327]: initializing Mail::SpamAssassin (0) Feb 07 08:17:08 klovia.htt-consult.com amavis[6327]: SpamControl: init_pre_fork on SpamAssassin done Feb 07 08:17:08 klovia.htt-consult.com amavis[6327]: extra modules loaded after daemonizing/chrooting: /usr/lib/perl5/vendor_perl/auto/Net/SSLeay/autosplit.ix, /usr/lib/perl5/vendor_perl/auto/Net/SSLeay/randomize.al, /usr/share/perl5/Net/libnet.cfg, IO/Socket/SSL.pm, Mail/SpamAssassin/Plugin/FreeMail.pm, Mail/SpamAssassin/Plugin/SpamCop.pm, Net/Cmd.pm, Net/Config.pm, Net/SMTP.pm, Net/SSLeay.pm

Reply via email to