3

In order to migrate to a new mailserver with little dns problems/downtime, I have set up a second postfix that is currently accessible on a subdomain mx record, eg. the main postfix accepts mail for [email protected] while the second postfix also accepts mail for [email protected].

I added a forwarding rule to postfix saying that postfix should forward mail destined for [email protected] to [email protected] (for regular local delivery) and to [email protected]. Local delivery still works as expected, but when trying forward the mail to the new mx, postfix appeds the domain part at the end of the forwarding address, resulting in [email protected], which of course fails and the mail bounces.

Why does postfix mess with the alias name in that way and how can I turn that of?

2 Answers 2

2

That sounds complicated. Why not just lower the TTL on the MX record. Leave the old server intact temporarily. Change the MX record. Wait until the TTL expires and you confirm that email is flowing to the new server. Collect any remaining email on the old server, and finally, decomission the old server.

0

By default, Postfix will append the server's domain to the end of locally submitted mail. This is described here: Postfix Configuration Parameters: append_dot_mydomain (default: yes)

append_dot_mydomain (default: yes)
With locally submitted mail, append the string ".$mydomain" to addresses that have no ".domain" information. With remotely submitted mail, append the string ".$remote_header_rewrite_domain" instead.

Note 1: this feature is enabled by default. If disabled, users will not be able to send mail to "user@partialdomainname" but will have to specify full domain names instead.

Note 2: with Postfix version 2.2, message header address rewriting happens only when one of the following conditions is true:

The message is received with the Postfix sendmail(1) command,
The message is received from a network client that matches $local_header_rewrite_clients,
The message is received from the network, and the remote_header_rewrite_domain parameter specifies a non-empty value.
To get the behavior before Postfix version 2.2, specify "local_header_rewrite_clients = static:all".

You can either change your mail forwarding rule by adding a trailing dot, or turn append_dot_mydomain off in main.cf.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .