Configuration main.cf header_checks = regexp:/home/emailfilter content_filter = amavis:[127.0.0.1]:10024
Configuration master.cf smtp inet n - y - - smtpd -o milter_macro_daemon_name=ORIGINATING -o content_filter=amavis:[127.0.0.1]:10024 -o smtpd_client_restrictions=permit_sasl_authenticated,reject submission inet n - y - - smtpd -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o milter_macro_daemon_name=ORIGINATING -o content_filter=amavis:[127.0.0.1]:10024 pickup fifo n - y 60 1 pickup -o milter_macro_daemon_name=ORIGINATING -o content_filter=amavis:[127.0.0.1]:10024 -o receive_override_options=no_header_body_checks amavis unix - - n - 2 smtp -o smtp_data_done_timeout=1200 -o smtp_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 local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o mynetworks=127.0.0.0/8,192.168.1.0/24 -o smtpd_recipient_restrictions=permit_mynetworks,reject -o strict_rfc821_envelopes=yes -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_milters Header Check: /^Subject.*seks/ REDIRECT spam@homedomain Logfile: Nov 3 11:56:19 ruttentuttels postfix/smtpd[15003]: connect from mail-wm0-f52.google.com[74.125.82.52] Nov 3 11:56:19 ruttentuttels postfix/smtpd[15003]: Anonymous TLS connection established from mail-wm0-f52.google.com[74.125.82.52]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits) Nov 3 11:56:19 ruttentuttels postgrey[1307]: action=pass, reason=client whitelist, client_name=mail-wm0-f52.google.com, client_address=74.125.82.52, sender=myusern...@gmail.com, recipient=email@homedomain Nov 3 11:56:19 ruttentuttels postfix/smtpd[15003]: 55463162423: client=mail-wm0-f52.google.com[74.125.82.52] Nov 3 11:56:19 ruttentuttels postfix/cleanup[15006]: 55463162423: message-id=<cajejka8d1kmhopk+3g7qyvsvdangxg1yo1xbtbtk0dzmnff...@mail.gmail.com> Nov 3 11:56:19 ruttentuttels postfix/cleanup[15006]: 55463162423: redirect: header Subject: Seks from mail-wm0-f52.google.com[74.125.82.52]; from=<myusern...@gmail.com> to=<email@homedomain> proto=ESMTP helo=<mail-wm0-f52.google.com>: spam@homedomain Nov 3 11:56:19 ruttentuttels postfix/qmgr[11115]: 55463162423: from=<myusern...@gmail.com>, size=3001, nrcpt=1 (queue active) Nov 3 11:56:19 ruttentuttels postfix/smtpd[15003]: disconnect from mail-wm0-f52.google.com[74.125.82.52] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7 Nov 3 11:56:19 ruttentuttels postfix/lmtp[15008]: 55463162423: to=<spam@homedomain>, orig_to=<email@homedomain>, relay=homedomain[private/dovecot-lmtp], delay=0.27, delays=0.12/0.02/0.07/0.05, dsn=2.0.0, status=sent (250 2.0.0 <spam@homedomain> 4K2bHVNL/FmhOgAA3E176Q Saved) Nov 3 11:56:19 ruttentuttels postfix/qmgr[11115]: 55463162423: removed Nov 3 11:56:33 ruttentuttels postfix/smtpd[15003]: connect from mail-wm0-f49.google.com[74.125.82.49] Nov 3 11:56:33 ruttentuttels postfix/smtpd[15003]: Anonymous TLS connection established from mail-wm0-f49.google.com[74.125.82.49]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits) Nov 3 11:56:33 ruttentuttels postgrey[1307]: action=pass, reason=client whitelist, client_name=mail-wm0-f49.google.com, client_address=74.125.82.49, sender=myusern...@gmail.com, recipient=email@homedomain Nov 3 11:56:33 ruttentuttels postfix/smtpd[15003]: E8DB9162423: client=mail-wm0-f49.google.com[74.125.82.49] Nov 3 11:56:34 ruttentuttels postfix/cleanup[15006]: E8DB9162423: message-id=<cajejka90jj_hxxfrsajzdyqa39nmphogadkqlk0hnq1mucs...@mail.gmail.com> Nov 3 11:56:34 ruttentuttels opendkim[1288]: E8DB9162423: mail-wm0-f49.google.com [74.125.82.49] not internal Nov 3 11:56:34 ruttentuttels opendkim[1288]: E8DB9162423: not authenticated Nov 3 11:56:34 ruttentuttels opendmarc[31509]: implicit authentication service: homedomain Nov 3 11:56:34 ruttentuttels opendmarc[31509]: E8DB9162423: gmail.com pass Nov 3 11:56:34 ruttentuttels postfix/qmgr[11115]: E8DB9162423: from=<myusern...@gmail.com>, size=2997, nrcpt=1 (queue active) Nov 3 11:56:34 ruttentuttels postfix/smtpd[15003]: disconnect from mail-wm0-f49.google.com[74.125.82.49] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7 Nov 3 11:56:35 ruttentuttels postfix/smtpd[15021]: connect from localhost[127.0.0.1] Nov 3 11:56:35 ruttentuttels postfix/smtpd[15021]: 7004B162441: client=localhost[127.0.0.1], orig_queue_id=E8DB9162423, orig_client=mail-wm0-f49.google.com[74.125.82.49] Nov 3 11:56:35 ruttentuttels postfix/cleanup[15006]: 7004B162441: message-id=<cajejka90jj_hxxfrsajzdyqa39nmphogadkqlk0hnq1mucs...@mail.gmail.com> Nov 3 11:56:35 ruttentuttels postfix/qmgr[11115]: 7004B162441: from=<myusern...@gmail.com>, size=3964, nrcpt=1 (queue active) Nov 3 11:56:35 ruttentuttels postfix/smtpd[15021]: disconnect from localhost[127.0.0.1] ehlo=1 xforward=1 mail=1 rcpt=1 data=1 quit=1 commands=6 Nov 3 11:56:35 ruttentuttels amavis[29033]: (29033-16) Passed CLEAN {RelayedInbound}, [74.125.82.49]:56506 [74.125.82.49] <myusern...@gmail.com> -> <email@homedomain>, Queue-ID: E8DB9162423, Message-ID: <cajejka90jj_hxxfrsajzdyqa39nmphogadkqlk0hnq1mucs...@mail.gmail.com>, mail_id: Aw_1CG8kKOdl, Hits: -1.098, size: 3192, queued_as: 7004B162441, 1314 ms Nov 3 11:56:35 ruttentuttels postfix/smtp[15016]: E8DB9162423: to=<email@homedomain>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.6, delays=0.19/0.05/0.01/1.3, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 7004B162441) Nov 3 11:56:35 ruttentuttels postfix/qmgr[11115]: E8DB9162423: removed Nov 3 11:56:35 ruttentuttels postfix/lmtp[15008]: 7004B162441: to=<email@homedomain>, relay=homedomain[private/dovecot-lmtp], delay=0.07, delays=0.02/0/0/0.04, dsn=2.0.0, status=sent (250 2.0.0 <email@homedomain> 5K2bHVNL/FmhOgAA3E176Q Saved) Nov 3 11:56:35 ruttentuttels postfix/qmgr[11115]: 7004B162441: removed The first email received has the subject of the header check filter and is forwarded to the spam account. The second email has a subject which does not match the filter and is delivered to Amavis. Question is why the redirected email to the spam box is NOT passing Amavis. Rick. ----- Running Postfix on Ubuntu with Amavis,OpenDkim,OpenDmarc,Dovecot. -- Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html