procmail
[Top] [All Lists]

Re: Organizing

2011-11-09 22:11:36
On Wed, Nov 9, 2011 at 1:57 PM, Professional Software Engineering
<PSE-L(_at_)mail(_dot_)professional(_dot_)org> wrote:

If you're dealing with multiple HOSTS (versus multiple accounts on ONE
HOST), set up a script to invoke rsync to synchronize from your "primary"
host out to the others, using a "shared" or "common" procmail scripts
folder.  Local differences can be maintained in hostnamed folders.

I was going to suggest something similar, except that instead of using
rsync I'd prefer using a source code control system (such as git or
svn) so that you can make changes on different hosts and have them
merged, rather than having to always edit on a primary host.

I do this with my zsh configuration (so far my procmail configuration
has been sufficiently host-specific as to not be worth live-sharing).

 Wherever you need to include something that is host specific, use the
hostname as part of the filename.

Equivalently, place the files common to a host in a directory named
for that host.

Processing all the *.rc files in a directory without knowing their
names in advance, can be a little tricky.  One way is to recursively
invoke procmail, but then each rcfile must be able to stand on its
own.  Another way is to manufacture a temporary file in which there
appears an INCLUDERC for each file you want to read, and then
INCLUDERC that temporary file; but then you need to be careful that
the temporary is created with a unique name in a secure location.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>