Re: Emails are not passed to Amavis after redirection by header check

2017-11-04 Thread Dominic Raferd
On 3 November 2017 at 11:18, ruttentuttels  wrote:

> ​...​
>
> 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.

​

​I notice at http://www.postfix.org/FILTER_README.html that it is stated
under ​'Limitations':
- If a message triggers more than one filter action, only the last one
takes effect.
- FILTER actions from smtpd access maps and header/body_checks take
precedence over filters specified with the main.cf content_filter parameter.

So I think you cannot apply a header_checks filter and then a
content_filter as you are trying. A way round it might be to apply the
content filtering from within one of the restriction lists - see
https://git.ispconfig.org/ispconfig/ispconfig3/issues/833?


Re: Emails are not passed to Amavis after redirection by header check

2017-11-04 Thread ruttentuttels
Sorry, I have removed the topic due to increase of hack activities noticed
through DMARC reports.




-
Running Postfix on Ubuntu with Amavis,OpenDkim,OpenDmarc,Dovecot.
--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html


Re: Emails are not passed to Amavis after redirection by header check

2017-11-03 Thread ruttentuttels
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:

Re: Emails are not passed to Amavis after redirection by header check

2017-11-03 Thread wilfried.es...@essignetz.de
Please provide some information:

http://www.postfix.org/DEBUG_README.html#mail

Willi

Am 03.11.2017 um 11:13 schrieb ruttentuttels:
> Hi,
> I have an issue with the postfix configuration. Amavis is configured and
> running fine when emails are received directly to clients but when an email
> is forwarded by a header check rule, the mail is send straight to the
> alternative email mailbox without having the email scanned by Amavis.
> 
> Does anyone have a clue?
> 
> 
> 
> 
> --
> Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
> 


Emails are not passed to Amavis after redirection by header check

2017-11-03 Thread ruttentuttels
Hi,
I have an issue with the postfix configuration. Amavis is configured and
running fine when emails are received directly to clients but when an email
is forwarded by a header check rule, the mail is send straight to the
alternative email mailbox without having the email scanned by Amavis.

Does anyone have a clue?




--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html