Next Previous Contents

5. How to debug a configuration

Most errors occur when virtual domain settings are related to the DNS. Here are some tests you can do to verify that your setup correct.

One piece of advice: using a POP client (email program) is not that helpful to test this kind of setup. Those program are not informative for such a task. They either work or they don't.

5.1 Checking the DNS

For each virtual domain, you must perform 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 obtained with its IP address. This is either mailhost.va.foo.com, or the official name of the server. The name obtained need not be in the va.foo.com domain. However, it must point to the proper physical server.

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. Furthermore, 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. 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 both queries (with nslookup) are successful, you have done 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?

Execute 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 or /etc/xinetd.d/ipop3.

A tool to do a quick check

The script

/usr/lib/linuxconf/lib/checkvdomain
may be used to do a quick check of the vpop3d installation for a virtual domain. Run it without arguments to learn more.

The script

/usr/lib/linuxconf/lib/testalldomain
reads the file
/etc/named.boot
and extracts all domains defined in it. It then runs 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. This is useful for admins managing tons of vdomains.


Next Previous Contents