Peter Beckman <beckman(_at_)nova(_dot_)org> writes:
Procmail hasn't worked so well for me so far.
Some helpful info:
SunOS beta 5.5 Generic sun4c sparc SUNW,Sun_4_75
procmail v3.11pre7 1997/04/28 written and created by Stephen R. van den Berg
Locking strategies: dotlocking, fcntl(), lockf()
Default rcfile: $HOME/.procmailrc
Your system mailbox: /var/spool/mail/beckman
Looks good.
.procmailrc
# Please check if all the paths in PATH are reachable, remove the ones that
# are not.
PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
MAILDIR=$HOME/mail # THIS DOES EXIST
#DEFAULT=/var/mail/beckman
LOGFILE=$MAILDIR/from
LOCKFILE=$HOME/.lockmail
You almost certainly don't need or want the LOCKFILE assignment.
:0
* ^To(_dot_)*BUGTRAQ(_at_)NETSPACE(_dot_)ORG
bugtraq
-rwxr-xr-x 1 root nviac 31273 Jan 13 16:54 formail*
-rwxr-sr-x 1 root mail 12341 Jan 13 16:54 lockfile*
-rwxr-xr-x 1 root nviac 5393 Jan 13 16:54 mailstat*
-rwsr-sr-x 1 root mail 62905 Jan 13 16:54 procmail*
Looks good.
Tested doing this:
1) Saved a complete mail message (headers and all) to a file, /tmp/farto
2) ran the following command in sh:
cat /tmp/farto|IFS=' '&&exec /usr/local/bin/procmail -f-||exit 75 #beckman
3) Still waiting for command to complete.
You have a shell precedence problem here: '|' has a higher precedence
than '&&'. The shell piped the 'cat' into the assignment to IFS, then
since that succeeded, it execed procmail. If you want to test it you'll
need to wrap the .forward contents in parens:
cat /tmp/farto|(IFS=' '&&exec /usr/local/bin/procmail -f-||exit 75)
(Insert spaces to make that readable.)
...
Also, how do I test procmail accurately without implementing it
(putting it in my .forward)?
What you're trying should work once you add the parens.
Philip Guenther