I just want to share some insight i have releasing messages to exchange servers (2010 or 2013) from EFA system.
i dont know if you know this but microsoft are relying on Message-id to avoid duplicates emails per mailbox,
and it is a good thing because RFC-822 saying "no two different messages must ever have the same Message-ID."
Now, lets say you delete an email from your mailbox and you want to recover it from EFA,
you release it from the EFA but it's not coming to the inbox,
the reason is because the email is still indexed with the original Message-Id in Exchange. (until ESE remove it depanding on the retntion policy)
so if you want to release emails from the EFA to your Exchange server you can release it to different mailbox or
you can tell MailScanner on mailscanner.conf to remove Message-Id:
Code: Select all
# If you are having problems with duplicate message-id headers when you
# release spam from the quarantine and send it to an Exchange server, then add
# Message-Id.
Remove These Headers = X-Mozilla-Status: X-Mozilla-Status2: Disposition-Notification-To: Return-Receipt-To:
and the delivery will be successful, but..
The problem that i see with this is that now MailScanner removing the Message-Id in all emails inbound and outbound,
and its not a best practise since RFC-822 also saying that every new email need to have message-id header,
it can cause that every email you relaying to the world from the EFA will be Message-Id-less and it can cause your emails
to get high scores on remote spam filters.
The solution that was good for me is to add custom header (X-EFA-Origin) to all emails that i'm releasing from EFA
and create a transport rule in Exchange to remove the Message-Id.
first step, i added this line to /etc/postfix/header_checks:
Code: Select all
/^Received:.*\[127\.0\.0\.1/ PREPEND X-EFA-Origin:Yes
so i will add the header only if it come from itself.
in Exchange PowerShell past this script,
Code: Select all
New-TransportRule "Remove Message-Id Header From EFA" -HeaderMatchesMessageHeader "X-EFA-Origin" -HeaderMatchesPatterns "Yes" -RemoveHeader "Message-Id" -Comments "Message-Id Header will be removed from emails before delivery if it originated from EFA."
and continue the MDA processing.
Regards,
Zohman.