Mailscanner changes FROM address

Bugs in eFa 4
Post Reply
alexmateescu
Posts: 11
Joined: 05 Dec 2018 14:28

Mailscanner changes FROM address

Post by alexmateescu »

Hi

I had an eFA v3 system which i upgraded to eFA v4 based on your migration document.

Everything is working perfectly with 1 exception.

I have an email system on a subdomain of my main eamil domain that acts as a relay server. When I send an email from an address on that server

do-not-reply@ops.domain.com to ****@domain.com the "ops.domain.com" part becomes just "domain.com" and the email appears to have come from do-not-reply@domain.com.

here is the log from postfix on EFA server

Dec 9 10:07:10 filter opendmarc[4160]: 47Wf4Z0nMwzCT3hb: SPF(mailfrom): do-not-reply@ops.******.com pass
Dec 9 10:07:11 filter postfix/cleanup[13614]: 47Wf4Z0nMwzCT3hb: milter-discard: END-OF-MESSAGE from mail.ops.*****.com[******]: milter triggers DISCARD action; from=<do-not-reply@******.com> to=<al*****.m*******@******.com> proto=ESMTP helo=<mail.ops.****.com>
Dec 9 10:07:12 filter MailScanner[19887]: Message 47Wf4Z0nMwzCT3hb from ********** (do-not-reply@ops.*****.com) is whitelisted
Dec 9 10:07:12 filter postfix/qmgr[30173]: 47Wf4c3RcYzCT3hf: from=<do-not-reply@******.com>, size=3175, nrcpt=1 (queue active)
skoppes
Posts: 33
Joined: 26 Aug 2015 19:29

Re: Mailscanner changes FROM address

Post by skoppes »

This sounds suspiciously like what I ran into before: viewtopic.php?t=3086

While my problem was with 3.x, I'm not sure if it's still applicable in 4.x. It might at least give you somewhere to start looking. Copied so you don't have to wade through everything.

EFA is configured to masquerade (re-write) child domains of it's own domain. This causes ANY child domain (of the EFA configured domain) on incoming email to be re-written! This is a default configuration option that is disabled by default in postfix but enabled in EFA!

For example - with EFA configured for foo.com:
From:user@me.foo.com -> becomes -> From:user@foo.com
From:user@bar.foo.com -> becomes -> From:user@foo.com

To fix, edit /etc/postfix/main.cf and comment out the following line:

Code: Select all

masquerade_domains = $mydomain

becomes

#masquerade_domains = $mydomain
Don't forget to:
postmap /etc/postfix/main.cf
postfix reload
alexmateescu
Posts: 11
Joined: 05 Dec 2018 14:28

Re: Mailscanner changes FROM address

Post by alexmateescu »

hi

you were perfectly right

the setting is still enabled in v4.

changed that setting and now it does not change the domain anymore.

many thanks.
Post Reply