Hi, some of you might have followed my previous postings, but due to the fact that I did not get an answer/solution for weeks (!) I decided to open up a new bug report. Additionally I was in the meantime able to trace the problem down to the source of it (which is in fact courier-authlib). But back to my problem: Firstly I must admit I *do* have significant knowledge of qmail, vpopmail and stuff but I can't get this combination working with SMTP-after-POP which is provided by a package called relay-ctrl on Gentoo. So I removed all previously installed and related packages and started to re-install the entire server. It should be noted that courier-authlib is in /etc/courier now and NOT in /etc/courier-imap as it was before. However I still end up having the same problem because when I start the courier-authlib I get the following error message: Feb
Hi, some of you might have followed my previous postings, but due to the fact that I did not get an answer/solution for weeks (!) I decided to open up a new bug report. Additionally I was in the meantime able to trace the problem down to the source of it (which is in fact courier-authlib). But back to my problem: Firstly I must admit I *do* have significant knowledge of qmail, vpopmail and stuff but I can't get this combination working with SMTP-after-POP which is provided by a package called relay-ctrl on Gentoo. So I removed all previously installed and related packages and started to re-install the entire server. It should be noted that courier-authlib is in /etc/courier now and NOT in /etc/courier-imap as it was before. However I still end up having the same problem because when I start the courier-authlib I get the following error message: Feb 9 13:17:07 myserver authdaemond: modules="authvchkpw relay-ctrl-allow", daemons=5 Feb 9 13:17:07 myserver authdaemond: Installing libauthvchkpw Feb 9 13:17:07 myserver authdaemond: Installation complete: authvchkpw Feb 9 13:17:07 myserver authdaemond: Installing librelay-ctrl-allow Feb 9 13:17:07 myserver authdaemond: librelay-ctrl-allow.so: cannot open shared object file: No such file or directory I did take a brief look at the source code of the relay-ctrl ebuild and I can't figure out why it is looking for a librelay-ctrl-allow.so here? I mean this file doesn't exist and it won't be created by relay-ctrl. Even manually creating this file does not work: ln -sf /usr/bin/relay-ctrl-allow /usr/lib/courier-authlib/librelay-ctrl-allow.so I then get the following error message: Feb 9 13:21:08 my_server authdaemond: modules="authvchkpw relay-ctrl-allow", daemons=5 Feb 9 13:21:08 my_server authdaemond: Installing libauthvchkpw Feb 9 13:21:08 my_server authdaemond: Installation complete: authvchkpw Feb 9 13:21:08 my_server authdaemond: Installing librelay-ctrl-allow Feb 9 13:21:08 my_server authdaemond: /usr/lib/courier-authlib/librelay-ctrl-allow.so: cannot dynamically load executable Any ideas? Which is courier-authlib looking for this file? How can I create it or how can I force relay-ctrl to create this? Thanks a lot, Werner. Reproducible: Always Steps to Reproduce: 1. Install qmail, vpopmail and courier-imap 2. Install relay-ctrl and configure SMTP-after-POP 3. Start courier-authlib to see it causing an error Actual Results: I end up getting the following error message in /var/log/messages: Feb 9 13:17:07 myserver authdaemond: modules="authvchkpw relay-ctrl-allow", daemons=5 Feb 9 13:17:07 myserver authdaemond: Installing libauthvchkpw Feb 9 13:17:07 myserver authdaemond: Installation complete: authvchkpw Feb 9 13:17:07 myserver authdaemond: Installing librelay-ctrl-allow Feb 9 13:17:07 myserver authdaemond: librelay-ctrl-allow.so: cannot open shared object file: No such file or directory Expected Results: I am excepting SMTP-after-POP to work without any problems and courier-authlib should use the executeable of relay-ctrl but not the shared object. emerge info Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20040808-r1, 2.6.10-gentoo-r6 i686) ================================================================= System uname: 2.6.10-gentoo-r6 i686 AMD Athlon(tm) XP 3000+ Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 8 2005, 14:46:45)] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.8.5-r3, 1.6.3, 1.5, 1.7.9-r1, 1.4_p6, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" 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="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X apache2 bash-completion berkdb bzlib cdb crypt dedicated fam gd gdbm gif imap imlib innodb java jpeg libwww maildir mcal memlimit mhash mime ming mysql ncurses nls pam pcre pdflib perl php png python qmail readline sasl slang sockets spell ssl tokenizer truetype truetype-fonts type1-fonts unicode x86 xml2 zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
*** Bug 80768 has been marked as a duplicate of this bug. ***
*** Bug 80323 has been marked as a duplicate of this bug. ***
Hi ! We've been discussing for a while about: a) your problem. b) your attitude. About a) we have to say that you must take a look at http://www.courier-mta.org/authlib/?NEWS.html -> 'The minuses'. And have concluded that what you have to do is either stick with courier-imap-3.0.8 as long as you can or b) switch to smtp-auth which is so easy to set up and fairly secure. About b) we I have to say that you haven't been nice, spamming the bugtracker and not wanting to accept the developers answers was a BadThing(TM). Thanks for reporting. Best Regards, Ferdy
Well ok I would like to apologize for my behaviour and it certainly wasn't my intention to insult someone. Sorry for that guys I was just feeling lost as well some people did respond to my postings but it seemed to me that nobody was really responsible and willing to help me. Again apologies for that and I will be more polite in the future. Thanks Werner.
now that my exam week is mostly over (apart from a paper I'm procrastining, due in 4 hours), I've implemented a workaround so that relay-ctrl-allow can continue to be used to provide smtp-after-pop3/imap. Emerge courier-imap-4.0.1-r1 and see the instructions in the ChangeLog located with the ebuilds. After that, please report back if it works for you or not.
Thanks Robin Johnson for creating courier-imap-4.0.1-r1. I emerged it but I am probably too stupid to find the information you are talking about in the emerge: # equery files courier-imap | grep -i changelog /usr/share/doc/courier-imap-4.0.1-r1/ChangeLog.gz /usr/share/doc/courier-imap-4.0.1-r1/imap/ChangeLog.gz Beside those files I also took a look at all other documentation but I am really sorry but I can't find your new documentation. Would you please point me to the right file? Thanks a lot. Bye, Werner.
"see the instructions in the ChangeLog located with the ebuilds" /usr/portage/net-mail/courier-imap/ChangeLog
Hi, ok I followed the new documentation and I get the following error messages in /var/log/messages when starting the daemons: Feb 12 13:14:59 my_server pop3d: /usr/lib/courier-imap/courier-pop3d.indirect: line 3: /etc/courier-imap/pop3d: Permission denied Feb 12 13:14:59 my_server pop3d: relay-ctrl-allow[6582]: Warning: $RELAY_CTRL_DIR is not set.. Where do I have to set $RELAY_CTRL_DIR? I have it in /etc/relay-ctrl/RELAY_CTRL_DIR: # cat /etc/relay-ctrl/RELAY_CTRL_DIR /var/spool/relay-ctrl/allow Regarding the other error message, I have found the problem: # cat /usr/lib/courier-imap/courier-pop3d.indirect #!/bin/bash XMAILDIR="$1" source /etc/courier-imap/pop3d eval ${LOGINRUN} \ /usr/sbin/courier-pop3d \ ${XMAILDIR} # ls /etc/courier-imap/pop3d -la -rw------- 1 root root 2840 Feb 12 13:08 /etc/courier-imap/pop3d So only root can read/write this file. A possible workaround might be "chmod +r /etc/courier-imap/pop3d" or what do you guys think? Thanks a lot. By the way, when we got this thing working, will it be supported in future versions as well? I have had conversations with many users and they are really in favor of SMTP-after-POP... Bye, Werner.
for RELAY_CTRL_DIR, it sounds like you removed the PRERUN line from /etc/courier-imap/{pop3d,imapd}. To recap, this should be on the end of your pop3d and imapd files in /etc/courier-imap/ PRERUN="envdir /etc/relay-ctrl relay-ctrl-chdir" LOGINRUN="relay-ctrl-allow" I don't get the permission denied error, but it seems that regardless the environment variables needed are already set, so it should be safe to remove the 'source' line anyway.
http://bugs.gentoo.org/show_bug.cgi?id=81540#c9 does this work for those that run ssl setups tho? That is the one question noone is asking here and should be asked everything always seems to read for pop3d/imapd but nothing on imapd-ssl or pop3d-ssl strange how that works.
Jory A. Pratt: yes, comment #9 would work fine for SSL setups as well. You do NOT need to add the PRERUN/LOGINRUN to the ssl config files. To see why (namely the ssl versions just source the same config files in a different order). Just run: diff /usr/lib/courier-imap/gentoo-imapd.rc /usr/lib/courier-imap/gentoo-imapd-ssl.rc -u
Robbin so your saying I can remove the PRERUN/LOGINRUN from my ssl configs for courier-imap and everything should be fine? Also what are permissions suppose to be on current for /var/log/mail/current seems my current isnt even showing up so I was gonna run a touch then change permissions.
"Robbin so your saying I can remove the PRERUN/LOGINRUN from my ssl configs for courier-imap and everything should be fine?" Yes, the LOGINRUN/PRERUN settings should be /etc/courier-imap/{imapd,pop3d} only. "Also what are permissions suppose to be on current for /var/log/mail/current seems my current isnt even showing up so I was gonna run a touch then change permissions." What syslog setup do you use? These are the lines from my metalog config: === Mail : facility = "mail" logdir = "/var/log/mail" === And perms of: /var/log/mail: chmod 700 /var/log/mail/*: chmod 644
Robin I use metalog was acting strange I got it straight now dont know what its attitude is all about these days LOL. By the way when we gonna see vpopmail 5.4.9 make it into portage.
Ok, we are getting closer to a final solution, thanks to everyone who helped me so far (especially Robin!). Anyway, I really made a mistake before so I added the following lines to /etc/courier-imap/pop3d and imapd and restarted all services: # nano /etc/courier-imap/pop3d PRERUN="envdir /etc/relay-ctrl relay-ctrl-chdir" LOGINRUN="relay-ctrl-allow" # nano /etc/courier-imap/imapd PRERUN="envdir /etc/relay-ctrl relay-ctrl-chdir" LOGINRUN="relay-ctrl-allow" Now when I initate a POP3 connection to my server I get in /var/log/messages the following entries: Feb 13 16:55:20 my_server pop3d: Connection, ip=[84.161.92.252] Feb 13 16:55:20 my_server pop3d: LOGIN, user=werner@XXXXXX.com, ip=[84.161.92.252] Feb 13 16:55:21 my_server pop3d: LOGOUT, user=werner@XXXXXX.com, ip=[84.161.92.252], top=0, retr=0, time=1, stls=1 And finally in /var/spool/relay-ctrl/allow there is a file called 84.161.92.252 (great!) which wasn't created in the first place: # ls /var/spool/relay-ctrl/allow/ -la total 8 drwxrwxrwt 2 root root 4096 Feb 13 16:55 . drwx------ 3 root root 4096 Feb 12 13:06 .. -rw-rw-rw- 1 vpopmail vpopmail 0 Feb 13 16:55 84.161.92.252 Everything looks fantastic up to here but I still get the "This domain isn't in my list of allowed rcpthosts" when I try to do SMTP-after-POP which means that relaying is not yet fully working. Robin, do you know, what's missing here? By the way, there are many people watching this thread and I do believe SMTP-after-POP is a functionality that many people still use so it's not only me. How did your exams go? Thanks and all the best, Werner.
Ah, quick follow-up: I forgot to mention that I still get the permission denied error message in /var/log/messages, so I just removed the "source ..." line from the script: # tail -f /var/log/messages Feb 13 16:50:38 my_server pop3d: /usr/lib/courier-imap/courier-pop3d.indirect: line 3: /etc/courier-imap/pop3d: Permission denied # nano /usr/lib/courier-imap/courier-pop3d.indirect Remove line "source ..." And everything still seems to work fine except relaying. Thanks a lot, Werner
strange I did as Robin said and everything works fine I even use SMTP AUTH before granite all mine is ssl tho imap pop3 flawless and no errors once I removed the source line as Robin suggested.
Ok, finally it works :-) Great work, fantastic. I forgot to add the relay-ctrl lines to /var/qmail/control/conf-smtpd, after restarting the services everything is ok: # nano /var/qmail/control/conf-smtpd QMAIL_TCPSERVER_PRE="${QMAIL_TCPSERVER_PRE} envdir /etc/relay-ctrl relay-ctrl-chdir" QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} relay-ctrl-check" Thanks a lot. Again I would to thank Robin and Jory for helping me with this problem. I hope that SMTP-after-POP support will be available in future versions as well! Bye, Werner
ok, so I'm going to close this now, and file a bug to get the qmail vhosting docs updated.