procmail
[Top] [All Lists]

Re: msgid Problem

2000-07-07 13:17:41
Ralf Hildebrandt asked,

| But in my log I get:

| procmail: Executing 
"/usr/bin/formail,-D,65536,/home/hildeb/.procmail/msgid.cache"

| So WHY ON EARTH are all spaces replaced by "," ??

When a command in an action line or in backquotes doesn't contain any
characters from the $SHELLMETAS string, procmail executes it itself instead
of turning it over to a shell.  If you have verbose logging turned on at that
point, procmail gives you a comma-separated list of the arguments with which
it invoked the program.

If there are any characters from $SHELLMETAS, procmail turns the whole
command, spaces and all, over to a shell as a single argument (which the
shell will break apart on its own), so if you have verbose logging on at
that point, procmail's logfile will show the spaces.

To see for yourself, take your duplicate detection recipe,

:0 Wh: $PMDIR/msgid.lock
| /usr/bin/formail -D 8192 /home/hildeb/.procmail/msgid.cache

and, for a short time while a few messages come in, add a semicolon to its
action line:

:0 Wh: $PMDIR/msgid.lock
| /usr/bin/formail -D 8192 /home/hildeb/.procmail/msgid.cache ;

That will make procmail invoke a shell to run formail (which normally would
be wasteful, as procmail can run that formail command on its own), and you'll
see that there are spaces in the logfile rather than commas.  Just remember
to take the semicolon out when your curiosity is satisfied.

Another comment: PATH should be set to include the directories where the
executables you use reside, and if you're not the sysadmin you'll never know
when the admins will move them around, so it's likely better to call an exe-
cutable by just its basename (and let procmail find it in $PATH) than to
hard-code an absolute path.  The same goes for your home directory: use the
$HOME variable instead of the hard-coded absolute path.

:0 Wh: $PMDIR/msgid.lock
| formail -D 8192 $HOME/.procmail/msgid.cache


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • msgid Problem, Ralf Hildebrandt
    • Re: msgid Problem, David W. Tamkin <=