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

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.

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 needs a fully qualified domain name.

@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!

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

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?

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

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=<gci@ubuntu.localdomain>, orig_to=<lex@gran-canaria-info.com>, 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: <br /> 220 ubuntu.localdomain ESMTP Postfix <br />

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_minute_maillog.txt[/file]

So, as mentioned earlier by both ronald and I, you need 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->Network Configuration->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).

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]

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…)

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 :slight_smile:
-Eric

At ‘intoDNS’ I see this:

[code:1]DNS Parent sent Glue
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.)

Nameservers A records
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…

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

/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 “so what is in resolv.conf is wrong”. I’ll back it up and try my ip’s…

andreychek wrote:

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

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]

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.

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?

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

That makes no sense! :wink:

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

I guess that’s definitely an ‘option a’… :slight_smile:

You see, it pretty much all doesn’t make sense to me :wink:

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