Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 387009

Summary: net-mail/fetchmail - modified initscript to allow multiple daemons AND inlined configuration
Product: Gentoo Linux Reporter: Pandu E Poluan <pandu>
Component: Current packagesAssignee: Bernard Cafarelli <voyageur>
Status: UNCONFIRMED ---    
Severity: enhancement CC: net-mail+disabled, pandu
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: diff for fetchmail's initscript
diff for fetchmail's conf
Patch for /etc/init.d/fetchmail (net-mail/fetchmail-6.3.21)
Patch for /etc/conf.d/fetchmail (net-mail/fetchmail-6.3.21)

Description Pandu E Poluan 2011-10-13 06:20:56 UTC
This is an enhancement on the initscript I suggested (and the maintainer accepted) in bug #380371.

The enchancement is a 'drop in' to the prior initscipt (IOW, people already using the initscript in #380371 should have no problem whatsoever after patching their initscript with the provided diff).

The enhancements are:
* Allow 'inline' configuration in the related conf file in /etc/conf.d (optional, and not used by default)
* Allow to specify a configuration file not necessarily in /etc (and using custom name)
* By default, searches for ${RC_SVCNAME}.rc (notice the dot) before searching for ${RC_SVCNAME}rc (many people forgot to append the "rc"; adding a dot "." before "rc" should help remind them)


Reproducible: Always





For the reasons why I modify fetchmail's initscript as such, please refer to my reasoning in bug #380371

NOTE: Since the initscript now allows using ".rc", I also recommend the ebuild and/or man page to specify /etc/fetchmail.rc instead of /etc/fetchmailrc
Comment 1 Pandu E Poluan 2011-10-13 06:21:56 UTC
Created attachment 289729 [details, diff]
diff for fetchmail's initscript
Comment 2 Pandu E Poluan 2011-10-13 06:22:28 UTC
Created attachment 289731 [details, diff]
diff for fetchmail's conf
Comment 3 Pandu E Poluan 2011-10-13 06:28:57 UTC
Forgot to list this in the list of enhancements:

* Automatically perform the necessary chown and chmod on the rcfile before trying to start fetchmail
* As a courtesy, also perform a chown and chmod on the rcfile when stopping fetchmail, to assist in troubleshooting (e.g., 'fetchmail -v -f $rcfile')

(The reason for the two enhancements here is because fetchmail *insists* on having the file's owners *exactly* match the EUID and permissions *exactly* set to 0700)
Comment 4 Pandu E Poluan 2011-11-08 12:08:18 UTC
Meh, I noticed that my patches no longer work with the latest net-mail/fetchmail (net-mail/fetchmail-6.3.21)

I'm uploading a set of patches that work with net-mail/fetchmail-6.3.21,
Comment 5 Pandu E Poluan 2011-11-08 12:11:04 UTC
Created attachment 291965 [details, diff]
Patch for /etc/init.d/fetchmail (net-mail/fetchmail-6.3.21)

This patch works for /etc/init.d/fetchmail of net-mail/fetchmail-6.3.21. Should be a 'drop-in' patch (i.e., no need to change/rename fetchmail's rc files)
Comment 6 Pandu E Poluan 2011-11-08 12:12:48 UTC
Created attachment 291967 [details, diff]
Patch for /etc/conf.d/fetchmail (net-mail/fetchmail-6.3.21)

This patch works for /etc/init.d/fetchmail of net-mail/fetchmail-6.3.21. Should be a 'drop-in' patch (i.e., no need to change/rename fetchmail's rc files).

The main difference with the obsoleted patch #289731 is in how the example configuration is given.