Change dovecot hostname

Scott W. Sander scottwsx96 at gmail.com
Fri Aug 19 18:43:14 UTC 2016


I have noticed that the name of my private server running dovecot appears
in email headers rather than the public-friendly name of my server.

Is there a method to specify an alternate server name for the dovecot
server to use for itself in the dovecot configuration files?  I performed a
few Google searches and was not able to find the answer to my question.

-------

user at server1:~$ dovecot --version
2.2.9
user at server1:~$ dovecot -n
# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.16.0-77-generic x86_64 Ubuntu 14.04.4 LTS ext4
auth_mechanisms = plain login
info_log_path = /var/log/dovecot.log
log_path = /var/log/dovecot.log
mail_location = maildir:/var/mail/vhosts/%d/%n
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = scheme=PLAIN username_format=%u /etc/dovecot/dovecot-users
  driver = passwd-file
}
protocols = " imap lmtp pop3"
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
}
service imap-login {
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service pop3-login {
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}
ssl = required
ssl_cert = </etc/ssl/certs/server1_combined.pem
ssl_key = </etc/ssl/private/server1_key.pem
userdb {
  args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
  driver = static
}


More information about the dovecot mailing list