My setup (qmail, vpopmail and courier-imap) was just alright until I decided to update my version of courier-imap to 4.0.1 today (haven't changed my config at all ever since!). I have emerged courier-imap and have restarted all the necessary services but when I now try to send an email my server says "Domain isn't in my list of allowed rcpthosts" which means in qmail-speak that I am not allowed to relay. The directory that should hold the database of allowed IP addresses /var/spool/relay-ctrl/allow is empty as well and there is no file being created there. My /etc/courier/authlib/authdaemonrc file looks as follows (digest): authmodulelist="authvchkpw" authmodulelistorig="authvchkpw" My config files /etc/courier-imap/{imapd,imapd-ssl,pop3d,pop3d-ssl) all include these lines: MAILDIR=.maildir MAILDIRPATH=.maildir PRERUN="envdir /etc/relay-ctrl relay-ctrl-chdir" LOGINRUN="relay-ctrl-allow" Finally my /var/qmail/control/conf-smtpd looks like this: # Configuration file for qmail-smtpd # $Header: /var/cvsroot/gentoo-x86/mail-mta/qmail/files/1.03-r13/conf-smtpd,v 1.2 2004/07/18 03:29:51 dragonheart Exp $ # Stuff to run before tcpserver #QMAIL_TCPSERVER_PRE="" # Stuff to run qmail-smtpd #QMAIL_SMTP_PRE="" # Stuff to after qmail-smtpd #QMAIL_SMTP_POST="" # this turns off the IDENT grab attempt on connecting TCPSERVER_OPTS="${TCPSERVER_OPTS} -R" # You might want to use rblsmtpd with this, but you need to fill in a RBL server here first # see http://cr.yp.to/ucspi-tcp/rblsmtpd.html for more details QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} rblsmtpd -rsbl-xbl.spamhaus.org -rrelays.ordb.org -rsbl.spamhaus.org -rbl.spamcop.net -rdnsbl.njabl.org" # If you are interested in providing POP or IMAP before SMTP type relaying, # emerge relay-ctrl, then uncomment the next 2 lines QMAIL_TCPSERVER_PRE="${QMAIL_TCPSERVER_PRE} envdir /etc/relay-ctrl relay-ctrl-chdir" QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} relay-ctrl-check" # In /etc/courier-imap/authdaemonrc add the next line to the end: #authmodulelist="${authmodulelist} relay-ctrl-allow" # Then in /etc/courier-imap/{imapd,imapd-ssl,pop3d,pop3d-ssl} # Add this at the end #PRERUN="${PRERUN} envdir /etc/relay-ctrl relay-ctrl-chdir" # This next block is for SMTP-AUTH # This provides the LOGIN, PLAIN and CRAM-MD5 types # the 'cmd5checkpw' used in $QMAIL_SMTP_AUTHCHECKPASSWORD supports CRAM-MD5 # and reads it's data from /etc/poppasswd # see the manpage for cmd5checkpw for details on the passwords # uncomment the next four lines to enable SMTP-AUTH #QMAIL_SMTP_AUTHHOST=$(<${QMAIL_CONTROLDIR}/me) #[ -z "${QMAIL_SMTP_POST}" ] && QMAIL_SMTP_POST=/bin/true #QMAIL_SMTP_CHECKPASSWORD="/bin/cmd5checkpw" #QMAIL_SMTP_POST="${QMAIL_SMTP_AUTHHOST} ${QMAIL_SMTP_CHECKPASSWORD} ${QMAIL_SMTP_POST}" Does anyone know this problem? How can I solve this? Reproducible: Always Steps to Reproduce: 1. Emerge courier-imap 4.0.1 with qmail and vpopmail 2. Configure SMTP-after-POP with relay-ctrl 3. Actual Results: Relaying was denied Expected Results: Relaying should be allowed based on the information database created by relay-ctrl Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.11.6-grsec-vs1.9.5 i686) ================================================================= System uname: 2.6.11.6-grsec-vs1.9.5 i686 AMD Athlon(tm) XP 3000+ Gentoo Base System version 1.6.12 dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.10 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/alias /var/qmail/control /var/vpopmail/domains /var/vpopmail/etc" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="X aliaschain apache2 bash-completion berkdb bzlib cdb cnamefix crypt curl dedicated doc flash fwdzone gd gdbm gif imap imlib innodb java jpeg libwww maildir mcal memlimit mhash mime ming multipleip mysql ncurses nls pam pcre pdflib perl php png python qmail readline sasl semanticfix slang sockets spamassassin spell ssl tiff tokenizer truetype truetype-fonts type1-fonts unicode vhosts x86 xml2 zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
Please post permssions on /var/spool/relay-ctrl
Hi, my permissions are as follows: # cd /var/spool/ # ls -la total 36 drwxr-xr-x 9 root root 4096 Jul 12 00:39 . drwxr-xr-x 19 root root 4096 Apr 10 15:08 .. -rw-r--r-- 1 root root 0 Jul 11 08:58 .keep drwxrwxrwt 2 root root 4096 Jan 15 2005 calendar drwxr-x--- 4 root cron 4096 Jan 15 2005 cron drwxrwxr-x 2 root mail 4096 Jan 15 2005 mail drwxr-xr-x 10 qscand qscand 4096 Jul 19 16:56 qmailscan drwx------ 3 root root 4096 Feb 12 13:06 relay-ctrl drwxrwxrwt 2 root root 4096 Feb 28 17:26 samba
Ok, it's definitely relay-ctrl again because I created a file as root (file name = my IP address) and now I am able to relay without any problems: # touch 84.161.X.Y # pwd /var/spool/relay-ctrl/allow So for some bizarre reason courier-imap is ignoring relay-ctrl.
I seem to recall something about the permissions, I am unable to find bug reference to this at the moment. As soon as I do locate which bug in which we were discussing permissions I will post ya a link back to it.
Well the solution is easy: net-mail/courier-imap-4.0.1-r1 fixes the problem (whatever it was) - DON'T USE courier-imap-4.0.1 it's broken (should be masked)!
Please see bug 98745
Current stable is 4.0.4, closing a stale bug.