Re: Organizing

Bart Schaefer <[email protected]>
Newsgroups gmane.mail.procmail
Message-ID <CABkvzctX1QVNbvmTKusz-DRoESQBXCZrUz6uV=AAG75fk4URLA@mail.gmail.com>
On Wed, Nov 9, 2011 at 1:57 PM, Professional Software Engineering
<[email protected]> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.