sending mail not working since virtuamin & webmin

27 posts / 0 new
Last post
#1 Sun, 05/24/2009 - 01:12
lex

sending mail not working since virtuamin & webmin

Hi,

surely a newbie question.

I didn't use the install script for installing both webmin and virtualmin, as I had some sites already configured on the server.

Importing virtual server seems fine.

However, on both imported virtual servers and non imported servers, no mail is being sent anymore. So in fact, the whole server (ubuntu 8.04) stopped sending mail (which it did fine before installing the mins).

So I went to http://www.virtualmin.com/documentation/id,troubleshooting_common_problems and read. And to people who know their stuff I guess my problems are pretty obvious: no mx records for example. But then comes the second step: how to solve these things. I really appreciate any kind of help people, this is too much for me.

Here are some details:

[code:1] May 24 10:30:50 ubuntu postfix/trivial-rewrite[17172]: warning: do not list domain gran-canaria-info.com in BOTH virtual_alias_domains and virtual_mailbox_domains

root@ubuntu:~# host -t mx gran-canaria-info.com gran-canaria-info.com has no MX record

root@ubuntu:~# host mail.gran-canaria-info.com mail.gran-canaria-info.com has address 88.208.232.11

root@ubuntu:~# host gran-canaria-info.com gran-canaria-info.com has address 88.208.232.11 gran-canaria-info.com mail is handled by 10 mail.gran-canaria-info.com.

root@ubuntu:~# dig mail.gran-canaria-info.com

; <<>> DiG 9.5.0-P2 <<>> mail.gran-canaria-info.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24239 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION: ;mail.gran-canaria-info.com. IN A

;; ANSWER SECTION: mail.gran-canaria-info.com. 85838 IN A 88.208.232.11

;; Query time: 1 msec ;; SERVER: 213.171.192.249#53(213.171.192.249) ;; WHEN: Sun May 24 10:47:09 2009 ;; MSG SIZE rcvd: 60

root@ubuntu:~# host hostname Host ubuntu not found: 3(NXDOMAIN)

[/code:1]

p.s. when i hit preview on this forum, i get white text on a very light grey background... (firefox 3.0.10)

Post edited by: lex, at: 2009/05/24 01:14<br><br>Post edited by: lex, at: 2009/05/24 01:15

Sun, 05/24/2009 - 03:21
ronald
ronald's picture

it's no easy task to install virtualmin manually.
look at http://www.intodns.com/gran-canaria-info.com

is your hostname Ubuntu? That isn't a FQDN like ns1.penghost.co.uk

aanrader:
would you consider backing up your sites, install the *mins from the install.sh on a clean OS and import the sites again? That would make your adminlife a lot easier.

Mon, 05/25/2009 - 14:34 (Reply to #2)
lex

Ok, i've attached one minute from the log.

Two things that caught my eye:

May 26 00:24:30 ubuntu postfix/trivial-rewrite[6215]: warning: do not list domain gran-canaria-info.com in BOTH virtual_alias_domains and virtual_mailbox_domains

May 26 00:24:29 ubuntu postfix/local[6616]: D7BDE42BD: to=&lt;gci@ubuntu.localdomain&gt;, orig_to=&lt;lex@gran-canaria-info.com&gt;, relay=local, delay=0.61, delays=0.6/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)

and from a dns report:

WARNING: One or more of your mailservers is claiming to be a host other than what it really is (the SMTP greeting should be a 3-digit code, followed by a space or a dash, then the host name). If your mailserver sends out E-mail using this domain in its EHLO or HELO, your E-mail might get blocked by anti-spam software. This is also a technical violation of RFC821 4.3 (and RFC2821 4.3.1). Note that the hostname given in the SMTP greeting should have an A record pointing back to the same server. Note that this one test may use a cached DNS record.

mail.gran-canaria-info.com claims to be non-existent host ubuntu.localdomain: &lt;br /&gt; 220 ubuntu.localdomain ESMTP Postfix &lt;br /&gt;

Some things I've been looking at:

root@ubuntu:/etc/bind# host localhost
localhost has address 127.0.0.1
Host localhost not found: 3(NXDOMAIN)
Host localhost not found: 3(NXDOMAIN)
root@ubuntu:/etc/bind# host ubuntu
Host ubuntu not found: 3(NXDOMAIN)
root@ubuntu:/etc/bind# host penghost.co.uk
penghost.co.uk has address 213.171.223.34
penghost.co.uk mail is handled by 10 mail.penghost.co.uk.
root@ubuntu:/etc/bind# host gran-canaria-info.com
gran-canaria-info.com has address 88.208.232.11

In other words: it seems messed up alright.

I seem to have ben able to 'close' a dns server, now trying to find where I can change the SOA serial. Step by step I guess... [file name=1_minute_maillog.txt size=50282]http://www.virtualmin.com/components/com_fireboard/uploaded/files/1_minu...

Mon, 05/25/2009 - 18:10 (Reply to #3)
Joe
Joe's picture

So, as mentioned earlier by both ronald and I, you <i>need</i> to fix your system hostname. It is wrong. ubuntu.localdomain is a nonsensical hostname for a world-facing server.

You can do that in Webmin in the Networking-&gt;Network Configuration-&gt;Hostname and DNS Client. (Or you can edit /etc/hosts directly.)

Once that's fixed, we're worry about other problems (and we'll want to see the logs again).

--

Check out the forum guidelines!

Tue, 05/26/2009 - 23:31 (Reply to #4)
lex

<b>andreychek wrote:</b>
<div class='quote'>Second, I'd check /etc/hosts, and make sure both the hostname and the FQDN are listed in there for your current IP address.
</div>

Well, does this seem ok to you?

[code:1]
127.0.0.1 server2.penghost.co.uk server2.penghost.co.uk localhost.localdomain localhost
127.0.1.1 server2.penghost.co.uk

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
[/code:1]

Wed, 05/27/2009 - 00:11 (Reply to #5)
Joe
Joe's picture

Using your loopback interface for your public hostnames isn't sensible in a world-facing server. You need:

192.168.1.1 server2.penghost.co.uk server2

Where 192.168.1.1 is your IP address. Get rid of the 127.0.1.1 line. It is not useful in a server with a static IP.

--

Check out the forum guidelines!

Wed, 05/27/2009 - 06:44 (Reply to #6)
ronald
ronald's picture

<div class='quote'>/etc/resolv.conf

nameserver 213.171.192.249
nameserver 213.171.193.245
nameserver 127.0.0.1
domain penghost.co.uk</div>
those IP's are needed there. They belong to your ISP to be able to find your machine.

your machine then needs the entries Eric wrote down in the /etc/hosts

Mon, 05/25/2009 - 02:25
Joe
Joe's picture

We need to see the logs for failed message delivery to know why they're failing.

But, as ronald points out, you must have a sane hostname for your system. It's not optional in any way shape or form. Any server system <i>needs</i> a fully qualified domain name.

--

Check out the forum guidelines!

Mon, 05/25/2009 - 13:11
lex

@ronald:
considering it, but not looking forward to having to reinstall those sites again, maybe i should start writing down what would be necessary and if i can just place a backup back, adjust a few paths here and there - then maybe it's not as bad as it looks now...

About the server:
I've got two servers at this particular place, and i thought i could set them up like this: put ns1.penghost.co.uk on one and ns2.penghost.co.uk on the other. Then, point on both the websites to the right server, as they are divided on them.
I really don't know if this is the way to do it. Thing is, I had to start doing this all by myself rather suddenly after some problems with hosts etc. (I'd rather like to forget that period...)

The server name Ubuntu has shown up since I installed webmin I think, and with Ronald's link I'll try to see if I can google enough info together to improve the way things are now. First I'll try to see what a 'real' servername should look like...

Thanks for your answers people, really do appreciate it!

Mon, 05/25/2009 - 13:30 (Reply to #9)
Joe
Joe's picture

Again, relevant log entries would be helpful in helping you.

--

Check out the forum guidelines!

Mon, 05/25/2009 - 14:02 (Reply to #10)
lex

Joe, I'm really a lot more dumb (in this stuff) then you probably think i am. If you say relevant log entries, could you tell me what logs (entries) you're after?

Mon, 05/25/2009 - 14:12 (Reply to #11)
Joe
Joe's picture

maillog/mail.log is usually the right place to start for mail problems.

--

Check out the forum guidelines!

Tue, 05/26/2009 - 01:47
lex

Thanks for that. I've changed it to server2 (that's 'setup' at the other server, the one that has got penghost.co.uk on it.) I now don't get an error anymore as i did with:

[code:1]root@ubuntu:~# host server2
server2.penghost.co.uk has address 88.208.232.11
root@ubuntu:~# host ubuntu
ubuntu.penghost.co.uk has address 88.208.232.11
Host ubuntu.penghost.co.uk not found: 3(NXDOMAIN)[/code:1]

Tue, 05/26/2009 - 02:26
lex

Well thanks for that people, at least mail is being sent again. Got to go and cook now, getting some visitors soon, will then keep on trying to get rid of the red and yellow dns problems if i haven't had too much wine... (this is spain...)

Tue, 05/26/2009 - 05:32 (Reply to #14)
andreychek

Hi Lex,

Glad it's working!

A few things I would do, just to make sure things are working as you'd expect --

First, I'd make sure that the DNS servers you have listed in /etc/resolv.conf are correct.

Second, I'd check /etc/hosts, and make sure both the hostname and the FQDN are listed in there for your current IP address.

Third, I used one of Ronald's favorite DNS tools, intodns.com, and it appears that the serial number for the two nameservers listed for penghost.co.uk aren't the same.

That may mean that your nameservers are out of sync, or that some other issue could be occurring. You can get some details on that by going to intodns.com, and entering your domain name.

However, if/when you run into any further issues, just let us know and we'll try to lend a hand :-)
-Eric

Tue, 05/26/2009 - 23:01
lex

At 'intoDNS' I see this:

[code:1]<b>DNS Parent sent Glue</b>
The parent nameserver d.gtld-servers.net is not sending out GLUE for every nameservers listed, meaning he is sending out your nameservers host names without sending the A records of those nameservers. It's ok but you have to know that this will require an extra A lookup that can delay a little the connections to your site. This happends a lot if you have nameservers on different TLD (domain.com for example with nameserver ns.domain.org.)

<b>Nameservers A records</b>
Good. Every nameserver listed has A records. This is a must if you want to be found.[/code:1]

Now it's true that I have a nameserver on a different tld than the websites, so is there something I can do about this or is it ok as it is? Can I make it sending out the A records anyway?

You see, I'd like to see everything 'green' with DNS, as it's something I know s**t about. And I've got something weird: I've only imported 3 websites sofar in virtualmin, and two of them don't show up in firefox of chrome (no errors, just a blank page). I can see them ok in IE. So I thought it must be the sites, the headers or so and as both of these are wordpress sites with similar themes, that seemed plausible. However, when I changed the theme back to the default wordpress theme (with all plugins deactivated), that didn't help. Sites: www.hollandsenieuwe.com and www.journalistinturkey.com. Another site, actually just a translation of the latter: www.journalistinturkije.nl which hasn't been imported (yet) into virtualmin does work on all browsers (at least here for me) so that made me think that is might have something to do with virtualmin settings.

Will now start with Andreychek's suggestions, one by one trying to get rid of all problems. Well, a journey of a thousand li...

Tue, 05/26/2009 - 23:05
lex

Sorry for that very wide message people. Wanted to edit the post but are getting this:
&quot;Oops! You've hit a bug in the forum software. We already know about the problem. Apologies for the inconvenience.&quot;

Tue, 05/26/2009 - 23:17
lex

/etc/resolv.conf

nameserver 213.171.192.249
nameserver 213.171.193.245
nameserver 127.0.0.1
domain penghost.co.uk

To be honest, I don't know. I don't know these ip's, and when I look up the domain I get:

Name servers:
ns1.penghost.co.uk 213.171.223.34
ns2.penghost.co.uk 88.208.232.11

Which to me seems more likely as those are the ip's of the two servers. But I don't know enough about DNS to then be able to say &quot;so what is in resolv.conf is wrong&quot;. I'll back it up and try my ip's...

Wed, 05/27/2009 - 00:17
lex

So you're proposing:

88.208.232.11 server2.penghost.co.uk server2

and not:

88.208.232.11 server2.penghost.co.uk server2 localhost.localdomain localhost

or something like that?

Wed, 05/27/2009 - 00:37 (Reply to #19)
Joe
Joe's picture

<div class='quote'>88.208.232.11 server2.penghost.co.uk server2 localhost.localdomain localhost</div>

That makes no sense! ;-)

localhost is magic. Don't go spreading it around. It is always 127.0.0.1.

--

Check out the forum guidelines!

Wed, 05/27/2009 - 00:48
lex

I guess that's definitely an 'option a'... :)

You see, it pretty much all doesn't make sense to me ;)

But all your (and other people here) helping me helps a lot! (Where do you find the time?)

Wed, 05/27/2009 - 05:16 (Reply to #21)
andreychek

I just want to clarify what your /etc/hosts file might look like when you're done. We're tweaking the first line, dropping the second, and adding a new one. So at the end of the day, it should look something like this:

[code:1]
127.0.0.1 localhost.localdomain localhost
88.208.232.11 server2.penghost.co.uk server2

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
[/code:1]

Wed, 05/27/2009 - 08:19
lex

Thanks people, I've all set it the way you told me to.

Sat, 05/30/2009 - 01:43
lex

hmm, don't seem to be able to crack this: a sudoko for beginners:

I've got three wordpress sites with very similar tamplates.

Two of them (all three working), I imported into virtualmin. The third, is just a translation of one of those two but has the same 'theme' etc.

The two imported ones: I can see them fine in IE7, but not in FF or Chrome. Some people report they don't see them in IE7 either.

The not imported one is visible to all.

So where is the problem? I started disabling all plugins in wordpress: no difference. I then changed the theme to the default wordpress theme: no difference.

What happens? I get a real blank page in FF and chrome. No error or page title, just a blank page. Somewhere, there must be an error, but where? I first suspected a wordpress thing, but why does it happen only to the imported wesites... what could be the problems, something to do with the headers? The mod rewrite/htaccess?

Well, whatever I've tried, I haven't found it.

So if someone has an idea...

Not imported:
www.journalistinturkije.nl

Imported:
www.journalistinturkey.com (tranlated copy of the not imported one)
www.hollandsenieuwe.com

Another strange thing: the homepage of those sites is wordpress, dynamic. When I copied the source code of presented page and save that as a static html file, ten that page could be seen by all browsers...

Who's got an idea?

Sat, 05/30/2009 - 01:48 (Reply to #24)
lex

Sorry for all the typos, but I can't edit my posts...

Sat, 05/30/2009 - 02:36 (Reply to #25)
Joe
Joe's picture

If this isn't related to sending email (and it doesn't seem to be), starting a new thread would help us help you. We get about 50 new posts per day. It's really hard to keep up with what we're talking about across all of them without being able to scan through to the top of the thread easily.

We'll also need to see the error_log for these sites, in your new thread.

--

Check out the forum guidelines!

Sat, 05/30/2009 - 02:42
lex

Ok, you're right. I'd figured the history in this thread might be important... I'll create a new thread.

Topic locked