Email problems

Hi, I have tried to solve my issue by browsing the forums but I am getting even more confused, so sorry if this question has already been answered elsewhere.

I am not receiving email to my email accounts.

I have set up my virtual server www.jmb-webserver.com and the A records have been set up with the domain registrar. The websites in virtualmin work fine. I have setup a subdomain mail.jmb-webserver.com and set the IP address to 92.27.7.240 which is my static IP. I have set the MX record of this subdomain to mail.jmb-webserver.com priority 5 as that is the information shown in the records in Virtualmin.

Using pingability.com I get this report:


Server Name
jmb-webserver.com

IP 92.27.7.240

Location United Kingdom

Mail Server For *@jmb-webserver.com

MX Priority 0

Connect Response Time 399ms

Server ‘Hello’ Line
220 jmb-webserver.com ESMTP Postfix (Ubuntu)

Open Relay?
No Problems Found

RDNS Entry
host-92-27-7-240.static.as13285.net.

Mail Server Info
Info Type
Message

Information
The mail server accepted email for ‘abuse@jmb-webserver.com’ email address as it should have (250 2.1.5 Ok).

Information
The mail server correctly rejected email to ‘email_validation_service@domaincheckingservice.pingability.com’ (554 5.7.1 email_validation_service@domaincheckingservice.pingability.com: Relay access denied)


Using jmb-webserver.com/squirrelmail I can login using the admin@ account I set up and can send email out. This was received:

From: “admin.jmb-webserver@jmb-webserver.comadmin.jmb-webserver@jmb-webserver.comAdd to Contacts

However, when I send to admin@jmb-webserver.com I get nothing.

My router is set to forward ports 21, 25 and 80 for FTP, mail and http.

Interestingly, when I receive the mail I sent and reply in Outlook, I get an error:


Sorry, we were unable to deliver your message to the following address.

admin.jmb-webserver@jmb-webserver.com:
Remote host said: 550 5.1.1 admin.jmb-webserver@jmb-webserver.com:

Recipient address rejected: User unknown in virtual alias table [RCPT_TO]


Please help!!!
Many thanks in advance

John

Howdy,

If you go into System Settings -> Re-Check Config – does that report show any problems when it runs, or does it show everything as being okay?

However, when I send to admin@jmb-webserver.com I get nothing.

For that kind of problem, you may want to take a look at the email logs… either /var/log/maillog, or /var/log/mail.log, depending on your distro. You can use those to track down where that email is going.

-Eric

Hi,

Thanks so much for the reply. I did stage 1 as you suggested and I got this (which may explain things)


 Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server. Either add 127.0.0.1 to the list of DNS servers, or turn off the BIND feature on the module config page.

… your system is not ready for use by Virtualmin.


Now the next question is…how to do this! John

Is your server acting as a nameserver for all the domains running on it? Or is your DNS being hosted elsewhere?

-Eric

I have it set for being the nameserver. The main domain is registered and has nameservers at 1and1.co.uk

Okay, if your server is setup as a nameserver, you would want 127.0.0.1 listed in the /etc/resolv.conf file.

However, that should be in there by default – Virtualmin sets that up during the installation. If it’s not in there, that means something removed it. You may want to look at this doc here for some ideas on why that may have happened and how to fix it:

http://www.virtualmin.com/documentation/dns/faq

Hi, Ive followed all advice and instructions and added 127.0.0.1 to the DNS - thanks so much. I now have the following message:

… your system is ready for use by Virtualmin.

However, when I reboot the DNS server drops the 127.0.0.1 I added and replaces it with the ones I added when setting up (the same ones my ISP gave me - I didn’t realise these were not needed here).

Also, mail is coming and going (once I add 127.0.0.1 and don’t restart). But the email address when received from admin@jmb-webserver.com shows as admin.jmb-webserver@jmb-webserver.com and I can’t reply as the address is reported as unknown. admin@ works fine.

John

However, when I reboot the DNS server drops the 127.0.0.1

Yup! There’s a few potential causes for that… the most common ones (and how to fix them) are explained in that document I linked to. Take a peek at that again, chances are you either have a DHCP issue, or you have a VPS provider that’s overwriting your resolv.conf.

But the email address when received from admin@jmb-webserver.com shows as

What email client are you using? In most email clients, you’d need to set the correct From address.

-Eric

The router is set to dchp but the server is fixed IP - and the dns records are not the ones in the router - they were the ones I used to use at the time I setup virtualmin but changed them to opendns recently. So I don’t know why they are re-appearing.

VPS provider? Not sure what this is. I am running virtualmin on my own pc.

Email client - I am using Outlook but I also sent an email from admin@ to admin@ using squirrelmail (on the virtual server) and I also get admin.jmb-webserver@jmb-webserver.com


Update on email - Format for usernames that include domain setting intemplate settings was set to name.domain - changed to name@domain and now it works fine. Updated all templates.


John

Update on email - Format for usernames that include domain setting intemplate settings was set to name.domain - changed to name@domain and now it works fine. Updated all templates.

That’s great, I’m glad you got it working!

-Eric

Hi, just a quick update.

Having followed all instructions I was still getting those odd DNS addresses that were not my current ones in the router (ruling out DCHP issues) and I went through every option in webmin and virtualmin pulling my hair out.

I manually set the dns to 127.0.0.1 but it continually changed back to the two I set up when I installed Virtualmin and Ubuntu. Then it hit me that it must be the network card settings and so I changed the IP4 settings in the Ubuntu network settings to 127.0.0.1 and guess what…Virtualmin picked it up! So, all along it wasn’t virtualmin but my network card settings!

Thank you so very much for your support - greatly appreciated!

John