From owner-freebsd-questions@FreeBSD.ORG Sun May 23 05:06:42 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C429416A4CE for ; Sun, 23 May 2004 05:06:42 -0700 (PDT) Received: from ariel.globecom.net (ariel.globecom.net [212.116.67.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DF2943D31 for ; Sun, 23 May 2004 05:06:41 -0700 (PDT) (envelope-from mattias.bjork@sydnet.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by ariel.globecom.net (Postfix) with ESMTP id 4B6495E876C; Sun, 23 May 2004 14:06:39 +0200 (CEST) Received: from ariel.globecom.net ([127.0.0.1]) by localhost (ariel.bahnhof.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03780-02-37; Sun, 23 May 2004 14:06:37 +0200 (CEST) Received: from mail-gw.globecom.net (mail-gw.globecom.net [212.116.65.149]) by ariel.globecom.net (Postfix) with ESMTP id BD2BF5E222E; Sun, 23 May 2004 14:06:37 +0200 (CEST) Received: from [192.168.10.201] (unknown [212.116.92.111]) by mail-gw.globecom.net (Postfix) with ESMTP id 62033B3F8; Sun, 23 May 2004 14:06:35 +0200 (CEST) Message-ID: <40B093D6.3090000@sydnet.net> Date: Sun, 23 May 2004 14:06:46 +0200 From: =?ISO-8859-1?Q?Mattias_Bj=F6rk?= User-Agent: Mozilla Thunderbird 0.6 (X11/20040519) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Peter Risdon , freebsd-questions@freebsd.org References: <40AE85F1.6030807@sydnet.net> <40AF52A8.3070406@circlesquared.com> In-Reply-To: <40AF52A8.3070406@circlesquared.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at globecom.net Subject: Re: Problems with qmail and connecting to smtp daemon and problem with my virtual domain. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2004 12:06:42 -0000 Hello Peter, Peter Risdon wrote: > 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: Homepage of qmail, have read some of it from time to time. > http://www.lifewithqmail.org - especially read: > > http://www.lifewithqmail.org/lwq.html#test for some diagnostic and > testing guidance. I did know about the page, but I seem to have forgotten about it. The Problem is that the link does not work for me as I type. But I have google and found some other links that I could use. The might perhaps not be so up to date if compared to www.lifewithqmail.org. > Probably the starting point for testing a new installation is to look at > the output of: > > #qmailctl stat I do not have that commad/script on the server. > 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 have /var/service, my directory listing is like this: qmail -> /var/qmail/service/qmail smtpd -> /var/qmail/service/smtpd Section "2.4 qmail-conf" on the page: http://stevenfettig.com/mythoughts/archives/000091.php Says how to set up the service files/directories, that is so I have done it. The file /var/qmail/service/qmail/run does look like this: #!/bin/sh exec /var/qmail/rc And the file /var/qmail/rc does look like this: #!/bin/sh exec env - PATH="/var/qmail/bin:$PATH" \ qmail-start ./Maildir/ /usr/local/bin/multilog t /var/log/qmail qmaill And finaly the file /var/qmail/service/smtpd/run does look like this: #!/bin/sh exec 2>&1 \ envdir ./env \ sh -c ' case "$REMOTENAME" in h) H=;; p) H=p;; *) H=H;; esac case "$REMOTEINFO" in r) R=;; [0-9]*) R="t$REMOTEINFO";; *) R=R;; esac exec \ envuidgid qmaild \ softlimit ${DATALIMIT+"-d$DATALIMIT"} \ /usr/local/bin/tcpserver \ -vDU"$H$R" \ ${LOCALNAME+"-l$LOCALNAME"} \ ${BACKLOG+"-b$BACKLOG"} \ ${CONCURRENCY+"-c$CONCURRENCY"} \ -xtcp.cdb \ -- "${IP-0}" "${PORT-25}" \ /var/qmail/bin/qmail-smtpd ' >> 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. Aha okey, but I didn't send my mail through my ISP smtp server to get to anything else but @freebsd.org, didn't work before that. >> >> 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@setiathome.birch.se, not user@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). Yes, for now. I forgot to say that *.birch.se is my internal domain, and not an domain that works on the internet. How ever I use mutt and thunderbird as my MUA and I have set my mail address to mattias.bjork@sydnet.net. (as you could se in this mail) I have MX records for setiathome.birch.se and thrawn.birch.se and dasboot.birch.se. So what Im saying is that I understand that user@birch.se/user@host.birch.se does not work so well on the outside. At least not replying to the mail would not work. But that is not what im trying to do either. Internal this mail should work fine however cause I have my own DNS server for this. >> >> My problems is that I can connect to port 25. The problem is that >> nothing happens, look below: >> >> > > > > 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). As in section "3.1 vpopmail" on the page: http://stevenfettig.com/mythoughts/archives/000093.php they describe quite well how to do that. At least the basic stuff. So I should move the mail from /usr/home/thrawn/Maildir/* to /usr/local/vpopmail/domains/setiathome.birch.se/thrawn/Maildir/*. My periodic scripts that i run daily/weekly/mountly on my hosts, are mailed to thrawn@setiathome.birch.se. They get in the directory /usr/local/vpopmail/domains/setiathome.birch.se/thrawn/Maildir/new so that is working. So atleast something is configured correctly, I forgot to mention that in my first mail. The there is another problem, that might be litle off-topic, but Im using getmail to recive my mail from my ISPs pop3 mail-accounts. Then there must be a way to make it place it in /usr/local/vpopmail/domains/setiathome.birch.se/thrawn/Maildir/new instead of /usr/home/thrawn/Maildir/new > 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. That might be my own fault or something that I have missed in the guide that I have mentioned erlier. Im using courier-imapd (ssl version) as my imapd server. So as you metioned the problem is that I have to change it in the some config-file. I think what you are talking about is the file: /usr/local/etc/courier-imap/authdaemonrc In this file there is a string that goes like: authmodulelist="authcustom authuserdb authvchkpw authpam" I will try and remove everything except authvchkpw, and see if that helps to get to the /usr/local/vpopmail/domains/setiathome instead of the local Maildir in /usr/home/thrawn. If that not helps I will try and rename /usr/home/thrawn/Maildir to something other. >> >> 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. So what you are saying is that what /var/qmail/control/virtualdomains are saying with: setiathome.birch.se:setiathome.birch.se is something like this: for the domain "setiathome.birch.se" use the directory "root-of-vpopmail/domains/setiathome.birch.se"? >> >> 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? Yes Im, as metioned in section "3.1 vpopmail" Thanks a lot for this reply. //Mattias Björk