Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am really new to linux and so am i new to qmail. I have been following this tutorial to bring up a mail server in qmail.
The problem is that i tried to connect to the mail server trough a mail client( thunderbird ) but i get an alert message as follows:
" Sending of message failed
The message could not be sent because connection to SMTP server mail.xx.xxx failed. The server may be unavailable or is refusing SMTP connection. Please verify that your SMTP server setting is correct and try again, or else contact the network admin."
I checked if the qmail server was running:
[root@mail bin]# ps -ax | grep -i mail
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.5/FAQ
2585 ? S 0:00 supervise qmail-send
2587 ? S 0:00 supervise qmail-smtpd
10029 ? S 0:00 qmail-send
10030 ? S 0:00 /usr/local/bin/multilog t /var/log/qmail/smtpd
10033 ? S 0:00 qmail-lspawn ./Maildir/
10034 ? S 0:00 qmail-rspawn
10035 ? S 0:00 qmail-clean
10036 ? S 0:00 /usr/local/bin/multilog t /var/log/qmail
13469 pts/2 S+ 0:00 tail -f /var/log/qmail/current
1336 pts/3 S+ 0:00 grep -i mail
The qmail processes seems to be up and running but then i checked if anything is running on port 25 just to find out that it had nothing running on port 25. when i run the command
netstat -vatn
i dont see anything running on the port 25.
Could anyone help me out with what i could have possible done wrong.
if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z
"$MAXSMTPD" -o -z "$LOCAL" ]; then
echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is
unset in
echo /var/qmail/supervise/qmail-smtpd/run
exit 1
fi
if [ ! -f /var/qmail/control/rcpthosts ]; then
echo "No /var/qmail/control/rcpthosts!"
echo "Refusing to start SMTP listener because it'll create an open relay"
exit 1
fi
The is what i get while running the qmailctl stat:
[root@mail qmail-smtpd]# qmailctl stat
/service/qmail-send: up (pid 29202) 234666 seconds
/service/qmail-send/log: up (pid 29201) 234666 seconds
/service/qmail-smtpd: up (pid 15211) 1 seconds
/service/qmail-smtpd/log: up (pid 29208) 234666 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0
well, looking at the stat it seems that the smtpd is up but what actually happens is that the time it is supposed to be up and running is way below the other daemons(the time since i started the qmail server). Everytime i look at the stat I see that the time for smtpd never increases from 1 second.I checked the PID for the smtpd and it changes after ever second.
your replies would be highly appreciated.
Thanking you
I just hope it's a typo error...you have two slashes after "log"
>cat /var/log//qmail/smtpd/current
It's very rare that even log file for qmail services is mis-configured.
So you have to double check the log files.
Check where does the soft link for "/service/qmail-smtpd/log" lead to.
Check the log run file "/service/qmail-smtpd/log/run" and make sure the user/group used by the log exist.
Also check if the log file "current" exist in "/service/qmail-smtpd/log/main" directory.(don't worry if doesn't exist)
Make sure you have stopped/uninstalled.. sendmail or postfix or exim in your system.(Just to be on safer side)
Here are some of the reasons I have encountered because of which qmail-smtpd did not start up.
Owner/permission issue for qmail-smtpd
Exim running on port 25
Owner/permission issue for log file
"/etc/tcp.smtp.cdb" does not exist
You will get a concrete idea of what's going wrong only when you check the logs. So you have to make sure at least the logs are running fine.
Hey thanks for you reply. You are right it was just a silly typo error...but even without the double slash the log file still is empty.
The qmail-send and qmail-smtpd folders in the service folder is symbolically liked to the /var/qmail/supervise/qmail-send and /var/qmail/supervise/qmail-smtpd respectively. The permissions seems to be right. Or should it be something else?
And the qmail-send and qmail-smtpd folders in the /var/qmail/supervise/ seems to be having the following permissions. Should the permission be changed?
One thing i noticed was that i tried to start up qmail-smtpd directly from the run file in the folder /var/qmail/supervise/qmail-smtpd and i get some tcpserver error:
[root@mail qmail-smtpd]# ./run
tcpserver: fatal: no IP address for -u
I have a feeling that this could be the main cause of the problem. I tried looking for the error on web but I just seem to miss it all the time.
"0" actually means that smtp service will run on all the interfaces that you have on your system.
Using specific IP will make smtp service run only on that interface.
I suggest you to refer http://qmail.jms1.net.
Setting up and configuring SMTP services is explained in detail.
Be sure to use firefox/opera..cos the site won't open in IE
Ravinandan
Last edited by ravinandans; 07-17-2007 at 06:14 AM.
Ravinandan, thank you very much for your support. I later found out that the problem with the tcpserver was that i had a typo error with my qmail-smtpd run file. I am sorry to have wasted your time. But i must admit that had it not been for you i would not have seen the typo error...thank you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.