Virtual email domain: How to debug a configuration

Next Previous Contents

## 5. How to debug a configuration

Most errors done when setting virtual domains are related to the DNS. Here are some tests you can do to verify that your setup is done properly.

One advise: Using a POP clients (email program) is not that helpful to test that kind of setup. Those program are not informative at all for such a task. They either work or they don't.

## 5.1 Checking the DNS

For each virtual domain, you must have done some DNS work. We will use the va.foo.com domain as an example. Here are the steps

### The MX

The command

> `

>             nslookup -q=mx va.foo.com

> `

should print something useful. At least the name of the email server should be obtain with its IP address. This is either mailhost.va.foo.com, or the official name of the server. The name obtain need not be in the va.foo.com domain. It must point to the proper physical server though.

### The virtual mail server

The mailhost.va.foo.com must be defined in the DNS. Here I am using mailhost. It could be pop.va.foo.com, or whatever. The following command

> `

>             nslookup mailhost.va.foo.com

> `

should produce an IP number. Further, the following command

> `

>             nslookup the_IP_number_you_got

> `

should print mailhost.va.foo.com. If you do not get this, then the virtual POP server won't work at all. Really. End of the game. You need to have proper reverse lookup on this IP number. Linuxconf does it magically if the special reverse lookup domain is defined on the same DNS as the virtual domain.

So if you have both queries (with nslookup) successful, you have the hardest part.

### Is there a server listening

Then you do the following command

> `

>             telnet mailhost.va.foo.com

> `

This should connect to the physical server. This proves that the IP alias is properly installed.

### Is there a virtual POP server listening

Do the following command to see if vpop3d is properly installed. If this command is producing the proper greeting, not much can go wrong.

> `

>             telnet mailhost.va.foo.com pop-3

> `

You should get

> `

>             +OK Virtual va.foo.com POP3 Server (Version 1.004) ready.

> `

The "va.foo.com" is the key here. If you are not getting this, then the virtual domain is simply not defined, or vpop3d is not installed in /etc/inetd.conf.

### A tool to do a quick check

The script

> `/usr/lib/linuxconf/lib/checkvdomain`

may be use to do a quick check of the vpop3d installation for a virtual domain. Run it without argument to learn more.

The script

> `/usr/lib/linuxconf/lib/testalldomain`

reads the file

> `/etc/named.boot`

and extract all domain defined in it. It then run the script checkvdomain (assuming that there is a virtual host mail for each vdomain) on each domain. It reports if the domain is properly configured or not. Useful for admin managing tons of vdomains.

Next Previous Contents