Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17407 - Courier-Imap ebuild/source broken.
Summary: Courier-Imap ebuild/source broken.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-12 16:34 UTC by Gregg
Modified: 2003-08-11 10:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Courier-Imap Ebuild with Vpopmail-Roaming support (courier-imap-1.7.0.ebuild,6.33 KB, text/plain)
2003-04-28 08:29 UTC, Florian Dittmer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gregg 2003-03-12 16:34:43 UTC
Is there any reason that the courier-imap ebuild, when specifically
specifying that it should use --with-authvchkpw (vpopmail authentication)
still doesnt compile those modules for use?

I just finished getting a box setup with qmail, qmail-pop3d, courier-imap,
vpopmail, vqadmin (no ebuild), qmailadmin (also no ebuild).  And I need to
make the courier-imap work with the vpopmail libraries (vchkpw) so I can
get squirrelmail working with the virtual users.  Watching the
./configures go by I can see that it notices the vpopmail install and
passes the --with-authvchkpw but the actual authentication daemons/modules
arent compiled/installed.

Reproducible: Always
Steps to Reproduce:
1. emerge qmail-sumo (to get everything)
2. emerge vpopmail
3. emerge courier-imap
4. at this point courier-imap should have seen vpopmail and passed
--with-authvchkpw, which it did, but it still doesnt compile or install it.
Actual Results:  
qmail is operational, vpopmail is also. courier-imap is working somewhat, but
not authenticating against the right users.

Expected Results:  
It should have installed the authvchkpw files for me to use.
Comment 1 Gregg 2003-03-18 11:30:43 UTC
any work on this yet?
Comment 2 Florian Dittmer 2003-04-28 08:26:08 UTC
Although the authvchkpw is not installed to be used as a "direct" authmodule (in imap or pop config) for imap/pop, it still is available for the authdaemon. 
To get courier to auth. against vpopmail users, you have change the MAILDIR Variable in /etc/courier-imap/pop3d and imapd to "Maildir" as this is Vpopmail' s default directory name for it. Then the authentification works fine.


But the big problem is Courier' s support for Vpopmail' s "Roaming Users" (SMTP-after_pop/IMAP). I have played some time with Courier/vpopmail/qmail and the only way to get this to work is not to use Courier's authdaemon. You also have to set a CFLAG at compile time.
1) CFLAGS="-DHAVE_OPEN_SMTP_RELAY" ./configure --with-authchkpw --without-authdaemon .....

I just modified the courier-imap-1.7.0 ebuild to work correctly with the vpopmail environment as described above. When vpopmail is detected, the ebuild now won't install the authdaemon. Romaing Users now works fine here and when you install qmail+vpopmail+courier it will work as expected.

I will attach my ebuild to this bug, and hopefully somebody will review it and add it to portage... 

Btw, I just notives that courier-imap-1.7.1 has been released, and that they undefine the HAVE_OPEN_SMTP_RELAY. Seems they are are working on that code right now, so I guess the Roaming Users won' t work with new courier and we better stick to 1.7.0

Comment 3 Florian Dittmer 2003-04-28 08:29:02 UTC
Created attachment 11245 [details]
Courier-Imap Ebuild with Vpopmail-Roaming support

Ebuild for Courier-Imap to support Vpopmails Roaming-Users (SMTP after
POP/IMAP) feature.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-05-20 14:29:51 UTC
Vpopmail support seems to work for me with 1.7.2/1.7.3 however I don't have any Roaming user stuff to test. Could you please try them out and redo your ebuild from the latest 1.7.3 if needed?
Comment 5 Florian Dittmer 2003-06-10 01:54:28 UTC
Roaming users will defenitely NOT work with courierimap > 1.7.0 because of:

--
#undef HAVE_OPEN_SMTP_RELAY                                                     /* Disabled, pending fix */  
--
in authlib/preauthvchkpw.c !

I have read that this has been disabled because of some security problem with vpopmail, but no info about the security lack seems to be available nor have I found a fix. 

I guess roaming will work the way it did if you remove the #undef. But then you STILL also have to install it the way I proposed in my other note (see above).

So what to do now? Wait until issue resolved and than create an updated ebuild with my instructions? 

I guess many users would like to use romaing feature with courier-imap and vpopmail.

---

I also have a problem with my ebuild (it is my first, so please excuse me): If you look at my ebuild, at the section beginning with "# fd: remove authdaemon dependencies form init scipts when using vpopmail", I try to change the init scripts to remove the authdaemon dependency, in a temporary directory called "
install_init_scripts". I thought this would be created inside the compiling/build directory, but it is created under / ! Can you tell me how to fix this?


Comment 6 Florian Dittmer 2003-06-10 02:05:22 UTC
Found this:

http://bluedot.net/mail/archive/read.php?f=2&i=10910&t=10892

so this seems to be an authdaemon issue... which I disable in my ebuild anyway when using vpopmail....

http://bluedot.net/mail/archive/read.php?f=2&i=10876&t=10871 states:

> > I saw this in the Courier-IMAP 1.7.1 ChangeLog the other day. It has
> > stopped me from upgrading.
> >
> > * authlib/preauthvchkpw.c (auth_vchkpw_pre): Disable open_smtp_relay()
> > until fixed by authvchkpw devs.


I think this roaming users stuff is an important issue for vpopmail users, so why is this bug set to "RESOLVED"?
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-06-10 03:34:38 UTC
Florian: I'm working on a better solution for this presently.
1. net-mail/relay-ctrl feeding relaying allowed/denied information back to your mail server.
2. authvchkpw INSIDE authdaemon, so it can use relay-ctrl.

I have item 1 working properly, and I'm working on 2 presently.

When I thought about it, it makes a LOT of sense to abstract the SMTP relaying control further. What I presently have is roaming users can login on a webpage, OR they can check their IMAP/POP accounts and then they are allowed to use the SMTP server for relaying for a given amount of time.
Comment 8 Florian Dittmer 2003-06-10 04:06:26 UTC
Dear Robin: Your idea sounds very interesing! This  might really be a better solution, as this Roaming Stuff in vpopmail-courier seems to be a never ending story :(

Please let me know when you've done some progress, or when ebuilds are in portage, or maybe previously post them here. Cannot wait to test (As I have to set up two vpopmail-servers soon).

Greetings. Florian
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-08-06 13:17:30 UTC
Florian: you were interested in this.
The current courier-imap in portage has the support (see the PRERUN directive in it's config files)
and the upcoming qmail -r11 has that side of the support.
I just need to write up the docs to use relay-ctrl with them.
Comment 10 Gregg 2003-08-06 13:39:49 UTC
nice to see all this work on it, thanks everyone :)
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-08-11 10:39:16 UTC
Florian: See -r12 of qmail, and look in control/conf-smtpd for how to set it up.