Configuration main.cf
header_checks = regexp:/home/emailfilter
content_filter = amavis:[127.0.0.1]:10024
Configuration master.cf
smtpinetn - 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 inetn - 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=
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= to= proto=ESMTP
helo=: spam@homedomain
Nov 3 11:56:19 ruttentuttels postfix/qmgr[5]: 55463162423:
from=, 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=, orig_to=,
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
4K2bHVNL/FmhOgAA3E176Q Saved)
Nov 3 11:56:19 ruttentuttels postfix/qmgr[5]: 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=
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[5]: E8DB9162423:
from=, 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: