Problems with qmail and connecting to smtp daemon and problem with my virtual domain.

Peter Risdon peter at circlesquared.com
Sat May 22 06:10:29 PDT 2004


Mattias Björk wrote:

> Hi, list(ners)
>
> Problem nr 1.
>
> I have read the following guide to install qmail:
>
> http://www.stevenfettig.com/mythoughts/archives/cat_qmailhowto.php


I'll try to help. You might have looked at these already but if not, 
they're worthwhile:

http://cr.yp.to/qmail.html for a general guide, especially the qmail 
pictures, and:

http://www.lifewithqmail.org - especially read:

http://www.lifewithqmail.org/lwq.html#test for some diagnostic and 
testing guidance.

Probably the starting point for testing a new installation is to look at 
the output of:

#qmailctl stat

to make sure everything is running properly. All uptimes should be > 1 
second and identical or very close to it. You should see lines for at 
least qmail-smtpd and qmail-send and their respective logs.

>
> I have not installed from source by my self, I found that all programs 
> where avalible thru ports. I will make this as sort as possible,


There is disagreement between the author of qmail and the port 
maintainer about where the service directory should go. djb says 
/service whereas the port maintainer says /var/service and this can lead 
to strange mixed installations, especially when you've been following 
installation or configuration guides that are not specific to FreeBSD. 
Check that you only have one or the other. If qmailctl stat does not 
show enough processes, this might be why.

> I set up vpopmail with domain "setiathome.birch.se". The domain is 
> "birch.se", fqdn is "setiathome.birch.se" for the host. I didn't how 
> ever install everything. I didn't install ezmlm-idx and auotrespond, 
> but its not vital for the operation of the mail-server at this time.


That should be fine.

>
> I had this problem, that i couldn't send message to the FreeBSD 
> mailinglists, but I solved it by adding my ISP outgoing smtpserver to 
> /var/qmail/control/smtproutes. Perhaps it hade something to do with 
> reversed DNS.


I don't think this list checks reverse DNS. Could you send mail anywhere 
else? Some ISPs do not allow e-mail to be sent through their network 
unless their smtp server is used, as an anti-spam precaution.

>
> Here are my directory listing from /var/qmail/control/:
>
> defaultdomain           plusdomain              smtproutes
> locals                  rcpthosts               virtualdomains
> locals.lock             rcpthosts.lock          virtualdomains.lock
> me                      servercert.pem
>
> In the file defaultdomain and plusdomain are the string entry 
> "birch.se". In the me file there are the hostname of the mail server. 
> And finaly in the "virtualdomains" file are the string: 
> "setiathome.birch.se:setiathome.birch.se"


That means you're expecting to receive mail addressed to 
user at setiathome.birch.se, not user at birch.se - is that what you want? 
There should also be an entry in rcpthosts, just the domain name, 
setiathome.birch.se in this case. Have you made these entries by hand? 
You shouldn't need to since you are running vpopmail (see below).

>
> My problems is that I can connect to port 25. The problem is that 
> nothing happens, look below:
>
> <snip>


Make sure that qmailctl stat gives the right output before going any 
further.

>
>
> How ever, in the first chapter of the guide. It says the following at 
> "1.6 courier-imap Hack" :
>
> "Because the SMTP after IMAP4(s)/POP3(s) of courier-imap does not 
> work, here is a small wrapper. This "hack" tracks the IP of the 
> authenticating user and allows for SMTP sending (i.e. a form of 
> authenticated SMTP relay)."
>
> Perhaps that have something to do with that it doesn't work.


I'm not sure how...

>
> Problem nr 2.
>
> The other problem is that I have a user named "thrawn" that is a local 
> user on the system.
> The home directory of the user is "/usr/home/thrawn".
> And the the Maildir diretory is "/usr/home/thrawn/Maildir". When I 
> connect to my mail via imapd-ssl, It uses the local user Maildir.


This is a big problem. There shouldn't be a Maildir in this directory, 
if you set up the domain properly under vpopmail. Use the vpopmail 
binaries to add domains and users (see below).

Secondly, it seems that imapd-ssl is not using the right authentication 
module. It needs to use something that checks with vpopmail and then 
shows the correct directory. Perhaps consider using courier-imapd 
instead; it's written by the same people who produced vpopmail and 
integrates well with it.

>
> But I have a domain for vpopmail at the following directory 
> "/usr/local/vpopmail/domains/setiathome.birch.se"


If you're using vpopmail and it has been set up properly and knows about 
the domain, this is the start of the directory tree where mail should be 
placed.

>
> And there I also have a user named "thrawn" and with the same password 
> as the local "thrawn" account. If I understand it correctly for some 
> reason courier-imap doesn't use my virtual domain, but it does use the 
> local user. Im sure that it might be me that I have done something 
> wrong or the documentation is not completly correct.


See below.

>
> Perhaps I should use another domain name and se if it works then, I 
> haven't tested that yet. I think that it should work anyway, but I 
> might  be wrong.


Are you using the binaries vadddomain and vadduser in 
/usr/local/vpopmail/bin, to set up new domains and users?

PWR.


More information about the freebsd-questions mailing list