Qmail - SMTP problems
I have done an install of Qmail from this guide:
http://sylvestre.ledru.info/howto/ho...l_vpopmail.php the problem is that now its all setup i cant seem to send via SMTP. from the webmail i get a Connection Refused Error and I have tried everything (not everything obviously cause otherwise i would have fixed it) but everything i can think of. any where that i can check configurations etc? the webmail works.. IMAP works, pop3 works everything seems to work except for the stupid SMTP :( Any ideas? Anything you want me to post? ####### btw its not a firewall issue. ######## |
When you try to send a message using SMTP, I would think there should be a message in /var/log/qmail/qmail-smtpd/current that may give you some insights.
You may also want to check /var/qmail/supervise/qmail-smtpd/run and be sure it looks like the tutorial specifies. You may also want to try doing a "ps -ef | grep proc" and see if there are any errors showing up on readproctile service errors. Normally they will just be dots, which is fine. |
ok heres some more info for you... i have tried to fix the problems but so far can not find a solution
when i do a ./qmail stat i get this: Code:
ps -efl | grep "service errors" | grep -v grep i get this Code:
|
Ok, try going into the /var/qmail/supervise directory and delete the lock files. There are lock files located under each of the directories. Get them all. qmail will make them again in a few seconds. You may also wanna stop and restart qmail just for good measure.
|
ok when i clear the lock files and restart I got this in the qmail log:
Code:
|
Yeah, sorry.. I seem to have forgotten that would happen. It's trying to start another instance of qmail and you've already got daemons listening on those ports. You can reboot and it'll clear right up, but if you don't wanna reboot, you can just stop qmail and be sure to kill all those processes that are running. Just do ps -ef and kill anything that talks about qmail, but of course be sure to stop qmail first.
|
yeah but as soon as i reboot i end up with the same problem with SMTP :(
|
Ok, let's try this... run the command /var/qmail/bin/qmail-showctl and post the output here. This will show all your current settings and how you've got qmail configured. If you feel like you need to censor the output, that's Ok, but be aware that it really helps to show everything as-is so we can be sure it's all good.
also, is it possible you have a CR/LF problem? Have you modified any of your control files using a windows text editor through samba? If so, this is certainly a problem. If you have been editing your control files through windows, you'll need to do a vi -b on each control file and delete the ^M characters you see at the end of each line. |
ok this is what i get from ./qmail-showctl
Code:
in relation to editing on windows machines ive been ssh'ing in and using vi :) Thanks for your help.. hope we are getting somewhere :D |
Ps: this line i have not modified... i think this is not correct??
virtualdomains.lock: I have no idea what this file does. |
can you successfully telnet to port 25 of your mail server?
|
can... comes up with a blank screen i guess this means it can... then as soon as i press CTRL it kicks me out...
|
QMail should respond with something when you telnet to port 25 ... AFAIK it can't be blank.
Does #netstat -ltp show qmail listening on port 25? |
tcp 0 0 *:smtp *:* LISTEN 3604/
results... |
further more:
.qmail stat gives qmail-pop3d: up (pid 3596) 1829 seconds qmail-send: up (pid 3599) 1829 seconds qmail-smtpd: up (pid 3604) 1829 seconds qmail-pop3d/log: up (pid 3615) 1825 seconds qmail-send/log: up (pid 3612) 1825 seconds qmail-smtpd/log: up (pid 3609) 1825 seconds |
i thought it may be a permission error so i added this to the startup script too...
chmod -R 777 /home/vpopmail/etc chmod -R 777 /service chmod -R 777 /var/qmail i know this isnt really secure but for now i wanted to make sure that it wasnt that.... :( |
I can tell already you've been messing with your qmail install in a way you should not be.... I know this because you've got rcpthosts empty. If you installed according to the howto you posted, that file should have your domain listed in it. You should NOT have this file empty. If this file is empty, you become an open relay where spammers can send their junk to the rest of the world. Obviously smtp is broken, so no worries there right now, but you really will need your domains listed in there pretty soon.
That lock file is OK. I have one like it, and also one for rcpthosts and locals. How about firewall concerns? I know you ruled them out in your very first post, but you really should be able to telnet to the smtp port. Maybe it's HOW you're telnetting? You should do a "telnet localhost 25" to be sure your firewall isn't getting in the way. The response should be something like... Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 yourdomain.com ESMTP |
Also, when you run ps -ef do you still see those readproctile errors? Are they the same as before??
|
yes i realise the risks of having an open smtp but this was the way that I wanted to ensure that it wasnt THAT setting that was causing the problems :)
BUt thanks... when i telnet i get this: Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. and i still get the same errors after a reboot that i did before with: ps -efl | grep "service errors" | grep -v grep :( anything else you can think of? I previously had NO firewall on but now i have put one on allowing the needed ports still the same thing im affraid :( |
hosts.allow and hosts.deny ... tcp wrappers - do they have any entries that restrict smtp access?
|
All times are GMT -5. The time now is 10:00 PM. |