If I use postfix for mail relay, so is myhostname / mydestination important?

Posted on

If I use postfix for mail relay, so is myhostname / mydestination important? – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, email, postfix, smtp, email-bounces.

I use postfix to relay mail to 3rd party SMTP and never sent out email directly, and of course I never receive email.

So If I set myhostname / mydestination to sth like fake.mydomain.com, which mydomain.com is valid domain, but

  1. fake.mydomain.com record does not exist
  2. the IP of machine does not have PTR point back to fake.mydomain.com

Are there any drawbacks in the above settings?

Solution :

The value of $mydestination will be important in the sense that it will decide what is to be delivered locally instead of sent to another server. I suppose in your case you will just want to make sure that it is set so that it will not interfere.

$myhostname should be set to the canonical FQDN for this server (which should match the PTR), this is used as the default value for such settings as what to use in the HELO / EHLO commands, etc.

If you set myhostname then that will be the default value for myorigin.

I would just set myorigin = domain.tld and see if that works for you. As long as the mx records for domain.tld do not point to your host, everything should be ok.

Leave a Reply

Your email address will not be published.