On 3/20/2014 2:54 PM, Teo En Ming wrote:
> Hi,
>
> I noticed the email messages are stuck in the qmail queue and can't be
> delivered to the email accounts' inboxes.
>
> [root@centos-6 log]# qmailctl stat
> /service/qmail-send: up (pid 31457) 0 seconds
> /service/qmail-send/log: up (pid 24782) 2194 seconds
> /service/qmail-smtpd: up (pid 24780) 2194 seconds
> /service/qmail-smtpd/log: up (pid 24781) 2194 seconds
> messages in queue: 85
> messages in queue but not yet preprocessed: 85
>
> I think there is a problem with qmail-send as it's 0 seconds.
>
> I followed the qmail installation guide at the following URL:
>
> Article: Setting up Qmail Server on CentOS 6
> <http://linuxawy.net/archive/2013/07/setting-up-qmail-server-on-centos6>
>
> Link:
> http://linuxawy.net/archive/2013/07/setting-up-qmail-server-on-centos6
>
> I am running CentOS 6.5 64-bit as a virtual machine in virtualbox.
>
> There are many mistakes in the above guide. I believe I have corrected
> the mistakes in the guide to the best of my ability.
>
> Please advise me on how to get my qmail installation working. I will
> gladly supply any information and/or configuration files requested.
>
> Thank you very much.
>
> Yours sincerely,
>
> Teo En Ming
> Singapore
>
>
>
>
Hi,
1. Contents of /var/qmail/rc:
==========================
#!/bin/sh
set -x
# Using stdout for logging
# Using control/defaultdelivery from qmail-local to deliver messages by
default
exec env -- PATH="/var/qmail/bin:$PATH" \
qmail-start "`cat /var/qmail/control/defaultdelivery`"
2. Contents of /var/qmail/control/defaultdelivery:
============================================
./Maildir/
3. Contents of /var/qmail/supervise/qmail-send/run:
==============================================
#!/bin/sh
exec /var/qmail/rc
4. Contents of /var/qmail/supervise/qmail-send/log/run:
==================================================
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t
/var/log/qmail
5. Contents of /var/qmail/supervise/qmail-smtpd/run:
================================================
#!/bin/sh
set -x
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`
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
exec /usr/local/bin/softlimit -m 9000000 \
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c
"$MAXSMTPD" \
-u 509 -g 509 0 smtp /var/qmail/bin/qmail-smtpd 2>&1
6. Contents of /var/qmail/control/concurrencyincoming:
==================================================
20
7. Contents of /var/qmail/supervise/qmail-smtpd/log/run:
===================================================
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t
/var/log/qmail/smtpd
8. Contents of /etc/init/svscan.conf:
================================
start on runlevel [345]
respawn
exec /command/svscanboot
9. Contents of /etc/pam.d/dovecot:
===============================
auth required pam_unix.so nullok
account required pam_unix.so
10. Contents of /usr/local/etc/dovecot.conf:
=======================================
protocols = imap imaps pop3 pop3s
disable_plaintext_auth = no
ssl_cert_file = /etc/ssl/certs/dovecot.pem
ssl_key_file = /etc/ssl/private/dovecot.pem
first_valid_uid = 89
first_valid_gid = 1
passdb vpopmail {
args = webmail=127.0.0.1
}
userdb vpopmail {
args = quota_template=quota_rule=*:backend=%q
}
mail_location = maildir:/var/vpopmail/domains/%d/%n/Maildir
11. Contents of /etc/init.d/dovecot:
===============================
#!/bin/bash
# /etc/rc.d/init.d/dovecot
# Starts the dovecot daemon
# chkconfig: -- 65 35
# description: Dovecot Imap Server
# processname: dovecot
# Source function library.
. /etc/init.d/functions
test -x /usr/local/sbin/dovecot || exit 0
RETVAL=0
prog="Dovecot Imap"
start() {
echo -n $"Starting $prog: "
daemon /usr/local/sbin/dovecot
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dovecot
echo
}
stop() {
echo -n $"Stopping $prog: "
killproc /usr/local/sbin/dovecot
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dovecot
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
stop
start
RETVAL=$?
;;
condrestart)
if [ -f /var/lock/subsys/dovecot ]; then
stop
start
fi
;;
status)
status /usr/local/sbin/dovecot
RETVAL=$?
;;
*)
echo $"Usage: $0 {condrestart|start|stop|restart|reload|status}"
exit 1
esac
exit $RETVAL
12. Contents of /service/qmail-smtpd/run:
=====================================
#!/bin/sh
set -x
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`
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
exec /usr/local/bin/softlimit -m 9000000 \
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c
"$MAXSMTPD" \
-u 509 -g 509 0 smtp /var/qmail/bin/qmail-smtpd 2>&1
13. Contents of /etc/init.d/spamdctl:
================================
#!/bin/sh
# description: the spamassassin daemon
case "$1" in
start)
echo "Starting the spamassassin daemon (spamd)..."
spamd -x -u spamd -H /etc/mail/spamassassin -s /var/log/spamd.log -d
--pidfile /var/run/spamd/spamd.pid
;;
stop)
echo "Stopping the spamassassin daemon (spamd)..."
kill `cat /var/run/spamd/spamd.pid`
;;
restart)
echo "Restarting the spamassassin daemon (spamd)..."
spamdctl stop
spamdctl start
;;
help)
cat <<HELP
stop --- stops the spamassassin daemon
start --- starts the spamassassin daemon
restart --- stops and restarts spamd
HELP
;;
*)
echo "Usage: $0 {start|stop|restart|help}"
exit 1
;;
esac
exit 0
14. Contents of /etc/logrotate.d/spamd:
====================================
# Spamassassin Logrotate
/var/log/spamd {
daily
notifempty
missingok
postrotate
/usr/bin/killall -HUP spamd 2> /dev/null || true
endscript
}
15. Contents of /usr/local/etc/freshclam.conf:
========================================
UpdateLogFile /var/log/freshclam.log
LogTime yes
LogSyslog yes
16. Contents of /var/qmail/control/simcontrol:
=========================================
:clam=yes,spam=yes,spam_passthru=yes,attach.vbs:.lnk:.scr:.wsh:.hta:.pif
17. Contents of /etc/tcp.smtp:
===========================
127.:allow,RELAYCLIENT=""
192.168.1.:allow,RELAYCLIENT=""
:allow,QMAILQUEUE="/var/qmail/bin/simscan"
--
Yours sincerely,
Teo En Ming
Singapore