Web Hosting Talk







View Full Version : qmail... getting white hair :-)


protector330
04-02-2002, 05:49 AM
hi could somebody pls help me with my qmail problem?

when I telnet to port 110 I get this error message:


+OK <4765.10177616123@mydomain.com>
user myusername
+OK
pass mypassword
-ERR this user has no $HOME/Maildir


ok ... I've tryed to launch 'maildirmake myusername' and I get:


sh-2.05$ ./maildirmake myusername
maildirmake: fatal: unable to mkdir maildirmake: access denied


now I've found out that this stupid qmail (hemmm, I know, stupid me ;)) uses the wrong $Home directory. It trys to create the new userdirectory inside /var/qmail/bin instead of /home. How can I fix the $Home dir? I've searched like stupid and the seach button of Google is worn out.

When I login as root I'm allowed to create a userdirectory with 'maildirmake', I've tryied to reassign the /var/qmail/bin/myusername directory to 'myusername' instead of 'root'. The result? Qmail goes still on telling me:

-ERR this user has no $HOME/Maildir


Thank you veeeery much for helping me!


;)

MotleyFool
04-02-2002, 06:39 AM
Protector,

Forget setting up domains in qmail by yourself

Install vpopmail and qmailadmin and read the documentation in http://inter7.com

Use vadddomain and vadduser commands of vpopmail

I dont use vqadmin, so dont know about it

Cheers
Balaji

protector330
04-02-2002, 06:55 AM
thanks MotleyFool, I did not want to set up domains with qmail but to be at least able to have 1 pop account working on my entire server ;)

I did already look at vpopmail and I will install it as soon as my basic qmail works. So any idea how to set qmail for having at least one pop account working? :)

thx a lot!

cperciva
04-02-2002, 07:22 AM
echo "/var/mail/$USER" > ~/.qmail

jakis
04-02-2002, 03:32 PM
Don't use qmail or you'll later find out that it's really inflexible. You can't do extra settings unless you patch it. Try searching djb group for 10 more reasons. Don't use vpopmail either same inflexible as qmail. Go use Postfix. Nice job.

protector330
04-03-2002, 03:44 AM
ok here we go, while the error message in qmail does still appear (no $home/maildir as posted in my first message), I've tryied to install vpopmail by following step by step the docs.

Here is what I get at the "final" step of setting it up:


# env - PATH="/var/qmail/bin:/usr/local/bin" \
> tcpserver -H -R 0 pop-3 \
> /var/qmail/bin/qmail-popup mydomain.com \
> /home/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir &
[1] 2317

#tcpserver: fatal: unable to bind: address already used


thanks for helping me with my white hair



:D

admin0
04-03-2002, 09:39 AM
Hi.

Sorry if this reply comes late.


# cd ~$home/$user
# /var/qmail/bin/maildirmake Maildir
# echo "./Maildir/" > .qmail

# chown -R $user.$user Maildir
# chmod 644 .qmail


That should solve the problem.
If you have any other qmail related issues, please do not hesitate to contact me. I have 4+ years experience in qmail administration and configuration.


Thanks.
Shashi Dahal
www.admin0.com

ICQ: 154711567
AIM: dahalshashi

MotleyFool
04-03-2002, 10:23 AM
Hi Shashi,

Very impresseive resume you have there - but before Chicken comes and hacks your URL ref, set up a signature!

Cheers
Balaji

protector330
04-03-2002, 02:13 PM
thanks a lot... here is an update to my sad situation:


telnetting on port 110 I get:


+OK <24073.1017878389@mydomain.com>
user myusername
+OK
pass mypassword
-ERR authorization failed


note that I've created with ./vadduser exactly this user with this password (and yes ./vadddomain also).

I keep on thinking port 110 is listening to checkpassword instead of vckpwd.

Here is what I get when I try to embedd vpopmail:


[root@myserver qmail]# env - PATH="/var/qmail/bin:/usr/local/bin" tcpserver -H -R 0 pop-3 \
tcpserver: fatal: unable to bind: address already used



I'm getting crazy :eek: please help me otherwise I'll look like 50 even if I'm 25 :(

Jeffyt
04-03-2002, 02:19 PM
Not real sure if this will help you out but this guide (http://mricon.com/SM/guide/index.html) has helped me out with all my qmail/vmailmgr problems in the past. You don't have to install the SquirrelMail portion of the guide if you don't want to but all the other information in it is extremely easy to follow.

Hope it helps!

Regards,

Jeff

admin0
04-03-2002, 03:10 PM
Hi.

I can provide you with the following if you need help.


-- install qmail for you and write shell scripts such that you will be able to use a simple menu system to add email a/c's for domains.
and also install some package like instantmail[php] via which your clients can check their email via web.


-- install qmail + vpopmail + sqwebmail so that both you and your users have complete web based control and easy access, and yes your clients can check their email via sqwebmail.


-- if you do not need any of the above, please provide me the purpose as why you want to have those softwares installed ? I might be able to advise you a good and easy solution.

for example:

if you are not using any control panel and want to have your own easy web server, this can be done:
-- install webmin + qmail + vpopmail +sqwebmail + apacetoolbox, configure all those packages for you and write you a custom addweb script that will add the user, create the entries in vpopmail, create the ftp a/c, add frontpage settings, add virtualdomain entries in apache etc.


tcpserver: fatal: unable to bind: address already used -- this comes because there is some process already creating a socket on port 110. Maybe you forgot to kill the old pop3d, or might be sendmail is running via inet/xinet -- you should mention the version of the OS .

I am playing with colors .. :)

Please let me know and I will be happy to help you.


Thanks.

protector330
04-03-2002, 03:25 PM
hi thanx for your fast reply. could you pls tell me how to find the open sockets on port 110, how to identify the one I do not need and how to kill them?

thanks a lot :D

[root@myserver pop3d]# netstat -a | grep smtp
tcp 0 0 *:smtp *:* LISTEN

if this is the command.... well there is only this line.... any help is more than apreciated. cheers!

taz0
04-03-2002, 03:27 PM
Originally posted by protector330
hi thanx for your fast reply. could you pls tell me how to find the open sockets on port 110, how to identify the one I do not need and how to kill them?

thanks a lot :D


sockstat | grep 110

protector330
04-03-2002, 03:43 PM
:( :bawling:

sh-2.05$ ./sockstat | grep 110
sh: ./sockstat: Permission denied

same if I'm root

admin0
04-03-2002, 03:48 PM
$ socklist or
# socklist


socklist | grep 110

protector330
04-03-2002, 03:55 PM
tcp 110 4314 0 1337 3 tcpserver

just this one... any hint where to start my error hunting? thx again

taz0
04-03-2002, 03:56 PM
Originally posted by protector330
tcp 110 4314 0 1337 3 tcpserver

just this one... any hint where to start my error hunting? thx again


killall -9 tcpserver

protector330
04-03-2002, 04:41 PM
ok people... all this helped me to be sure that the socket on port 110 is opened by qmail/vopomail/pop3d and not by any other stuff.

I'm 100% sure now that there is no other socket bothering the right one.

I've stopped qmailctl and restared it.... but I go on getting the same old error when telnetting to port 110

ERR auth user

even if the user is correct (created with vpopmail).

Do I have a basic error in understand how qmail works? you are allowed to say YES :stickout Is the error coz I've created the pop account with vpopmail? is there any place where I should look into to see if I've misspelled something or if there is some wrong path (f.eg. checkpassword instead of vchkpwd)?

thank you so much for your patience

admin0
04-03-2002, 04:46 PM
Please provide the following:


cut-paste of:


qmail-startup script
vpopmail startup script

and any other related startup/config files.

protector330
04-03-2002, 05:11 PM
thank you so much admin0. Here are the 2 files which where mostly edited.... is the call to checkpasswd correct in my pop3d file? Please say that the error is that line, and that after your help on how to correct it everything will work fine :D

/var/qmail/pop3d/qmail.ltc (a piece of it)


#!/bin/sh

# For Red Hat chkconfig
# chkconfig: - 80 30
# description: the qmail MTA

PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
export PATH

QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`

case "$1" in
start)
echo "Starting qmail"
if svok /service/qmail-send ; then
svc -u /service/qmail-send
else
echo qmail-send supervise not running
fi
if svok /service/qmail-smtpd ; then
svc -u /service/qmail-smtpd
else
echo qmail-smtpd supervise not running
fi
if [ -d /var/lock/subsys ]; then
touch /var/lock/subsys/qmail
fi
if svok /service/qmail-pop3d ; then
svc -u /service/qmail-pop3d
else
echo qmail-pop3d supervise not running
fi
;;
stop)
echo "Stopping qmail..."
echo " qmail-smtpd"
svc -d /service/qmail-smtpd
echo " qmail-send"
svc -d /service/qmail-send
echo " qmail-pop3d"
svc -d /service/qmail-pop3d
if [ -f /var/lock/subsys/qmail ]; then
rm /var/lock/subsys/qmail
fi
;;
stat)
svstat /service/qmail-send
svstat /service/qmail-send/log
svstat /service/qmail-smtpd
svstat /service/qmail-smtpd/log
svstat /service/qmail-pop3d
svstat /service/qmail-pop3d/log
qmail-qstat
;;



/var/qmail/pop3d


#!/bin/sh

exec tcpserver -v -R 0 pop3 /var/qmail/bin/qmail-popup myrealdomainname.com /bin/checkpassword /var/qmail/bin/qmail-pop3d
Maildir 2>&1 | /var/qmail/bin/splogger pop3d &



is this line fine? /bin/checkpassword ??

thanks again

protector330
04-04-2002, 09:57 AM
any help? :( please...