Postfix. Trivial Rewrite uses rDNS not $myorigin

Firstly Hello Linode forums!

I am currently using a 3ird party DNS service which I think might me the cause of the problem.

I am having a problem with using Canonical mapping on Postfix, it seems to be using the rDNS address in the reply to envelope / header, not $myorigin

When I send and email from a local user (not canonically mapped) the return address is fine ie user@mydomain.com. The problem occurs when I send from a canonically mapped user, i.e. joe.bloggs@mydomain.com, because the user is canonically mapped the trivial-rewite program changes the header / envelope addresses, but the issue is that for some reason it uses the rDNS address, so the recipient sees joe.bloggs@mail.members.linode.com!

How can I change it so that canonically mapped users use $myorigin ?? At some point i will be using virtual domains so this is doubly important, can i masquerade them somehow?

Also how do I go about sorting rDNS properly, I don;t seem to be able to migrate to Linodes DNS manager properly, i will need this as SPF / rDNS will no doubt mean i get blocked at some point.

Thanks a lot fellow linoders!!

6 Replies

Check out http://www.postfix.org/ADDRESS_REWRITIN … #canonical">http://www.postfix.org/ADDRESSREWRITINGREADME.html#canonical

To configure rdns check out http://library.linode.com/dns-guides/co … de-manager">http://library.linode.com/dns-guides/configuring-dns-with-the-linode-manager around half way down.

Thanks For the reply obs!

I have managed to get linode to set the rDNS now, I had to add a slave DNS zone, I assume this is the correct configuration.

Also I have created a generic SMTP map, that changes mail.members.linode.com to mydomain.com. I think it's a hack but it fixes the problem for now!

mail.members.linode.com is still mentioned, I'm guessing i will have to wait for full DNS replication to occur!

You shouldn't have to add a slave dns zone, you should just at wherever your nameservers are set an A record to your linode ip then wait for propagation and set it in the rdns.

You will always see your hostname in the headers of emails you should see something like this:

Return-Path: <email@domain.com>

Received: from hostname (hostname [ipaddress])

by mx.google.com with ESMTP id q34si12325268ybk.61.2010.12.18.20.05.01;

Sat, 18 Dec 2010 20:05:02 -0800 (PST)

Received-SPF: pass (google.com: domain of email@domain.com designates ipaddress as permitted sender) client-ip=ipaddress;

Received: by hostname (Postfix, from userid 1002)

id C219A61CD; Sun, 19 Dec 2010 04:05:01 +0000 (UTC)

To: recipient@domain.com

From: email@domain.com

Reply-To: email@domain.com

Message-Id: <20101219040501.C219A61CD@hostname>

Replacing email@domain.com with the sender, hostname with the server hostname and ipaddress with the server ipaddress

Assuming rDNS worked, give it 48 hours and it should show the new host name in the headers.

You shouldn't have to add a slave dns zone, you should just at wherever your nameservers are set an A record to your linode ip then wait for propagation and set it in the rdns.

You will always see your hostname in the headers of emails you should see something like this:

Return-Path: <email@domain.com>

Received: from hostname (hostname [ipaddress])

by mx.google.com with ESMTP id q34si12325268ybk.61.2010.12.18.20.05.01;

Sat, 18 Dec 2010 20:05:02 -0800 (PST)

Received-SPF: pass (google.com: domain of email@domain.com designates ipaddress as permitted sender) client-ip=ipaddress;

Received: by hostname (Postfix, from userid 1002)

id C219A61CD; Sun, 19 Dec 2010 04:05:01 +0000 (UTC)

To: recipient@domain.com

From: email@domain.com

Reply-To: email@domain.com

Message-Id: <20101219040501.C219A61CD@hostname>

Replacing email@domain.com with the sender, hostname with the server hostname and ipaddress with the server ipaddress

Assuming rDNS worked, give it 48 hours and it should show the new host name in the headers.

You shouldn't have to add a slave dns zone, you should just at wherever your nameservers are set an A record to your linode ip then wait for propagation and set it in the rdns.

You will always see your hostname in the headers of emails you should see something like this:

Return-Path: <email@domain.com>

Received: from hostname (hostname [ipaddress])

by mx.google.com with ESMTP id q34si12325268ybk.61.2010.12.18.20.05.01;

Sat, 18 Dec 2010 20:05:02 -0800 (PST)

Received-SPF: pass (google.com: domain of email@domain.com designates ipaddress as permitted sender) client-ip=ipaddress;

Received: by hostname (Postfix, from userid 1002)

id C219A61CD; Sun, 19 Dec 2010 04:05:01 +0000 (UTC)

To: recipient@domain.com

From: email@domain.com

Reply-To: email@domain.com

Message-Id: <20101219040501.C219A61CD@hostname>

Replacing email@domain.com with the sender, hostname with the server hostname and ipaddress with the server ipaddress

Assuming rDNS worked, give it 48 hours and it should show the new host name in the headers.

>.> sorry for the duplicates I had some weird error about mail relaying crop up on the forums

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct