postconf -e 'myhostname=mail.example.com'

Category: Mail Servers & Postfix

postconf -e 'myhostname=mail.example.com'

Change a Postfix setting in main.cf

Edits main.cf directly, replacing or adding the named parameter before the next reload. Values with spaces or shell metacharacters must be quoted. Run `postfix reload` afterwards so running processes pick up the change.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.