qmail: no mail?

  • Rat
  • Guru
  • Guru
  • User avatar
  • Posts: 1190
  • Loc: desk

Post 3+ Months Ago

Hello, I've been having a LOT of trouble with email lately.
At first it was just on one domain name, but I've got a new server since then. I am running on a FedoraCore 2 server.

The problem is no one is receiving any out going mail from the server.
I have restarted the server and qmail (my mail service).
I am getting email from any address and from my server (backup reports), but when I send an email, no one receives it. Sometimes they receive it after 5 or so days. I do not know how to read logs or where to find them.

This is a recent bounced back message:
--------------------------------------------------------------------
Hi. This is the qmail-send program at xtr4radeon5200.secureserver.net.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<*takenout*@gmail.com>:
Connected to 64.202.189.86 but connection died. (#4.4.2)
I'm not going to try again; this message has been in the queue too long.

--------------------------------------------------------------------
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

There are a ton of things that could cause this. Further, your log location depends on how you installed qmail to begin with.

Have a look for /var/log/qmail/qmail-smtp/current. if it exists, you might see your errors there.

Post your allow lines from /etc/tcp.smtp (and have you ever "# qmailctl cdb"?). If you don't have any lines there with RELAYCLIENT in them, try adding this:
Code: [ Select ]
127.:allow,RELAYCLIENT=""

and then doing (as root):
Code: [ Select ]
# qmailctl stop
# qmailctl cdb
# qmailctl start
# qmailctl stat
  1. # qmailctl stop
  2. # qmailctl cdb
  3. # qmailctl start
  4. # qmailctl stat


As I said, this could be caused by many things, so try those and post back if it doesn't help you.
  • Rat
  • Guru
  • Guru
  • User avatar
  • Posts: 1190
  • Loc: desk

Post 3+ Months Ago

When I do this command "# qmailctl cdb"
nothing shows.

And the above files/dirs don't exist. =\
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

you might try "locate qmail-smtp" or browsing your /var/log tree to find your error logs.

Did you stop qmail before you did "qmailctl cdb"?
  • Rat
  • Guru
  • Guru
  • User avatar
  • Posts: 1190
  • Loc: desk

Post 3+ Months Ago

I've located 'qmail-smtp'
And when I typed the command 'qmailctl cdb' it said 'command not found'

What should I do now that I am in the folder where 'qmail-smtp' is located?
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

did your /etc/tcp.smtp contain the required RELAYCLIENT lines? If not, you need to figure out where exactly your qmailctl is and run that. Try "which qmailctl"

qmail-smtp should contain a file named "currrent" which will be the current log from the SMTP server, which should tell you why your mail isn't getting out of the system.

What OS is the mail server on? What version of qmail are you running? How was qmail installed (from source?) and what options were used if you know those.
  • Rat
  • Guru
  • Guru
  • User avatar
  • Posts: 1190
  • Loc: desk

Post 3+ Months Ago

'
/usr/bin/which: no qmailctl in (/usr/kerberos/bin://bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/rtusrgd/bin)
'
OS: Linux Fedora
Qmail: unknoqn
Source: I believe so, when I got the server, it was on it.

And tcp/smtp I dont see =S
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

Rat wrote:
And tcp/smtp I dont see =S

It should be /etc/tcp.smtp not tcp/smtp. If you don't have this file, you may need to create it, or it may be stored someplace else. If qmail was installed from source, this could be anywhere on the system. If you don't have this file at all, no-one will be able to send any mail anywhere.

Are you logged in as root or just su'ed? If you just did "su" to get root privs, qmailctl probably won't be in your path anyway. If you notice, "which" didn't include /usr/sbin in it's list of places it checked. You might try "ls /sbin | grep qmail" and see if it returns from that. If it does, just run the commands with /sbin/ before them, as such: "/sbin/qmailctl stop".

Since this was installed from source, the qmailctl binary could literally be just about anywhere on the system (just like tcp.smtp). Once you do find it, running "qmailctl cdb" will show you the location of the file you need - whether it's named tcp.smtp or something else (it'll say something like "Reloaded /etc/tcp.smtp.). As stated, look in /usr/sbin and if it's not there, look in the same tree you found qmail-smtp in, perhaps in a folder named "bin".

If this is not a mission critical server (it's just your mail), you might consider reinstalling the OS to something more current than FC2.
  • Rat
  • Guru
  • Guru
  • User avatar
  • Posts: 1190
  • Loc: desk

Post 3+ Months Ago

psa-qmail 1.03-fc2.build75050824.12


And I jsut su -'d to root
This server doesn't have the option of logging in staright as root.
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

Sorry, didn't realize you were running Plesk. You really need to think about upgrading that. Just how old is that anyway? v5 reached end of life almost 2 years ago!

You should be able to check on relaying capabilities through your web based control panel (services management). You want to allow your local users to relay to any domain. If this is not set in this way, users will only be able to send mail to your local domains (which is why you're recieving mail for your domain)
  • Rat
  • Guru
  • Guru
  • User avatar
  • Posts: 1190
  • Loc: desk

Post 3+ Months Ago

In service management, I don't see a setting to allow my local users to relay to any domain. In the service management area, all that is listed is:

Web Server (Apache)
SMTP Server (QMail)
IMAP/POP3 Server (Courier-IMAP)
DNS Server (BIND)
Tomcat
ColdFusion (Not configured)
PostgreSQL
SpamAssassin
Dr.Web antivirus

------------------------------------------
And it allows you to start, stop or restart the service. You can't click to edit them or anything.
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

Sorry, I haven't touched Plesk in years. Do you have a /service/qmail-smtp/run file? If you do, it'll at least tell you which cdb (if any) it's loading. Look for a line something like this:
Code: [ Select ]
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \

That's from the oldest mail server running qmail I could grab. Also, here's the qmailctl script from that server:
Code: [ Select ]
#!/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..."
echo ""
if svok /service/qmail-send ; then
svc -u /service/qmail-send /service/qmail-send/log
echo "Starting qmail-send"
else
echo "qmail-send supervise not running"
fi
if svok /service/qmail-smtpd ; then
svc -u /service/qmail-smtpd /service/qmail-smtpd/log
echo "Starting qmail-smtpd"
else
echo "qmail-smtpd supervise not running"
fi
if svok /service/qmail-pop3d ; then
svc -u /service/qmail-pop3d /service/qmail-pop3d/log
echo "Starting qmail-pop3d"
else
echo "qmail-pop3d supervise not running"
fi
if [ -d /var/lock/subsys ]; then
touch /var/lock/subsys/qmail
fi
;;
stop)
echo "Stopping qmail..."
echo ""
echo " qmail-smtpd"
svc -d /service/qmail-smtpd /service/qmail-smtpd/log
echo " qmail-send"
svc -d /service/qmail-send /service/qmail-send/log
echo " qmail-pop3d"
svc -d /service/qmail-pop3d /service/qmail-pop3d/log
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
;;
doqueue|alrm|flush)
echo "Flushing timeout table and sending ALRM signal to qmail-send."
/var/qmail/bin/qmail-tcpok
svc -a /service/qmail-send
;;
queue)
qmail-qstat
qmail-qread
;;
reload|hup)
echo "Sending HUP signal to qmail-send."
svc -h /service/qmail-send
;;
pause)
echo "Pausing qmail-send"
svc -p /service/qmail-send
echo "Pausing qmail-smtpd"
svc -p /service/qmail-smtpd
echo "Pausing qmail-pop3d"
svc -p /service/qmail-pop3d
;;
cont)
echo "Continuing qmail-send"
svc -c /service/qmail-send
echo "Continuing qmail-smtpd"
svc -c /service/qmail-smtpd
echo "Continuing qmail-pop3d"
svc -c /service/qmail-pop3d
;;
restart)
echo "Restarting qmail:"
echo "* Stopping qmail-smtpd."
svc -d /service/qmail-smtpd /service/qmail-smtpd/log
echo "* Sending qmail-send SIGTERM and restarting."
svc -t /service/qmail-send /service/qmail-send/log
echo "* Sending qmail-pop3d SIGTERM and restarting."
svc -t /service/qmail-pop3d /service/qmail-pop3d/log
echo "* Restarting qmail-smtpd."
svc -u /service/qmail-smtpd /service/qmail-smtpd/log
;;
cdb)
tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
chmod 644 /etc/tcp.smtp.cdb
echo "Reloaded /etc/tcp.smtp."
;;
help)
cat <<HELP
stop -- stops mail service (smtp connections refused, nothing goes out)
start -- starts mail service (smtp connection accepted, mail can go out)
pause -- temporarily stops mail service (connections accepted, nothing leaves)
cont -- continues paused mail service
stat -- displays status of mail service
cdb -- rebuild the tcpserver cdb file for smtp
restart -- stops and restarts smtp, sends qmail-send a TERM & restarts it
doqueue -- schedules queued messages for immediate delivery
reload -- sends qmail-send HUP, rereading locals and virtualdomains
queue -- shows status of queue
alrm -- same as doqueue
flush -- same as doqueue
hup -- same as reload
HELP
;;
*)
echo "Usage: $0 {start|stop|restart|doqueue|flush|reload|stat|pause|cont|cdb|queue|help}"
exit 1
;;
esac

exit 0
  1. #!/bin/sh
  2. # For Red Hat chkconfig
  3. # chkconfig: - 80 30
  4. # description: the qmail MTA
  5. PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
  6. export PATH
  7. QMAILDUID=`id -u qmaild`
  8. NOFILESGID=`id -g qmaild`
  9. case "$1" in
  10. start)
  11. echo "Starting qmail..."
  12. echo ""
  13. if svok /service/qmail-send ; then
  14. svc -u /service/qmail-send /service/qmail-send/log
  15. echo "Starting qmail-send"
  16. else
  17. echo "qmail-send supervise not running"
  18. fi
  19. if svok /service/qmail-smtpd ; then
  20. svc -u /service/qmail-smtpd /service/qmail-smtpd/log
  21. echo "Starting qmail-smtpd"
  22. else
  23. echo "qmail-smtpd supervise not running"
  24. fi
  25. if svok /service/qmail-pop3d ; then
  26. svc -u /service/qmail-pop3d /service/qmail-pop3d/log
  27. echo "Starting qmail-pop3d"
  28. else
  29. echo "qmail-pop3d supervise not running"
  30. fi
  31. if [ -d /var/lock/subsys ]; then
  32. touch /var/lock/subsys/qmail
  33. fi
  34. ;;
  35. stop)
  36. echo "Stopping qmail..."
  37. echo ""
  38. echo " qmail-smtpd"
  39. svc -d /service/qmail-smtpd /service/qmail-smtpd/log
  40. echo " qmail-send"
  41. svc -d /service/qmail-send /service/qmail-send/log
  42. echo " qmail-pop3d"
  43. svc -d /service/qmail-pop3d /service/qmail-pop3d/log
  44. if [ -f /var/lock/subsys/qmail ]; then
  45. rm /var/lock/subsys/qmail
  46. fi
  47. ;;
  48. stat)
  49. svstat /service/qmail-send
  50. svstat /service/qmail-send/log
  51. svstat /service/qmail-smtpd
  52. svstat /service/qmail-smtpd/log
  53. svstat /service/qmail-pop3d
  54. svstat /service/qmail-pop3d/log
  55. qmail-qstat
  56. ;;
  57. doqueue|alrm|flush)
  58. echo "Flushing timeout table and sending ALRM signal to qmail-send."
  59. /var/qmail/bin/qmail-tcpok
  60. svc -a /service/qmail-send
  61. ;;
  62. queue)
  63. qmail-qstat
  64. qmail-qread
  65. ;;
  66. reload|hup)
  67. echo "Sending HUP signal to qmail-send."
  68. svc -h /service/qmail-send
  69. ;;
  70. pause)
  71. echo "Pausing qmail-send"
  72. svc -p /service/qmail-send
  73. echo "Pausing qmail-smtpd"
  74. svc -p /service/qmail-smtpd
  75. echo "Pausing qmail-pop3d"
  76. svc -p /service/qmail-pop3d
  77. ;;
  78. cont)
  79. echo "Continuing qmail-send"
  80. svc -c /service/qmail-send
  81. echo "Continuing qmail-smtpd"
  82. svc -c /service/qmail-smtpd
  83. echo "Continuing qmail-pop3d"
  84. svc -c /service/qmail-pop3d
  85. ;;
  86. restart)
  87. echo "Restarting qmail:"
  88. echo "* Stopping qmail-smtpd."
  89. svc -d /service/qmail-smtpd /service/qmail-smtpd/log
  90. echo "* Sending qmail-send SIGTERM and restarting."
  91. svc -t /service/qmail-send /service/qmail-send/log
  92. echo "* Sending qmail-pop3d SIGTERM and restarting."
  93. svc -t /service/qmail-pop3d /service/qmail-pop3d/log
  94. echo "* Restarting qmail-smtpd."
  95. svc -u /service/qmail-smtpd /service/qmail-smtpd/log
  96. ;;
  97. cdb)
  98. tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
  99. chmod 644 /etc/tcp.smtp.cdb
  100. echo "Reloaded /etc/tcp.smtp."
  101. ;;
  102. help)
  103. cat <<HELP
  104. stop -- stops mail service (smtp connections refused, nothing goes out)
  105. start -- starts mail service (smtp connection accepted, mail can go out)
  106. pause -- temporarily stops mail service (connections accepted, nothing leaves)
  107. cont -- continues paused mail service
  108. stat -- displays status of mail service
  109. cdb -- rebuild the tcpserver cdb file for smtp
  110. restart -- stops and restarts smtp, sends qmail-send a TERM & restarts it
  111. doqueue -- schedules queued messages for immediate delivery
  112. reload -- sends qmail-send HUP, rereading locals and virtualdomains
  113. queue -- shows status of queue
  114. alrm -- same as doqueue
  115. flush -- same as doqueue
  116. hup -- same as reload
  117. HELP
  118. ;;
  119. *)
  120. echo "Usage: $0 {start|stop|restart|doqueue|flush|reload|stat|pause|cont|cdb|queue|help}"
  121. exit 1
  122. ;;
  123. esac
  124. exit 0

This script should really be on any server running qmail. The only problem is that you're still going to have to locate your qmail/bin folder to point this to, try /usr/local/psa/qmail/
  • Rat
  • Guru
  • Guru
  • User avatar
  • Posts: 1190
  • Loc: desk

Post 3+ Months Ago

Yes I do have a 'qmail-smtp' file.
It was located:

[rtusrgd@xtr4radeon5200 rtusrgd]$ locate qmail-smtp
/var/qmail/bin/qmail-smtpd


However, when I open it, it's all encrypted..how do I read it?
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

that's the binary mail server. Do you have the /service/ directory?
  • Rat
  • Guru
  • Guru
  • User avatar
  • Posts: 1190
  • Loc: desk

Post 3+ Months Ago

service file in the /var/qmail/bin/folder? no.
service file in the qmail folder? no
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

service folder at root, same level as /etc, /var and /usr:
Code: [ Select ]
# ls /service
  • Rat
  • Guru
  • Guru
  • User avatar
  • Posts: 1190
  • Loc: desk

Post 3+ Months Ago

No service folder there :S
I submitted a trouble ticket, I'll see what happens.
  • Rat
  • Guru
  • Guru
  • User avatar
  • Posts: 1190
  • Loc: desk

Post 3+ Months Ago

Alright, I've got it working now. Thanks for your help this213
  • undead
  • Born
  • Born
  • undead
  • Posts: 1

Post 3+ Months Ago

So what was the fix?

Thanks!

--j

Post Information

  • Total Posts in this topic: 19 posts
  • Users browsing this forum: No registered users and 33 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.