running procmail on the contents of /var/mail/$USER
Tim Writer
tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org
Wed Jul 28 16:49:05 UTC 2004
Robert Brockway <robert-5LEc/6Zm6xCUd8a0hrldnti2O/JbrIOy at public.gmane.org> writes:
> On Wed, 28 Jul 2004, William O'Higgins wrote:
>
> > Yes, that's where the attempts above come from. These recipies seem to
> > be based on getting processed via procmail, and I am trying to get an
> > mbox file *into* procmail. I tried "cat /var/mail/$USER | formail -ds
> > procmail", but I get the same result - the command starts, but doesn't
> > do anything and needs to be Ctrl-C'd. So, the problem remains - what
>
> Sounds like a STDIN problem to me...
>
> > syntax is required to get the individual messages in my spool to be
> > processed by procmail? Thanks again.
>
> Here is a working example I put together a few months back:
>
> cat ./inbox | formail -s procmail ~foouser/etc/procmail.incoming
>
> No the username is not really foouser but I'm not handing out real
> username info (even if the box is hidden behind several firewalls :)
Congratulations! You both win a useless use of cat award. :-) Instead of:
cat file | command arg1 ...
you can always write:
command arg1 ... < file
Anyway, I don't see anything wrong with William's syntax. There's no
requirement to specify an rc file with procmail, if you don't it will just
use your ~/.procmailrc. In other words, William's syntax was equivalent to:
formail -ds procmail ~/.procmailrc < /var/mail/$USER
Since it just sits there (and the syntax is okay), I would suspect a procmail
problem. Do you have a procmail log? What does it say? Perhaps you do some
locking in your .procmailrc? If you don't have a log file, add:
LOGFILE=$HOME/procmail.log
to the top of your .procmailrc.
--
tim writer <tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org> starnix inc.
905.771.0017 ext. 225 thornhill, ontario, canada
http://www.starnix.com professional linux services & products
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list