1 (edited by rombosgt 2019-12-10 21:12:50)

Topic: Correct hostname value

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? Downloadable installer
- Linux/BSD distribution name and version: Debian 9.8.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi, our mail server (iRedMail) "mail.example.com" is installed on a machine (hostname - "machine1") which is part of our local domain - "domain.com.ua".

I read your manual https://docs.iredmail.org/change.server.hostname.html but please help me figure out where I need to specify the local domain and where is the mail?

My files now look like this:

-----------------------------------------------------------------------
/etc/hostname

machine1
-----------------------------------------------------------------------
/etc/hosts

127.0.0.1 localhost
10.10.10.1 mail.example.com machine1.domain.com.ua machine1

(10.10.10.1 - local ip address of "machine1")
-----------------------------------------------------------------------
/etc/mailname

machine1.domain.com.ua
-----------------------------------------------------------------------
/etc/postfix/main.cf

#hostname
myhostname = machine1.domain.com.ua
myorigin = machine1.domain.com.ua
mydomain = machine1.domain.com.ua
-----------------------------------------------------------------------
/etc/amavis/conf.d/50-user

# Set hostname.
$myhostname = 'machine1.domain.com.ua';
$mydomain = $myhostname;
$localhost_name = $myhostname;

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Correct hostname value

In /etc/hosts, you should list the server hostname in "127.0.0.1" line, and the FQDN first:

127.0.0.1 machine1.domain.com.ua machine1 localhost

We don't use /etc/mailname, it's used by other applications.

3 (edited by rombosgt 2019-12-11 14:36:23)

Re: Correct hostname value

Ok, and what about main.cf file (myhostname, mydomain, myorigin)? It's a problem for me because all our DNS records are set for mail.example.com not for our local domain (domain.com.ua)

4

Re: Correct hostname value

Oops, your server hostname must be resolvable by DNS query. Although it's ok to run mail server in DMZ with NAT, but the hostname will be written in mail headers you sent out, and recipient servers may verify it by DNS query.

In this case, your server should use "mail.example.com" as server hostname.