Created attachment 365940 [details, diff] Fix dependencies of courier-imapd{,-ssl}.service and courier-authdaemond courier-imap does work right with systemd, no logins work unless courier-authdaemond is manually started. Even if both are enabled explicity it still doesn;t work - courier-authdaemond must be manually started courier-imapd.service not have a "Wants=courier-authdaemond.service", however, courier-authdaemond DOES have a "WantedBy=courier-imap.service" (which is wrong, it should "WantedBy=courier-imapd.service") Still I'm not evne sure if THAT is right. First, even with the fix, courier-authdaemond STILL doesn't start unless its explicitly enabled, but it is started with courier-imapd is once applied. This is different than the openrc behavior. Second, this is the only service to use WantedBy on a service, and not a target; while legal it doesn't fit the pattern of the other services which futher reinforces by belief this wasn't the way it was intended to work. So i've included a patch to make the dependencies work the way the did in openrc, so that starting courier-imap.service (and/or courier-imap-ssl.service) start courier-authdaemond.service without having to explicilty enable courier-authdaemond.service. It also makes enable courier-authdaemond.service start as a standalone service if enabled explicitly (while not very useful, 1) openrc let you do it and 2) it fits teh pattern of all the service systemd services) mail-mta/courier doesn't have a systemd unit (yet) with futher motivated me to fix up courier-authdaemond.service to work like the other service, as whoever writes will likely look at the units for this package for guidance.
Your solution look good! I was also having this problem, so I'll retest it on server and then get this change into portage tree.
Verified and works. Please get it into tree :)
Added -r1 service files for that. *courier-imap-4.15-r1 (24 Apr 2014) 24 Apr 2014; Manuel Rüger <mrueg@gentoo.org> +courier-imap-4.15-r1.ebuild, +files/courier-authdaemond-r1.service, +files/courier-imapd-r1.service, +files/courier-imapd-ssl-r1.service, -courier-imap-4.15.ebuild: Fix systemd service files. Patch by Salah Coronya. See bug #495068. Cleanup old.