PMG Unable to Deliver Mail

Mar 24, 2022
6
0
6
After PMG upgraded to 8.2, we frequently receive the following errors when receiving external emails. How can I resolve this?

2025-08-05T13:20:52.798370+08:00 pmg01 postfix/smtpd[3451354]: connect from mg1.xxx.com[185.252.36.100]
2025-08-05T13:20:53.780002+08:00 pmg01 postfix/smtpd[3451354]: Anonymous TLS connection established from mg1.xxx.com[185.252.36.100]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
2025-08-05T13:20:55.043889+08:00 pmg01 postfix/smtpd[3451354]: 0A91A800ACD: client=mg1.xxx.com[185.252.36.100]
2025-08-05T13:20:56.812663+08:00 pmg01 postfix/cleanup[3451934]: 0A91A800ACD: message-id=<AS8PR05MB8757D59DEB7462B04B300E5A9822A@AS8PR05MB8757.eurprd05.prod.outlook.com>
2025-08-05T13:20:58.775016+08:00 pmg01 postfix/qmgr[3400383]: 0A91A800ACD: from=<XXX>, size=1255652, nrcpt=5 (queue active)
2025-08-05T13:21:05.144797+08:00 pmg01 postfix/lmtp[3451278]: 0A91A800ACD: to=<xxx>, relay=127.0.0.1[127.0.0.1]:10024, delay=11, delays=4.5/0/0.04/6.3, dsn=4.4.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.4.0 detected undelivered mail to <xxx> (in reply to end of DATA command))
 
Last edited:
could you please share the complete logs of the mail - usually there should be logs from pmg-smtp-filter present as well.

without further information I would guess that something caused the mailprocessing to take too long and thus it was not done within the time out...
 
2025-09-22T12:48:47.947186+08:00 pmg01 postfix/lmtp[393073]: 5E41D800A60: to=<user5747@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=425187, delays=425181/3.2/0.49/1.9, dsn=4.4.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.4.0 detected undelivered mail to <user5747@example.com> (in reply to end of DATA command))
2025-09-22T12:48:47.951323+08:00 pmg01 postfix/lmtp[393073]: 5E41D800A60: to=<user10@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=425187, delays=425181/3.2/0.49/1.9, dsn=4.4.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.4.0 detected undelivered mail to <user10@example.com> (in reply to end of DATA command))
2025-09-22T12:48:47.956228+08:00 pmg01 postfix/lmtp[393073]: 5E41D800A60: to=<user5748@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=425187, delays=425181/3.2/0.49/1.9, dsn=4.4.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.4.0 detected undelivered mail to <user5748@example.com> (in reply to end of DATA command))
2025-09-22T12:48:47.960235+08:00 pmg01 postfix/lmtp[393073]: 5E41D800A60: to=<user5749@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=425187, delays=425181/3.2/0.49/1.9, dsn=4.4.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.4.0 detected undelivered mail to <user5749@example.com> (in reply to end of DATA command))
2025-09-22T12:48:47.961859+08:00 pmg01 postfix/lmtp[393073]: 5E41D800A60: to=<user5746@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=425187, delays=425181/3.2/0.49/1.9, dsn=4.4.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.4.0 detected undelivered mail to <user5746@example.com> (in reply to end of DATA command))
2025-09-22T12:48:48.020116+08:00 pmg01 postfix/postscreen[326996]: DISCONNECT [91.238.105.223]:40078
2025-09-22T12:48:48.020416+08:00 pmg01 postfix/tlsproxy[392720]: DISCONNECT [91.238.105.223]:40078
2025-09-22T12:48:48.034190+08:00 pmg01 postfix/postscreen[326996]: CONNECT from [158.247.18.77]:40163 to [203.86.236.156]:25
2025-09-22T12:48:48.184506+08:00 pmg01 postfix/postscreen[326996]: CONNECT from [77.83.199.111]:37013 to [203.86.236.156]:25
2025-09-22T12:48:48.289320+08:00 pmg01 postfix/postscreen[326996]: CONNECT from [159.183.202.60]:35964 to [203.86.236.156]:25
2025-09-22T12:48:48.304649+08:00 pmg01 pmg-smtp-filter[393081]: 80008168D0D52E5CC26: SA score=5/5 time=1.781 bayes=undefined autolearn=disabled hits=DKIM_INVALID(0.1),DKIM_SIGNED(0.1),DMARC_PASS(-0.1),DYN_RDNS_AND_INLINE_IMAGE(1.344),FREEMAIL_ENVFROM_END_DIGIT(1),FREEMAIL_FROM(0.001),HELO_DYNAMIC_IPADDR(3.243),HTML_MESSAGE(0.001),KAM_DMARC_STATUS(0.01),RCVD_IN_DNSWL_NONE(-0.0001),RCVD_IN_MSPIKE_H5(-1),RCVD_IN_MSPIKE_WL(-0.01),RDNS_DYNAMIC(0.363),SPF_HELO_NONE(0.001),SPF_PASS(-0.001),T_FREEMAIL_DOC_PDF(0.01),T_OBFU_PDF_ATTACH(0.01)
2025-09-22T12:48:48.308361+08:00 pmg01 pmg-smtp-filter[393081]: 80008168D0D52E5CC26: sender in user (user5746@example.com) welcomelist
2025-09-22T12:48:48.312679+08:00 pmg01 pmg-smtp-filter[393081]: Can't use an undefined value as an ARRAY reference at /usr/share/perl5/PMG/RuleDB/Remove.pm line 207.
2025-09-22T12:48:48.313251+08:00 pmg01 pmg-smtp-filter[393081]: fast exit because of errors (free 322646016 bytes)
2025-09-22T12:48:48.321402+08:00 pmg01 postfix/lmtp[392986]: 12E0E800109: to=<user5748@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=424368, delays=424362/3.3/0.69/1.9, dsn=4.4.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.4.0 detected undelivered mail to <user5748@example.com> (in reply to end of DATA command))
2025-09-22T12:48:48.323333+08:00 pmg01 postfix/lmtp[392986]: 12E0E800109: to=<user5749@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=424368, delays=424362/3.3/0.69/1.9, dsn=4.4.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.4.0 detected undelivered mail to <user5749@example.com> (in reply to end of DATA command))
2025-09-22T12:48:48.325324+08:00 pmg01 postfix/lmtp[392986]: 12E0E800109: to=<user5746@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=424368, delays=424362/3.3/0.69/1.9, dsn=4.4.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.4.0 detected undelivered mail to <user5746@example.com> (in reply to end of DATA command))
2025-09-22T12:48:48.526522+08:00 pmg01 pmg-smtp-filter[393087]: 80000968D0D52EC42D5: SA score=7/5 time=1.571 bayes=undefined autolearn=disabled hits=DKIM_INVALID(0.1),DKIM_SIGNED(0.1),DMARC_PASS(-0.1),DYN_RDNS_AND_INLINE_IMAGE(1.344),FREEMAIL_ENVFROM_END_DIGIT(1),FREEMAIL_FROM(0.001),HELO_DYNAMIC_IPADDR(3.243),HTML_MESSAGE(0.001),KAM_DMARC_STATUS(0.01),RCVD_IN_DNSWL_NONE(-0.0001),RCVD_IN_HOSTKARMA_BL(1.5),RCVD_IN_MSPIKE_H4(-0.01),RCVD_IN_MSPIKE_WL(-0.01),RDNS_DYNAMIC(0.363),SPF_HELO_NONE(0.001),SPF_PASS(-0.001),T_FREEMAIL_DOC_PDF(0.01),T_OBFU_PDF_ATTACH(0.01)
2025-09-22T12:48:48.528578+08:00 pmg01 pmg-smtp-filter[393087]: 80000968D0D52EC42D5: sender in user (user5746@example.com) welcomelist
2025-09-22T12:48:48.535400+08:00 pmg01 pmg-smtp-filter[393087]: Can't use an undefined value as an ARRAY reference at /usr/share/perl5/PMG/RuleDB/Remove.pm line 207.
2025-09-22T12:48:48.536028+08:00 pmg01 pmg-smtp-filter[393087]: fast exit because of errors (free 322617344 bytes)
2025-09-22T12:48:48.539487+08:00 pmg01 postfix/lmtp[393077]: 302BD8000AE: to=<user5748@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=424840, delays=424834/3.4/1/1.7, dsn=4.4.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.4.0 detected undelivered mail to <user5748@example.com> (in reply to end of DATA command))
2025-09-22T12:48:48.544406+08:00 pmg01 postfix/lmtp[393077]: 302BD8000AE: to=<user5749@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=424840, delays=424834/3.4/1/1.7, dsn=4.4.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.4.0 detected undelivered mail to <user5749@example.com> (in reply to end of DATA command))
2025-09-22T12:48:48.546322+08:00 pmg01 postfix/lmtp[393077]: 302BD8000AE: to=<user5746@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=424840, delays=424834/3.4/1/1.7, dsn=4.4.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.4.0 detected undelivered mail to <user5746@example.com> (in reply to end of DATA command))
2025-09-22T12:48:48.812639+08:00 pmg01 pmg-smtp-filter[393092]: 80006A68D0D52F4815D: SA score=5/5 time=1.417 bayes=undefined autolearn=disabled hits=ARC_SIGNED(0.001),ARC_VALID(-0.1),DKIM_SIGNED(0.1),DKIM_VALID(-0.1),DKIM_VALID_AU(-0.1),DKIM_VALID_EF(-0.1),DMARC_PASS(-0.1),KAM_ASCII_DIVIDERS(0.8),LOTS_OF_MONEY(0.001),MONEY_FORM(2.546),MONEY_NOHTML(2.083),RCVD_IN_DNSWL_NONE(-0.0001),RCVD_IN_MSPIKE_H2(-0.01),SPF_HELO_NONE(0.001),SPF_PASS(-0.001)
2025-09-22T12:48:48.814077+08:00 pmg01 pmg-smtp-filter[393092]: 80006A68D0D52F4815D: sender in user (user5780@example.com) welcomelist
2025-09-22T12:48:48.818131+08:00 pmg01 pmg-smtp-filter[393092]: Can't use an undefined value as an ARRAY reference at /usr/share/perl5/PMG/RuleDB/Remove.pm line 207.
2025-09-22T12:48:48.818771+08:00 pmg01 pmg-smtp-filter[393092]: fast exit because of errors (free 315416576 bytes)
2025-09-22T12:48:48.824884+08:00 pmg01 postfix/lmtp[393057]: 3CC8A8009C4: to=<user5780@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=348518, delays=348511/3.5/1.4/1.5, dsn=4.4.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.4.0 detected undelivered mail to <user5780@example.com> (in reply to end of DATA command))
2025-09-22T12:48:48.826772+08:00 pmg01 postfix/lmtp[393057]: 3CC8A8009C4: to=<user4929@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=348518, delays=348511/3.5/1.4/1.5, dsn=4.4.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.4.0 detected undelivered mail to <user4929@example.com> (in reply to end of DATA command))
2025-09-22T12:48:49.862134+08:00 pmg01 postfix/postscreen[326996]: CONNECT from [159.183.202.60]:36282 to [203.86.236.156]:25
2025-09-22T12:48:50.616643+08:00 pmg01 postfix/postscreen[326996]: CONNECT from [91.238.105.223]:56390 to [203.86.236.156]:25
2025-09-22T12:48:50.617535+08:00 pmg01 postfix/dnsblog[377960]: addr 91.238.105.223 listed by domain b.barracudacentral.org as 127.0.0.2
2025-09-22T12:48:50.617893+08:00 pmg01 postfix/dnsblog[377957]: addr 91.238.105.223 listed by domain spam.spamrats.com as 127.0.0.38
2025-09-22T12:48:50.763461+08:00 pmg01 postfix/postscreen[326996]: CONNECT from [220.196.192.102]:30362 to [203.86.236.156]:25
2025-09-22T12:48:50.763618+08:00 pmg01 postfix/postscreen[326996]: PASS OLD [220.196.192.102]:30362
2025-09-22T12:48:50.764330+08:00 pmg01 postfix/smtpd[392015]: connect from unknown[220.196.192.102]
 
Thanks - please also share `pmgversion -v` (and make sure you've upgraded to the latest available packages)
 
# pmgversion -v
proxmox-mailgateway: 8.2.0 (API: 8.2.2/807da96068ab, running kernel: 6.8.12-13-pve)
pmg-api: 8.2.2
pmg-gui: 4.2.1
proxmox-kernel-helper: 8.1.4
proxmox-kernel-6.8.12-13-pve-signed: 6.8.12-13
proxmox-kernel-6.8: 6.8.12-13
proxmox-kernel-6.8.12-10-pve-signed: 6.8.12-10
proxmox-kernel-6.8.12-9-pve-signed: 6.8.12-9
proxmox-kernel-6.8.12-8-pve-signed: 6.8.12-8
proxmox-kernel-6.8.12-5-pve-signed: 6.8.12-5
proxmox-kernel-6.8.12-4-pve-signed: 6.8.12-4
proxmox-kernel-6.8.12-2-pve-signed: 6.8.12-2
proxmox-kernel-6.8.8-2-pve-signed: 6.8.8-2
proxmox-kernel-6.5.13-6-pve-signed: 6.5.13-6
proxmox-kernel-6.5: 6.5.13-6
proxmox-kernel-6.5.13-5-pve-signed: 6.5.13-5
proxmox-kernel-6.5.13-1-pve-signed: 6.5.13-1
clamav-daemon: 1.0.9+dfsg-1~deb12u1
ifupdown2: 3.2.0-1+pmx11
libarchive-perl: 3.6.2
libjs-extjs: 7.0.0-5
libjs-framework7: 4.4.7-2
libproxmox-acme-perl: 1.6.0
libproxmox-acme-plugins: 1.6.0
libpve-apiclient-perl: 3.3.2
libpve-common-perl: 8.3.4
libpve-http-server-perl: 5.2.2
libxdgmime-perl: 1.1.0
lvm2: 2.03.16-2
pmg-docs: 8.2.0
pmg-i18n: 3.4.5
pmg-log-tracker: 2.5.0
proxmox-mini-journalreader: 1.5
proxmox-offline-mirror-helper: 0.6.7
proxmox-spamassassin: 4.0.1-2
proxmox-widget-toolkit: 4.3.13
pve-firmware: 3.16-3
pve-xtermjs: 5.5.0-2
zfsutils-linux: 2.2.8-pve1
 
might be an interaction of the user's welcome list and a rule where you remove an attachment (or put it in attachment quarantine)...

could you share your ruleset and a mail which triggers the message (anonymize what you have to keep private - but please keep the information consistent (e.g. replace each email address with a different string)

Thanks!
 
May I know what are the default scores in the Spam Detector?
Not sure if I understand the question 100% correctly - but the scores depend on each mail:
* PMG uses SpamAssassin as its Spamdetector
* SpamAssassin gets updates to its rules quite often (they are stored in /var/lib/spamassassin/<spamassassinversion>)

depending on which rules match for a mail the score of the rules is added to the mail. - this is logged in the journal/tracking center

if you want to know which rules have which scores - you can grep for a rule name in /var/lib/spamassassin)

I hope this helps - else please explain in a bit more detail what you want to achieve and why