Mailserverconfusion

6 posts / 0 new
Last post
#1 Tue, 03/29/2016 - 03:26
just_me

Mailserverconfusion

I have a virtualminserver, named server01.example.com. On this i have some virtual hosts sharing one IP. One of the domains is example2.com. The Server IP has a reverse dns entry.

Now i created via letsencrypt the certs and used the server01.example.com certs also for Postfix and Dovecot. Before the cert creation the mailserver domain was mail.example2.com, because i wasn't sure, whether i would have to move that domain to a different server, and i didn't want to have all the users to re-enter mailserver address in case i would have to move it.

After copying the certs to Postfix and Dovecot, i wanted to use the subdomain server01.example.com as mailserver, so i would be able to use it for other domains as well. I entered the server01.example.com as mailserver for the domain example2.com.

Although i have a A record for the subdomain, the emails are bouncing back, telling me this:

Host or domain name not found. Name service error for name=server01.example.com type=A: Host not found

I am really confused and i am wondering, what to do now. Should i use the IP address as mailserver instead of server01.example.com

Any idea?

Best

Tue, 03/29/2016 - 03:34
coderinthebox

You must add that FQDN in your local host file, that way your mail server will resolve it locally.

Visit me at coderinthebox.com

Tue, 03/29/2016 - 07:27
just_me

thank you,l I should have had added, that i try to send the email from an external server; the server01.example.com has a fqdn; so i am wondering what's happening here.

Btw, could i change the fqdn for the server without running into problems or should i consider a reinstall to do this?

best

PS: I digged a little further and found out, that postfix listens to server01.example-example.com and the host in the hostsfile (and hostname) is server01.exampleexample.com) i added the entry server01.example-example.com to the hostfile, so it should know both of them. Would i have to restart bind9 or another service?

Tue, 03/29/2016 - 09:26
andreychek

Howdy,

Did adding it to the hosts file help?

If not, you may also want to create a DNS 'A' record for that. In fact, you may want to do that anyways, having a DNS 'A' record of your hostname is generally a good idea.

-Eric

Tue, 03/29/2016 - 10:54
just_me

Hi Eric,

i added it to the hosts file and created an A Record for that domain. Now it looks like some mails are being processed, and others are not. The error message varies:

said: 550-Requested action not taken: mailbox unavailable 550 invalid DNS MX or A/AAAA resource record (in reply to MAIL FROM command) or: Host or domain name not found. Name service error for name=server01.example.com type=A: Host not found

Some hosts can't send email to my server (with those errors), others are able to. While one of my emailadresses brought up the second error, googlemail didn't show up an error at all but it looks like it hasn't been delivered at all.

Perhaps it is the problem, that i did those SSL things after i installed virtualmin and created virtual hosts? Should i have set up this before adding virtual hosts.

What is the best practice for SSL for Mailservers (including PFS) ?

Thanks and best

Tue, 03/29/2016 - 13:03
andreychek

Howdy,

Well, you aren't seeing an SSL issue there.

You're seeing a DNS issue. For some reason, DNS lookups of that hostname aren't working, but they should be.

That's what I'd be looking into -- why are DNS lookups failing?

If you like, you're welcome to post the name that's failing here so we can do some DNS tests on it. You can always remove the name later.

-Eric

Topic locked