Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 820209 - net-mail/fetchmail should optionally RDEPEND on acct-user/fetchmail
Summary: net-mail/fetchmail should optionally RDEPEND on acct-user/fetchmail
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-25 13:42 UTC by sebaFlame
Modified: 2022-07-09 22:29 UTC (History)
1 user (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 sebaFlame 2021-10-25 13:42:48 UTC
I'm running fetchmail as mail:mail for integration with dovecot/postfix. It always recreates /var/run/fetchmail with fetchmail:fetchmail as owner. This way dovecot can not access the PID file. I always have to manually set the correct owner to mail:mail (while fetchmail runs correctly as mail:mail).

These are the changes I made to init and conf:

--- /usr/portage/net-mail/fetchmail/files/fetchmail.initd       2019-12-08 16:04:37.334388324 +0100
+++ /etc/init.d/fetchmail       2021-10-25 15:30:46.839368166 +0200
@@ -21,18 +21,17 @@
        else
                fidfile=/var/lib/fetchmail/.fetchids
        fi
-       if [ ! -d ${piddir} ]; then
-               checkpath -q -d -o fetchmail:fetchmail -m 0755 ${piddir} || return 1
-       fi
+       checkpath -q -d -o ${user}:${group} -m 0755 ${piddir} || return 1
 }

 start() {
         checkconfig || return 1
        ebegin "Starting ${RC_SVCNAME}"
        start-stop-daemon --start --pidfile ${pid_file} \
-               --user fetchmail --exec /usr/bin/fetchmail \
+               --user ${user} --exec /usr/bin/fetchmail \
                -- -d ${polling_period} -f ${rcfile} \
-               --pidfile ${pid_file} -i ${fidfile}
+               --pidfile ${pid_file} -i ${fidfile} \
+               --logfile /var/log/fetchmail.log
        eend ${?}
 }


--- /usr/portage/net-mail/fetchmail/files/fetchmail.confd       2019-12-08 16:04:37.334388324 +0100
+++ /etc/conf.d/fetchmail       2021-09-07 18:14:07.442781799 +0200
@@ -3,7 +3,10 @@

 # Polling frequency in seconds
 # (fetchmail will daemonize and check for new mail at this interval)
-polling_period="60"
+polling_period="3600"

 # Directory where the pid file is kept
 pid_dir="/var/run/fetchmail"
+
+user="mail"
+group="mail"

Reproducible: Always
Comment 1 Conrad Kostecki gentoo-dev 2022-07-09 22:29:35 UTC
ping