John Adamski (Work Account):
> SUSE Linux Enterprise Server 11
> mail_version = 2.9.4
>
> Our ERP recently was migrated from a HPUX/sendmail server to a SUSE/postfix server. I'm trying to get postfix configure to handle from/reply-to the way we want to do.
>
> We have two 'domain' that the ERP can generate emails from, the first is for students (
[hidden email]) and the second is staff/faculty (
[hidden email]).
>
> We can't have emails say they are from the server (
[hidden email]), this needs to be changed to
[hidden email].
>
> We also have a couple users accounts that need to stay local i.e. userX and userY.
>
> I have been trying to get the configuration right, mostly modifying the masquerade and myorigin settings. But haven't got the right combination.
>
> Right now emails from in the form of
[hidden email] get delivered correctly with the correct from/reply-to. Emails from the form of
[hidden email] get changed to
[hidden email], which makes the reply-to address worng and someone replying gets a bounce. The batch processes that generate the from/reply-to address as
[hidden email] are correctly getting changed to
[hidden email]
>
> The problem is with the student domain, how do I keep it intact so the from/reply-to will be correct? i.e.
[hidden email] stays
[hidden email], but at the same time
[hidden email] gets changed to
[hidden email]?????
>
> any suggestions on how to proceed.
>
>
> to recap:
>
> email from
[hidden email] goes out using
[hidden email] email from
[hidden email] goes out using
[hidden email] email from userX & userY stays local email from
[hidden email] gets rewritten to
[hidden email]
I wrote Postfix, do don't dismiss this advice.
First of all, the solutions for staff and students can be
implemented separately.
Second, the fact that one domain is a subdomain of the other is
irrelevant. Just don't use masquerade_domains. It should have
been removed years ago.
Example: domain with multiple primary MX servers
Set primary MX records to the servers that receive mail for the domain
Don't use masquerade_domains.
set mydomain = the domain, not the server
set myorigin = $mydomain
set mydestination = $mydomain, $myhostname
Use virtual_alias_maps to direct mail for user@domain to
[hidden email]
(for example, LDAP based).
Example: domain with one primary MX server
Set primary MX record to the server that receives mail for the domain
Don't use masquerade_domains.
set mydomain = the domain, not the server
set myorigin = $mydomain
set mydestination = $mydomain, $myhostname
Wietse