# Qmail - less fun than watching grass grow.

## CasimirEffect

I've just set up a qmail server and it seems to be working, i.e. it can send and reieve email. This process, however, takes anywhere from two to four minutes from an Outlook Express client after timing out several times. So far I've watched log activity and nothing seems to happen at all for the first few minutes. I've also added the -H and -R arguments to the tcpserver startup script. Does anyont have any ideas? This is my first bout with qmail and there's nothing in LWQ or on the qmail man pages that I was able to find that even suggests a problem like this.

----------

## rac

Is there a chance that reverse DNS queries are timing out?  Do you have a local dnscache running?  How about local host name entries in /etc/hosts?

----------

## CasimirEffect

 :Embarassed:  Um. . .  There is a good chance that the DNS queries are timing out because the system is in no way connected to a DNS server, yet. (It's a single server and client for testing now.) I take it that a DNS is required by qmail (and any other mail server). If not how can I get around it. The client's IP is configured by DHCP, is there a way to add it to /etc/hosts without forcing it to have a static IP?

----------

## mgirard

Are you interested in running a local DNS cache? That would be my suggestion. I'll walk you though it if you are interested...

-Mg

----------

## mooman

If CasimirEffect isn't, I am!

My gentoo project is a home lan mail and dns proxy.  I'm still in the "work the kinks out of stage 3" part, but will be tackling the apps before long.  Any wisdom or insight in the dns part is appreciated...

Thanks!

----------

## splooge

emerge bind

rc-update add named default

/etc/init.d/named start

=)

----------

## mgirard

Well BIND would work, I have to say that it is an archaic and etremely insecure setup, IMHO. I figure if you are already running qmail and svscan you might as well run djbdns.

Here is what you do:

```
emerge djbdns
```

This emerges basically 3 programs: axfdns, dnscachex, and tinydns. For our example we do not need to run or worry about axrdns (since we will not be doing any zone transfers) or dnscachex (since we will not be needing a DNS cache). Remember, this is a simple setup.

Now that leaves us with the actual DNS server, tinydns, to setup. So let's go ahead and configure it.

```
tinydns-setup
```

That should walk you through all of the major configuration options. It is worth noting that all of the config stuff is stored in /var/tinydns. So when you are looking to change something, start there.

Also, I recommend disabling axfdns and dnscachex.

```
rm /service/axfrdns

rm /service/dnscachex

/etc/init.d/svscan restart
```

Remember that you will have to edit /var/tinydns/root/data to add machine names and IP addresses. More information can be found at the djbdns homepage -> http://cr.yp.to/djbdns.html

Hope that helps!

----------

## mgirard

 *mooman wrote:*   

> My gentoo project is a home lan mail and dns proxy.  I'm still in the "work the kinks out of stage 3" part, but will be tackling the apps before long.  Any wisdom or insight in the dns part is appreciated...
> 
> 

 

If you want to be running a DNS proxy as part of a lan that other machines will be querying than you probably DO want to setup dnscachex. It is easy enough to do (simply run "dnscache-setup") but there is one "gotcha" in the whole process. The catch is that dnscahcex and tinydns both need to be running on seperate ip addresses. So what you have to do is setup tinydns to listen on 127.0.0.1 (lo) and dnscahcex to listen on your actual ip address (eth0) for dns requestes from the local network. Then when you provide a list of DNS servers to dnscachex simply put 127.0.0.1 at the top of the list. This means that your local dns server will be queried first and if it does not know the answer than an external server (probably assigned by your isp) will be queried. Not to difficult really.

-Mg

----------

## mooman

Yeah, I had been doing some reading about djbdns and was probably going to use that.  Thanks for the configuration tips.  I'll give that a try once I get the box stable enough for it.  :Wink: 

----------

## CasimirEffect

That's what I needed. Thanks for all the help, mgirard, I now have internal email working perfectly. I do have one more question. What would it take to get email working to the rest of the world? Do I need to register an IP with Verisign or should it automaticly work as is? Sorry if this is a dumb question but I have just about nill experience getting things working past the router.

----------

## mgirard

In order to get email from the rest of the world to your machine it has to be registered in DNS. This can be as simple as setting up a http://www.dyndns.org/ domain name. I think that Dyndns is free for getting "yourhostname.dyndns.org" which is not really a full domain but just a branch. It should work well for your purposes though. Once you have that DNS name (and qmail setup to recieve email for that DNS name) anyone could send email to yourname@yourhostname.dyndns.org and it will be handled by your box.

Cheers,

Matt

----------

## CasimirEffect

If I understand things correctly; we already have a domain registered for a website(www.whatever.com) than the mail server on the same IP will be able to handle mail sent to that domain (myname@whatever.com). Correct?

----------

## dripton

 *Quote:*   

> If I understand things correctly; we already have a domain registered for a website(www.whatever.com) than the mail server on the same IP will be able to handle mail sent to that domain (myname@whatever.com). Correct?

 

Maybe.  It depends on how the whatever.com domain is configured.

Try sending mail to myname@whatever.com from somewhere else on the Internet, and see if it gets there.  If so, great.

If not, ask the person who controls DNS for whatever.com to change the MX record for whatever.com to point to www.whatever.com

The MX (mail exchange) record is a pointer in DNS that makes it possible to have http://whatever.com go to www.whatever.com and mail to user@whatever.com go to a different box mail.whatever.com.  See the DNS-HOWTO for details.

----------

## mgirard

dripton is right on the money.    :Surprised: 

-Mg

----------

## CasimirEffect

Sweet! With a quick call to the ISP things are going perfectly. No more MS Exchange.   :Very Happy: 

----------

