Hello,

I'm using postfix to filter unwanted mails, but sometimes it fails:

/etc/postfix/main.cf:

smtpd_recipient_restrictions = reject_unknown_sender_domain,
reject_unknown_recipient_domain, reject_unauth_pipelining,
permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sender_restrictions = reject_unknown_sender_domain,
check_sender_access hash:/etc/postfix/sender_access

/etc/postfix/sender_access:
n...@web.de      DISCARD
nore...@web.de  DISCARD
maili...@gmx.net        DISCARD
maili...@gmxnet.de      DISCARD

after editing the files I did:

cd /etc/postfix
postmap sender_access
/etc/init.d/postfix restart

Emails are forwarded from my web and gmx accounts to my own server and I
just wanted to delete the commercial stuff.

It seems to work for most entries, here an example in /var/log/mail.info:

NOQUEUE: discard: RCPT from mout.web.de[212.227.15.14]: <nore...@web.de>:
Sender address triggers DISCARD action; from=<nore...@web.de>
to=<x...@kmydomain.de> proto=ESMTP helo=<mout.web.de>

Only problem is the last line, for some reason it does not discard the
emails from: maili...@gmxnet.de

This is again from /var/log/mail.info:

postfix/smtpd[14110]: ACEBDF456321: client=mout.gmx.net[212.227.17.20]
postfix/cleanup[14117]: ACEBDF456321:
message-id=<123456cbda54321fdbcda2...@nlsender08.ui-portal.com>
postfix/qmgr[3576]: ACEBDF456321: from=<#123456...@gmx.net>, size=84612,
nrcpt=2 (queue active)
postfix/virtual[14118]: ACEBDF456321: to=<x...@mydomain.de>, relay=virtual,
delay=0.16, delays=0.14/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to
maildir)

This seems to be the gmx userid:

from=<#123456...@gmx.net>

When I check the message details I see this (shortened):

Return-Path: <#123456...@gmx.net>
To: GMX Mitglied <memb...@gmx.net>
From: GMX Magazin <maili...@gmxnet.de>
Reply-to: maili...@gmxnet.de
Envelope-To: <#123456...@gmx.net>


My understanding was that sender_access will filter the address in "From:",
but obviously it does not?

How could I fix this without adding every gmx account ID to the list?

Is GMX doing something wrong here? Seems like they are using another "From:"
in the negotiation phase than in the later data transfer?

Any help is welcome!

Cheers,
Peter








Reply via email to