Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 81391 - New version of maildrop available: 1.8.0 (01-Jan-2005)
Summary: New version of maildrop available: 1.8.0 (01-Jan-2005)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Fernando J. Pereda (RETIRED)
URL: http://www.courier-mta.org/maildrop/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-09 10:23 UTC by valli
Modified: 2015-09-17 05:13 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description valli 2005-02-09 10:23:15 UTC
There's a new version of maildrop available: 1.8.0 (01-Jan-2005)
Check: http://www.courier-mta.org/maildrop/

An update in portage would be keen.


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Fernando J. Pereda (RETIRED) gentoo-dev 2005-02-09 12:35:58 UTC
I'll take care of it
Comment 2 Fernando J. Pereda (RETIRED) gentoo-dev 2005-02-09 13:10:38 UTC
In CVS. Thanks

Cheers,
Ferdy
Comment 3 Kostas Kavourakis 2005-02-11 07:42:03 UTC
Be warned, maildrop version 1.8 requires the Courier Authentication library in order to support MySql and Ldap. The current ebuild does not account for this. Anyone who uses the stable branch won't have a problem with 1.7 .
Comment 4 Fernando J. Pereda (RETIRED) gentoo-dev 2005-02-11 07:46:09 UTC
Yes... Scott Taylor (gentoo developer) sent me a testing ebuild that adds this authlib stuff for mysql and ldap. Anyway thats the reason it is not on ARCH. I hope I have some free time this night to finish testing Scott's ebuild and commit it.

Thanks for reporting.
Ferdy
Comment 5 Fernando J. Pereda (RETIRED) gentoo-dev 2005-02-11 07:48:17 UTC
I reopen till I commit Scott's ebuild.
Comment 6 Fernando J. Pereda (RETIRED) gentoo-dev 2005-02-11 09:59:30 UTC
http://dev.gentoo.org/~ferdy/overlay/mail-filter/maildrop/maildrop-1.8.0-r1.ebuild

That's the ebuild I'm working on. I've tested it and seems to work fine. I'll commit it today or tomorrow. If you see any problems with it, feel free to coment them here.

Cheers,
Ferdy
Comment 7 Kostas Kavourakis 2005-02-12 03:48:29 UTC
I just have a question: Courier Authentication Library is already in portage as a seperate ebuild, shouldn't maildrop use it rather than compiling courier authlib again?
Comment 8 Fernando J. Pereda (RETIRED) gentoo-dev 2005-02-12 04:56:28 UTC
Thats what that ebuild does. It depends on courier-authlib.

Cheers,
Ferdy
Comment 9 Kostas Kavourakis 2005-02-12 05:06:34 UTC
My mistake then, sorry.
Comment 10 Fernando J. Pereda (RETIRED) gentoo-dev 2005-02-13 05:21:06 UTC
maildrop-1.8.0-r1 is on CVS. Give it a while to propagate to rsync mirrors.

Thanks.
Ferdy
Comment 11 Kostas Kavourakis 2005-02-13 09:52:03 UTC
Hello again. -r1 compiles fine, but I have a problem. I use maildrop as the transport in postfix, not as local delivery agent. That means that maildrop runs in delivery mode. But this is what happens:

 ERR: authdaemon: s_connect() failed: Permission denied

If I try this command: maildrop -d user@domain.com -V  from root prompt, it works. If I try as user vmail (the user all virtual mail belongs to), I get the above error. It seems that the courier-authlib does not take request from any user other that root. Is this a maildrop bug? Should it request the info before switching uid?
Comment 12 Kostas Kavourakis 2005-02-13 10:00:30 UTC
Hmm, I think I found the solution. If set maildrop to uid (permition 4755) it works then. I think you should set it but default in the ebuild.
Comment 13 Fernando J. Pereda (RETIRED) gentoo-dev 2005-02-13 11:14:38 UTC
courier-authlib will allow to connect to every user in the mail group and the mail user itself.

I guess you're using this scheme: http://www.postfix.org/MAILDROP_README.html#direct

You either add the 'vmail' user to the 'mail' group or tell postfix to use the 'mail' user to run maildrop instead of 'vmail'.

Setting maildrop suid root is a BadThing(TM). Tell me if it works for you.

Cheers,
Ferdy
Comment 14 Kostas Kavourakis 2005-02-13 11:28:14 UTC
Unfortunately it didn't work. I got this in the logs:
Feb 13 21:26:08 [postfix/pipe] 368A6F015B: to=<user@somedomain.com>, relay=maildrop, delay=8, status=deferred (temporary failure. Command output: terminate called after throwing an instance of 'char const*' maildrop: signal 0x06 )
Comment 15 Fernando J. Pereda (RETIRED) gentoo-dev 2005-02-13 11:40:09 UTC
Which one did you try ? Adding vmail to mail or setting postfix to use mail to call maildrop ?

Cheers,
Ferdy
Comment 16 Kostas Kavourakis 2005-02-13 11:47:11 UTC
Actually, I tried both methods, alone and in combination. The same error everytime.
Comment 17 Fernando J. Pereda (RETIRED) gentoo-dev 2005-02-13 11:55:01 UTC
Could you run it with -V 4 to see where does it fail ?

Thanks
Ferdy
Comment 18 Kostas Kavourakis 2005-02-13 11:59:43 UTC
This is what I get:
cca@defiant ~ $  maildrop -d cca@cca.dynalias.com -V 4
maildrop: authlib: groupid=1009
maildrop: authlib: userid=1009
terminate called after throwing an instance of 'char const*'
maildrop: signal 0x06

I did some more testing, It appears to be working if I set it gid, with permitions 2755. Maildrop is by default member of the mail group and owned by user root.
Comment 19 Kostas Kavourakis 2005-02-13 12:08:03 UTC
Well, it seems there is no other way, postfix does not set group id when it executes maildrop, so either it has to be gid, or courier-imap has to allow auth from user vmail. For now I'll keep maildrop to 2755
Comment 20 Fernando J. Pereda (RETIRED) gentoo-dev 2005-02-13 12:41:44 UTC
http://dev.gentoo.org/~ferdy/overlay/mail-filter/maildrop/maildrop-1.8.0-r1.ebuild

That ebuild should do it as it sets 2755 on /usr/bin/maildrop.

Scott, do you know a better solution ?

Cheers,
Ferdy
Comment 21 Yassen Damyanov 2005-02-15 20:56:15 UTC
1.8.0-r1 did not work for me:

dedi courier-imap # maildrop -d yd@troyer.co.at
ERR: authdaemon: s_connect() failed: Connection refused
Invalid user specified.

I already had courier-imap-3.0.8 wich brings an authdaemon with it --
Now I get this during each env-update:

>>> Regenerating /etc/ld.so.cache...
 * Caching service dependencies...
 *  Cannot add provide 'authdaemond', as a service with the same name exists!

strace shows this when executing maildrop:
connect(3, {sa_family=AF_FILE, path="/var/lib/courier/authdaemon/socket"}, 110) = -1 ECONNREFUSED (Connection refused)

and the socket is in /var/lib/courier-imap/authdaemon/socket

(this happens on amd64 if that makes a differenece).
What a mess -- help, somebody :-\
Comment 22 Yassen Damyanov 2005-02-15 21:05:26 UTC
Forgotten: 'Connections refused' was originally 'No such file or directory' -

ERR: authdaemon: s_connect() failed: No such file or directory
Invalid user specified.

(I tried to link to /var/lib/courier-imap/authdaemond/sock when it became 'connection refused'.)
Comment 23 Fernando J. Pereda (RETIRED) gentoo-dev 2005-02-16 00:13:02 UTC
Could you post the USE flags you used to build maildrop and courier-imap ? Is your maildrop executable setgid mail ?

Cheers,
Ferdy
Comment 24 Fernando J. Pereda (RETIRED) gentoo-dev 2005-02-16 01:14:57 UTC
Since maildrop(1) says: "It is safe to install maildrop as a root setuid program.". Thats what I did so no one will have problems with it.

maildrop-1.8.0-r2 is on CVS give it a while to appear on the rsync mirrors.

Reopen if it doesn't fix for you (though it should :P)

Regards,
Ferdy