1

Topic: Postfix configuration - Hostname parameters

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.7
- Linux/BSD distribution name and version: Ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Not yet
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello

I wanted to ask your expert opinion about whether it is possible to set multiple myhostname, myorigin and mydomain parameters in Postfix main.cf so that when we send email messages from different domains hosted on iRedMail server the corresponding values are injected into the message header depending on the domain/mailserver?

Thank you in advance

----

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

2

Re: Postfix configuration - Hostname parameters

what do you want to achieve?

please, read postfix documentation about myhostname:
http://www.postfix.org/BASIC_CONFIGURATION_README.html

I've never seen than postfix have two or more myhostname (I might be wrong)

do you want One Big iRedMail Serwer and change hostname when you send e-mail from different domain, example:

when domain A => hostname: mail-a.domain.a
when domain B => hostname: mail-b.domain.b

that you want?

3

Re: Postfix configuration - Hostname parameters

Yes, correct.  This is my question.

One iRedMail server with multiple domains.  Host name is mail.abc.com
Mail servers are:

mail.abc.com
mail.xyz.com

I was wondering whether it is possible to pass unique myorigin, mydomain and myhost for each server.
Thanks

4

Re: Postfix configuration - Hostname parameters

Like i said before: I might be wrong
but I've never seen two or more myhostname in postfix config

postfix isn't like apache or nginx where you can set ServerName for each site.

BTW its normal that your domain is abc.com and you send email form host: mail.xyz.com

even if you buy email support in Gmail, Yahoo or something else, you will send email as host (eg.) mail-123454.gmail.com, hostname not changing for your domain.

We use iRedMail for thirty domains - no problem (someone use for hundred) but is only one myhostname no matter what domain.

5

Re: Postfix configuration - Hostname parameters

The mail headers are mostly used by MTA, not read by end users.
Why do you want to insert different hostnames in mail?

6

Re: Postfix configuration - Hostname parameters

... and, as said before... just add SPF records for each mail domain You are hosting, allowing your "big.iredmailhost.domain" as sender. This is the way to do it, also if You host Your own domain at google or other mail server providers

7

Re: Postfix configuration - Hostname parameters

Yes, I agree with everything what kazix is saying - host name is different from sending domain.  I was just looking for a way to work around the warning message which MXToolbox is generating about the mismatch between the mail server's CNAME and the SMTP banner.  MXToolbox says it is not an error, it is a warning.

I guess the only way to work around this is to use multiple public IP addresses assigned to the same iRedMail host and create multiple PTR records for each mail domain in the reverse DNS.

8

Re: Postfix configuration - Hostname parameters

Ascar wrote:

I was just looking for a way to work around the warning message which MXToolbox is generating about the mismatch between the mail server's CNAME and the SMTP banner.  MXToolbox says it is not an error, it is a warning.

It's very common that one server serves many mail domains, so this warning doesn't matter.