1

I would like to excuse in advance, if my question has already been answered before but im going crazy since a week now... I'm not new to this but after a while in another job, my "skills" are totally rusty. At the moment im running a vServer with Debian 7.9 Plesk 12.5 was preinstalled, postfix & dovecot also.

I don't want to start acting like a webhoster... i just want to host 5 up to 10 domains on this server to have them at one place. My Problem now is, that the emails always where blocked or marked as spam, because of the SMTP Hostname does not match the mail.domain.xyz.

When I telnet mail.domain.xyz, it shows the vServs hostname, what if i understood everything correctly... will cause issues with alot of email services. rDNS entry, everything is done.

Isn't it possible to configure postfix to use $mydomain instead of $hostname? I've found alot of workarounds but nothing worked out for me...

Feel free to ask me further questions about my configuration if you need to know!

J.Doe
  • 11
  • 2
  • `mail.domain.xyz` doesn't seem to exist. Are you sure that's your domain name? – Michael Hampton Mar 05 '16 at 18:12
  • ofcourse the real domain ist not mail.domain.xyz. The real Domain ist mail.natura-dent.de – J.Doe Mar 05 '16 at 18:27
  • Postfix reports your hostname as `germanus.fastit.net`. But the DNS for that hostname is not the same IP address. – Michael Hampton Mar 05 '16 at 18:34
  • Right Michael, thanks so far! I noticed the same. This is the Hostname of my vServer. But isn't it possible to show the hostname "domainbased"? I really don't get it. I'm using a second ip for this domain too. – J.Doe Mar 05 '16 at 18:37
  • Why is that the hostname? It should be set to a name within a domain that you control. – Michael Hampton Mar 05 '16 at 18:38
  • Yeah and thats my issue. Telnet banner always show my vServer Hostname as ELO or ist it HELO?! How do i need to configure my vserver to show domainbased ELO? – J.Doe Mar 05 '16 at 18:39
  • 2
    Michael was of course referring to the [correct method to obfuscate domains](http://meta.serverfault.com/a/6063/37681) ... You want whatever postfix uses to identify itself to other mail servers; [`myhostname`](http://www.postfix.org/postconf.5.html#myhostname) to match with both the ip-address you use (in the A record for that hostname) and how the reverse DNS record for your ip-address is configured. – HBruijn Mar 05 '16 at 18:40
  • Change the system hostname, then. – Michael Hampton Mar 05 '16 at 18:42
  • Changing system hostname is working, i tried it. But this will only work with one domain then... the other domains, hosted on the same system will be marked as spam then. – J.Doe Mar 05 '16 at 18:45
  • 2
    Whatever the hostname is configured has no bearing at all on behalf of which (additional) domains a mailserver is allowed/configured to send email... – HBruijn Mar 05 '16 at 19:13

1 Answers1

2

Pick a domain to use for email (with FCrDNS) and stick with it, use spf on all domains to authorize the ip, your problem is ehlo and mail from do not match and you haven't configured spf to authorize the other the primary domain to send on behalf of others.

Same way Google apps or office 365 do, you don't see them white labeling their systems per domain do you?

Hosting 1 or 100 domains, you're still a webhoster, if you don't want that then get a reseller account with any cpanel host.

However, you can create additional postfix transports with different smtp_helo values, create sender maps and over complicate the setup, odds are your ISP will only give you one reverse dns record as duplicates will respond in round robin fashion, causing more problems.

Jacob Evans
  • 7,886
  • 3
  • 29
  • 57