On 10/01/2014 7:14 PM, Thomas Raschbacher wrote:
On 2014-01-09 15:51, Reindl Harald wrote:
Am 09.01.2014 15:38, schrieb Ken Drummond:
thanks for maintaining dbmail for gentoo. I seem to have a problem with the .pid file in 3.1.7. After a reboot I get

dbmail-imapd[3704]: [0x750230] EMERGENCY:[pidfile] pidfile_create(+113): Cannot open pidfile [/var/run/dbmail/dbmail-imapd.pid], error was [No such file or directory]

in /var/log/dbmail.err when I try to start dbmail. Somehow the /run/dbmail directory gets deleted (/var/run is a symlink to /run). I'm not really sure why it's using the dbmail subdirectory because the /etc/dbmail/dbmail.conf
file I have

pid_directory = /var/run

in the [DBMAIL] section.

Not really sure if this is a gentoo specific error, and it's easily fixed by manually creating the dbmail directory. My server normally stays up for months at a time so not a huge impact, but I do need to remember
an go and manually fix things when a reboot happens

i guess you are using systemd

/run is a tmpfs andany software package using subfoldfers there needs tmpfiles.d
http://www.freedesktop.org/software/systemd/man/tmpfiles.d.html

[root@mail:~]$ cat /usr/lib/tmpfiles.d/dbmail.conf
d /run/dbmail 0755 dbmail dbmail -

[root@mail:~]$ rpm -q --file /usr/lib/tmpfiles.d/dbmail.conf
dbmail-3.1.9-4.fc19.20140107.rh.e5ad1e579562e22fc215b6186696eaba07213cb1.x86_64


You're welcome ;)

nope I don't use systemd anyway I found the problem:

from the init script:
....
PID_DIR=/var/run/dbmail
....
 --pidfile $PID_DIR/$PROGRAM.$PID
....

I guess since the pid file is specified in the config anyway it could be argued, that having the PID_DIR in the init script as well is pointless.
What do you think should we:
A) keep it in there too (and potentially confuse people)
B) keep it and use the default from dbmail.conf
C) remove it and maybe put a comment in the script that it is specifiedi n the config (( D) read the path from the config and use it --- i don't really want to do that since it could lead to all sorts of problems ))

I tend lean towards C what do you think? -- also I got some new init scripts prepared, which I am testing at the moment to have one per service again since I am not keen on restarting all services all the time when something crashes (also from monit automatically so ..) I'll send them to paul - or make a git pull request if I figure out how that works again [never done it before] - to be included in the next release.

Regards


Thanks Harald,

I actually don't use systemd. I use the gentoo default, openrc (version 0.12.4). I think Thomas found the problem.



Thomas,

yes I see now, the init script does set the pidfile, making the setting in dbmail.conf irrelevant. Are these init scripts gentoo specific or are they standard?

I'm not sure it matters which option is chosen if the directory specified (either in the init script or .conf file) doesn't exist, then this is going to fail until the directory is created (with the appropriate security). Or does dbmail create the directory if the the setting in the .conf file is used?

Thanks,
Ken.
_______________________________________________
DBmail mailing list
DBmail@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to