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

2004-05-23 Thread Mattias Björk
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/91.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 21 \
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 
[EMAIL PROTECTED], not [EMAIL PROTECTED] - 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 
[EMAIL PROTECTED] (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 
[EMAIL PROTECTED]/[EMAIL 

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

2004-05-22 Thread Peter Risdon
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 
[EMAIL PROTECTED], not [EMAIL PROTECTED] - 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 

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

2004-05-21 Thread Mattias Björk
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 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, 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.

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.

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

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

thrawn/usr/home/thrawn/tmp% telnet setiathome.birch.se 25
Trying 192.168.10.10...
Connected to setiathome.birch.se.
Escape character is '^]'.
Connection closed by foreign host.
thrawn/usr/home/thrawn/tmp%
I don't even press a button before Im in the console again. I run the 
sockstat command on my server and I get the following output:

setiathome/var/qmail/control# sockstat  | grep :25
qmaild   tcpserve 666453 tcp4   *:25  *:* 

setiathome/var/qmail/control#
And the output of netstat -nl -f inet -p tcp | grep 25 does not show 
anything how ever.

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.
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.

But I have a domain for vpopmail at the following directory 
/usr/local/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.

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.

I hope that this information is of some use and I haven't forgotten to 
mutch information.

Thanks Mattias Björk
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]