[SOLVED] - Email was working, but now it isnt

17 posts / 0 new
Last post
#1 Thu, 07/02/2009 - 10:04
theashman

[SOLVED] - Email was working, but now it isnt

Hi people, I setup a few domains on my VPS (installed virtualmin via the install.sh on Ubuntu 8.04).

I was testing the email and ftp and such and it seems that incoming email isnt being delivered. Outgoing gets sent fine, but when sending an email i get the following email back saying it didnt work:

This is the mail system at host HOSTNAME.

I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can delete your own text from the attached returned message.

                   The mail system

<domain@HOSTNAME> (expanded from <domain@domain.co.uk>):
    mail for HOSTNAME loops back to myself
Reporting-MTA: dns; HOSTNAME
X-Postfix-Queue-ID: 70EC47FE620
X-Postfix-Sender: rfc822; email address it was sent from
Arrival-Date: Thu,  2 Jul 2009 15:58:45 +0100 (BST)

Final-Recipient: rfc822; domain@HOSTNAME
Original-Recipient: rfc822;domain@domain.co.uk
Action: failed
Status: 5.4.6
Diagnostic-Code: X-Postfix; mail for HOSTNAME loops back to myself

it was working last night (GMT) but has since stopped working correctly. I didn't make any modifications to the server either.

any help/adivce is appreciated!

Thu, 07/02/2009 - 10:07
andreychek

What happens if you go into System Settings -> Re-Check Config -- does it show anything unusual?

-Eric

Thu, 07/02/2009 - 10:18
theashman

Hmmm, i got this error:

The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active ..
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.

I wonder why it suddenly broke :(

what should i do to fix it? just add 127.0.0.1 to where it says?

thanks

Ashley

Thu, 07/02/2009 - 11:06 (Reply to #3)
andreychek

Yeah, I'd recommend following Ronald's advice for adding 127.0.0.1 into the resolv.conf.

As for why it happened -- is your server using DHCP? It's possible the DHCP service is overwriting your resolv.conf file whenever it renews your IP address lease.

Hard coding a static IP could solve that. Or, there may be an option for telling DHCP not to change your DNS servers.

-Eric

Thu, 07/02/2009 - 10:44
ronald
ronald's picture

yes you need to add the 127.0.0.1 and then save. Not apply configuration else it will disappear again..Webmin - networking - Network Configuration - Hostname and DNS Client - add it to DNS servers and click save, that's it

Thu, 07/02/2009 - 11:37
theashman

Hi thanks for the advice.

I followed the advice of going into webmin and tested it. I still got the error mail back to the sending address.

How can I test for dhcp? Where is the resolv.conf? Or does the webmin instructions edit that file?

Thanks

Ashley

Thu, 07/02/2009 - 11:51 (Reply to #6)
andreychek

So just to verify -- does the "re-check config" work now?

(we can come back to the DHCP settings in a moment)

-Eric

Thu, 07/02/2009 - 11:56
theashman

Hi. Sorry I should tested that before posting (doh!)

I can confirm that the re-check config is now all good.

Like I said however, I tested emailing an address and still got the error email.

Thanks Ashley

Thu, 07/02/2009 - 13:42 (Reply to #8)
andreychek

Do emails for other domains work?

Ie, is it just this one domain that's having trouble, or do they all have similar issues?

-Eric

Thu, 07/02/2009 - 13:57
theashman

hi eric, i can confirm that it is all domains that are having the same issue with emails. any idea as to what it could be?

Thanks Ashley

Thu, 07/02/2009 - 13:59
andreychek

No, not really. Things shouldn't just randomly break :-)

I can take a quick peek if you like -- I'll need that login info again though -- you can send it to eric@virtualmin.com.

Can you include an example email address that isn't working in your email?

Thanks,

-Eric

Thu, 07/02/2009 - 14:23
andreychek

Looks like this may have been a hostname related issue.

I made sure the current hostname was set in "mydestination" in /etc/postfix/main.cf, restarted Postfix -- and the test email I sent seemed to go through!

-Eric

Thu, 07/02/2009 - 14:32
theashman

I have to thanks again to Eric. He's done so much and he knows exactly what he's doing!

Sat, 08/29/2009 - 21:56
obrigado

Don't want to raise threads from the dead, but in case it's helpful I can report the same problem with 3.72.gpl — which was fixed by modifying /etc/postfix/main.cf as Eric described.

Thanks!

Sat, 08/29/2009 - 22:01 (Reply to #14)
andreychek

Howdy,

Thanks for the info!

Do you happen to recall if anything on your system changed around the time it stopped working? Had your hostname changed along the way or so?

I'm just trying to piece together how it is this particular issue arises.

Thanks!

-Eric

Sat, 08/29/2009 - 22:10 (Reply to #15)
obrigado

I'm not sure if this is the direct cause, but it's the last thing I remember doing before noticing the email failures:

Under "Edit Virtual Server" --> "Enabled Features" I unchecked the "Mail for domain enabled?" box (which had been checked since the creation of the virtual server).

This, as expected, disabled mail for that domain. However, I later went back to re-enable mail for domain via the same checkbox.

After doing this, I noticed that deliveries to all virtual servers were failing. Mail heading outbound worked fine the whole time.

Thanks again for your generous support. The forum archives have been invaluable to getting my server working.

Fri, 09/11/2009 - 08:38
exigo_admin

I can confirm that if you change the host name in VirtualMin's gui, it does not update etc/postfix/main.cf

Topic locked