Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

For #myhostname, I should uncomment and put my hostname, i.e. the name I gave my VPS, right? Or does it just go myhostname = mydomain.net, in other words don't edit the phrase 'myhostname' except to uncomment?

And for #myhostname = virtual.domian.tld is that to put a subdomain?

Should I add a listing for all including with and without www?

share|improve this question

1 Answer 1

up vote 8 down vote accepted

The myhostname should be set to the FQDN of your mail server. For example, if your server's hostname is "mail" and your domain is "example.com", your FQDN is "mail.example.com". The directive would look like this:

myhostname = mail.example.com

On a Linux system, you can get your FQDN using the hostname command:

hostname --fqdn

This should match the PTR record for the primary IP on the machine.

See the Postfix documentation for myhostname.

For accepting mail for subdomains which are not the server's hostname, you can use the mydestination directive:

mydestination = mail.example.com, example.com, www.example.com
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.