Nach einiger Recherche bin ich auf postfix-policyd aufmerksam geworden.
Nun funktioniert das auch bei allen eingehenden Nachrichten aber nicht bei den zu versendeten Nachrichten.
Meine /etc/postfix/main.cf:
Code: Select all
....
smtpd_data_restrictions = check_policy_service inet:127.0.0.1:10031, permit_mynetworks, permit_sasl_authenticated, reject_unauth_pipelining, permit
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_non_fqdn_hostname, reject_non_fqdn_recipient, reject_unknown_recipient_domain, check_recipient_mx_access cidr:/etc/postfix/mx_access, reject_unauth_destination, check_recipient_access pcre:/etc/postfix/recipient_checks.pcre, reject_rbl_client multi.surbl.org, reject_rbl_client zen.spamhaus.org, reject_rbl_client relays.mail-abuse.org, permit_mx_backup, permit
smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10031
policy_time_limit = 3600
Ausgehende Mail
Code: Select all
May 21 12:21:04 happyshitbit postfix/pickup[27342]: AEB434016A5: uid=10004 from=<admin@domain.org>
May 21 12:21:04 happyshitbit postfix/cleanup[27382]: AEB434016A5: message-id=<f517967a8cd96823dc5124e924f3743e@www.domain.org>
May 21 12:21:04 happyshitbit postfix/qmgr[27343]: AEB434016A5: from=<admin@domain.org>, size=1404, nrcpt=1 (queue active)
May 21 12:21:13 happyshitbit postfix/local[27384]: AEB434016A5: to=<pop17_1@mail.domain.de>, orig_to=<chris@domain.org>, relay=local, delay=8.7, delays=0.07/0.01/0/8.6, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -t -a "$EXTENSION")
May 21 12:21:13 happyshitbit postfix/qmgr[27343]: AEB434016A5: removed
Code: Select all
May 21 12:24:27 happyshitbit postfix/smtpd[27418]: connect from extern.de[188.40.++.++]
May 21 12:24:27 happyshitbit postfix/smtpd[27418]: setting up TLS connection from extern.de[188.40.++.+]
May 21 12:24:27 happyshitbit postfix/smtpd[27418]: certificate verification failed for extern.de[188.40.++.++]: self-signed certificate
May 21 12:24:27 happyshitbit postfix/smtpd[27418]: extern.de[188.40.++.++]: Untrusted: subject_CN=extern.de, issuer=extern.de, fingerprint=U0:F4:79:F8:76:F8:8C:F0:15:DA:36:2F:98:EB:4B:03
May 21 12:24:27 happyshitbit postfix/smtpd[27418]: Untrusted TLS connection established from extern.de[188.40.++.++]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
May 21 12:24:28 happyshitbit postfix/smtpd[27418]: 7AB0A40048A: client=extern.de[188.40.++.++]
May 21 12:24:28 happyshitbit postfix-policyd: connection from: 127.0.0.1 port: 30226 slots: 0 of 4096 used
May 21 12:24:28 happyshitbit postfix-policyd: rcpt=77, throttle=new(a), host=188.40.138.86, from=root@mail.extern.de, to=email@domain.org, size=343/10240000, quota=343/250000000, count=1/512(1), rcpt=1/3600(1), threshold=0%|0%|0%
May 21 12:24:28 happyshitbit postfix-policyd: rcpt=78, throttle=update(a), host=188.40.138.86, from=root@mail.extern.de, to=email@domain.org, size=343/10240000, quota=686/250000000, count=1/512(1), rcpt=2/3600(2), threshold=0%|0%|0%
May 21 12:24:28 happyshitbit postfix/cleanup[27434]: 7AB0A40048A: message-id=<20100521102426.62C80F0B2@mail.extern.de>
May 21 12:24:28 happyshitbit postfix/qmgr[27343]: 7AB0A40048A: from=<root@mail.extern.de>, size=688, nrcpt=1 (queue active)
May 21 12:24:28 happyshitbit postfix/smtpd[27418]: disconnect from extern.de[188.40.++.++]
Code: Select all
check_policy_service inet:127.0.0.1:10031
Dadurch würde aber bei jeder Verbindung zu Postfix, auch die später verworfen werden, ebenfalls Policyd aufgerufen werden.
Gibt es keine Möglichkeit nur die ausgehenden Emails zu prüfen/zählen?