Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 387009 - net-mail/fetchmail - modified initscript to allow multiple daemons AND inlined configuration
Summary: net-mail/fetchmail - modified initscript to allow multiple daemons AND inline...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-13 06:20 UTC by Pandu E Poluan
Modified: 2019-10-27 08:56 UTC (History)
2 users (show)

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


Attachments
diff for fetchmail's initscript (fetchmail-init.diff,2.28 KB, patch)
2011-10-13 06:21 UTC, Pandu E Poluan
Details | Diff
diff for fetchmail's conf (fetchmail-conf.diff,1.55 KB, patch)
2011-10-13 06:22 UTC, Pandu E Poluan
Details | Diff
Patch for /etc/init.d/fetchmail (net-mail/fetchmail-6.3.21) (fetchmail.init.patch,2.89 KB, patch)
2011-11-08 12:11 UTC, Pandu E Poluan
Details | Diff
Patch for /etc/conf.d/fetchmail (net-mail/fetchmail-6.3.21) (fetchmail.conf.patch,1.46 KB, patch)
2011-11-08 12:12 UTC, Pandu E Poluan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.