Amateur mail-admin here (I know, don't do that) . I have a redirect to
gmail set up for two users, and at times this happens:
1) The relayhost ("smarthost") I use, my internet provider, will accept
the mail for gmail.
2) Gmail rejects the mail as spam.
3) Relayhost bounces mail back at me.
4) My postfix tries to forward the bounce back at original sender.
5) Relayhost rejects mail .
Point 5 there I can't get my head around precisely /how/ the forwarded
bounce is rejected, suffice to say it is rejected before the relayhost
ques it, thanks for that at least.
Anybody have any pointers for how I could pre-emptively grab those
bounces and set them aside? At present I just manually put them on hold,
check the contents manually and then when I find they really are spam I
delete them, possibly mailing the user a heads up to check his account
on my host to make sure he's not missing anything important.
Now I'd really like to collect those bounces (in case they are not spam)
and compile an archive, or at least a report, for the gmail recipients.
Log excerpt from the bounce, altibox.no is my provider:
Jan 27 18:17:11 garbo postfix-incoming/smtpd[17720]: connect from
altibox-smtp3.altibox.no[212.97.141.37]:51913
Jan 27 18:17:11 garbo postsrsd[17722]: srs_reverse:
<srs0=gxrj=5y=tmec.com.vn=sale...@alstadheim.priv.no> rewritten as
<sale...@tmec.com.vn>
Jan 27 18:17:11 garbo postfix-incoming/smtpd[17720]: 8BBAED26F60:
client=altibox-smtp3.altibox.no[212.97.141.37]:51913
Jan 27 18:17:11 garbo postfix-incoming/cleanup[17723]: 8BBAED26F60:
message-id=<20230127171711.686ed128...@altibox-smtp3.altibox.no>
Jan 27 18:17:13 garbo rspamd[2641]: <f5cd9b>; proxy;
rspamd_task_write_log: id:
<20230127171711.686ed128...@altibox-smtp3.altibox.no>, qid:
<8BBAED26F60>, ip: 212.97.141.37, (default: F (no action): [0.61/400.00]
[BAYES_HAM(-4.99){99.99%;},RSPAMD_URIBL(4.50){dhl-ma.com:url;},R_MIXED_CHARSET(1.11){subject;},BOUNCE(-0.10){DSN;},DMARC_POLICY_SOFTFAIL(0.10){altibox.no
: No valid SPF, No valid
DKIM;none;},MIME_GOOD(-0.10){text/plain;},RCVD_NO_TLS_LAST(0.10){},ARC_NA(0.00){},ASN(0.00){asn:48854,
ipnet:212.97.140.0/22,
country:DK;},FROM_NO_DN(0.00){},MID_RHS_MATCH_FROM(0.00){},MIME_TRACE(0.00){0:~;1:+;2:~;3:~;4:~;},NEURAL_HAM(-0.00){-0.852;},RCPT_COUNT_ONE(0.00){1;},RCVD_COUNT_TWO(0.00){2;},R_DKIM_NA(0.00){},R_SPF_NA(0.00){no
SPF record;},TO_DN_NONE(0.00){},TO_MATCH_ENVRCPT_ALL(0.00){}]), len:
22473, time: 1395.675ms, dns req: 64, digest:
<52a0923f840b246f04b1c4842e916f00>, rcpts:
<SRS0=GxRJ=5Y=tmec.com.vn=sale...@alstadheim.priv.no>, mime_rcpts:
<SRS0=GxRJ=5Y=tmec.com.vn=sale...@alstadheim.priv.no>
Jan 27 18:17:13 garbo rspamd[2641]: <f5cd9b>; proxy;
rspamd_protocol_http_reply: regexp statistics: 0 pcre regexps scanned, 5
regexps matched, 172 regexps total, 66 regexps cached, 0B scanned using
pcre, 24.40KiB scanned total
Jan 27 18:17:13 garbo postfix-incoming/qmgr[22826]: 8BBAED26F60:
from=<>, size=22762, nrcpt=1 (queue active)
Jan 27 18:17:13 garbo postfix-incoming/smtpd[17720]: disconnect from
altibox-smtp3.altibox.no[212.97.141.37]:51913 ehlo=1 mail=1 rcpt=1
data=1 quit=1 commands=5
Jan 27 18:17:13 garbo postfix-local-deliver/smtpd[17725]: connect from
localhost[127.0.0.1]:50734
Jan 27 18:17:13 garbo postfix-local-deliver/smtpd[17725]: NOQUEUE:
reject: RCPT from localhost[127.0.0.1]:50734: 450 4.1.1
<SRS0=GxRJ=5Y=tmec.com.vn=sale...@alstadheim.priv.no>: Recipient address
rejected: User unknown in local recipient table; from=<>
to=<SRS0=GxRJ=5Y=tmec.com.vn=sale...@alstadheim.priv.no> proto=ESMTP
helo=<incoming.alstadheim.priv.no>
Jan 27 18:17:13 garbo postfix-incoming/smtp[17724]: 8BBAED26F60:
to=<SRS0=GxRJ=5Y=tmec.com.vn=sale...@alstadheim.priv.no>,
relay=127.0.0.1[127.0.0.1]:10025, delay=1.5, delays=1.5/0.01/0.01/0.02,
dsn=4.1.1, status=deferred (host 127.0.0.1[127.0.0.1] said: 450 4.1.1
<SRS0=GxRJ=5Y=tmec.com.vn=sale...@alstadheim.priv.no>: Recipient address
rejected: User unknown in local recipient table (in reply to RCPT TO
command))
Jan 27 18:17:13 garbo postfix-local-deliver/cleanup[17728]:
137C1C20FD5D:
message-id=<20230127171713.137c1c20f...@postfix-local-deliver.alstadheim.priv.no>
Jan 27 18:17:13 garbo postfix-local-deliver/smtpd[17725]: disconnect
from localhost[127.0.0.1]:50734 ehlo=1 xforward=2 mail=1 rcpt=0/1
data=0/1 rset=1 quit=1 commands=6/8
Jan 27 18:17:13 garbo postfix-local-deliver/qmgr[4342]: 137C1C20FD5D:
from=<double-bou...@postfix-local-deliver.alstadheim.priv.no>,
size=1553, nrcpt=1 (queue active)
Jan 27 18:17:13 garbo dovecot:
lda(hakon)<17731><wNiMBhkH1GNDRQAAyJkk0Q>: sieve:
msgid=<20230127171713.137c1c20f...@postfix-local-deliver.alstadheim.priv.no>:
stored mail into mailbox 'INBOX'
Jan 27 18:17:13 garbo postfix-local-deliver/local[17729]: 137C1C20FD5D:
to=<ha...@alstadheim.priv.no>, orig_to=<postmaster>, relay=local,
delay=0.14, delays=0.01/0.01/0/0.13, dsn=2.0.0, status=sent (delivered
to command: /usr/lib/dovecot/dovecot-lda -f "$SENDER" -a "$RECIPIENT")
Jan 27 18:17:13 garbo postfix-local-deliver/qmgr[4342]: 137C1C20FD5D:
removed