[SOLVED] Forwarding messages from quarantine to the final recipient without changes field FROM

AVIYOR

New Member
Mar 27, 2023
13
0
1
Hi

Sometimes important emails that shouldn't be recognized as spam are mistakenly quarantined.
If I forward a blocked message from the quarantine, the recipient receives an email from postmaster@hostname. It is impossible to continue correspondence with the sender of this letter, since the postmaster@hostname address is indicated in the FROM field. Is it possible to somehow send quarantined messages to the recipient in the same form in which they arrive at the gateway?
 
f I forward a blocked message from the quarantine, the recipient receives an email from postmaster@hostname. It is impossible to continue correspondence with the sender of this letter, since the postmaster@hostname address is indicated in the FROM field. Is it possible to somehow send quarantined messages to the recipient in the same form in which they arrive at the gateway?
The From header in the mail should not be touched by quarantine - the thing that changes is the envelope-from address (to prevent bounces in case the mail cannot be delivered)

Replying in a mail-client usually uses the From header address - so this behavior is odd - could you share:
* the logs of the mail delivery to quarantine
* the logs of the mail delivery from quarantine to the internal recipient
* the mail as .eml
 
The From header in the mail should not be touched by quarantine - the thing that changes is the envelope-from address (to prevent bounces in case the mail cannot be delivered)

Replying in a mail-client usually uses the From header address - so this behavior is odd - could you share:
* the logs of the mail delivery to quarantine
* the logs of the mail delivery from quarantine to the internal recipient
* the mail as .eml

Sent a test mail


* the logs of the mail delivery to quarantine

Mar 28 10:15:44 mx1 postfix/smtpd[35224]: connect from mx2.dmz.del[10.1.12.2]
Mar 28 10:15:44 mx1 postfix/smtpd[35224]: DF0EFC1010: client=mx2.dmz.del[10.1.12.2]
Mar 28 10:15:44 mx1 postfix/cleanup[35229]: DF0EFC1010: message-id <3DA23ED994F9423AACD1B2401DA1357D@DMZ.DEL>
Mar 28 10:15:44 mx1 postfix/qmgr[939]: DF0EFC1010: from=<14536768@gmail.com>, size=1094, nrcpt=1 (queue active)
Mar 28 10:15:44 mx1 postfix/smtpd[35224]: disconnect from mx2.dmz.del[10.1.12.2] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Mar 28 10:15:45 mx1 pmg-smtp-filter[32220]: C10726422942101F14: new mail message-id=<3DA23ED994F9423AACD1B2401DA1357D@DMZ.DEL>#012
Mar 28 10:15:50 mx1 pmg-smtp-filter[32220]: C10726422942101F14: SA score=1003/5 time=5.206 bayes=undefined autolearn=no autolearn_force=no hits=ALL_TRUSTED(-1),DKIM_ADSP_CUSTOM_MED(0.001),FORGED_GMAIL_RCVD(1),FREEMAIL_ENVFROM_END_DIGIT(0.25),FREEMAIL_FROM(0.001),GTUBE(1000),KAM_DMARC_NONE(0.25),KAM_DMARC_STATUS(0.01),KAM_NUMSUBJECT(0.5),NML_ADSP_CUSTOM_MED(1.2),SPF_SOFTFAIL(0.972),TVD_SPACE_RATIO(0.001)
Mar 28 10:15:50 mx1 pmg-smtp-filter[32220]: C10726422942101F14: moved mail for <ab@bns123.com> to spam quarantine - C107764229426446DA (rule: Quarantine/Mark Spam (Level 3))
Mar 28 10:15:50 mx1 pmg-smtp-filter[32220]: C10726422942101F14: processing time: 5.286 seconds (5.206, 0.037, 0)
Mar 28 10:15:50 mx1 postfix/lmtp[35230]: DF0EFC1010: to=<ab@bns123.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=5.5, delays=0.2/0/0.04/5.3, dsn=2.5.0, status=sent (250 2.5.0 OK (C10726422942101F14))
Mar 28 10:15:50 mx1 postfix/qmgr[939]: DF0EFC1010: removed



* the logs of the mail delivery from quarantine to the internal recipient
Mar 28 10:20:26 mx1 postfix/smtpd[35287]: connect from localhost.localdomain[127.0.0.1]
Mar 28 10:20:26 mx1 postfix/smtpd[35287]: E9A55C100E: client=localhost.localdomain[127.0.0.1]
Mar 28 10:20:27 mx1 postfix/cleanup[35289]: E9A55C100E: message-id=<3DA23ED994F9423AACD1B2401DA1357D@DMZ.DEL>
Mar 28 10:20:27 mx1 postfix/qmgr[939]: E9A55C100E: from=<postmaster@mx1.dmz.del>, size=2291, nrcpt=1 (queue active)
Mar 28 10:20:27 mx1 postfix/smtpd[35287]: disconnect from localhost.localdomain[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 commands=4
Mar 28 10:20:27 mx1 postfix/smtp[35290]: E9A55C100E: to=<ab@bns123.com>, relay=mx3.dmz.del[10.1.12.3]:25, delay=0.15, delays=0.06/0.02/0.01/0.06, dsn=2.0.0, status=sent (250 Message accepted for delivery)
Mar 28 10:20:27 mx1 postfix/qmgr[939]: E9A55C100E: removed



* the mail as .eml
Sorry, can't share it
 
Yes - as said :
the thing that changes is the envelope-from address (to prevent bounces in case the mail cannot be delivered)

the logs show that the envelope address changes to postmaster@ - this is intentional
However the From header in the mail is not touched - and mail-clients use that information for a reply (or a Reply-to header if present)...
 
Yes - as said :


the logs show that the envelope address changes to postmaster@ - this is intentional
However the From header in the mail is not touched - and mail-clients use that information for a reply (or a Reply-to header if present)...
Thank you for the clarification
This behavior of the system was due to the absence of the ReplyTo field in some emails.
 
This behavior of the system was due to the absence of the ReplyTo field in some emails.
Then the mailclient should use the From header from the mail (which should be present) - and this does not get changed by PMG either.
So a missing reply-to header alone should not cause replies to go to postmaster@...
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!