Re: filtering messages not always recognized
On Wed, Apr 06, 2005 at 09:57:32PM +0200, Michelle Konzack
<linux4michelle@xxxxxxxxxx> wrote:
>
> Am 2005-04-06 14:17:11, schrieb Eugene:
>
> > I use formail as well. Here's the script for ~/bin/appendmessage:
> >
> > ============================== snip here ==============================
> > #!/bin/sh
> >
> > mesg_file="/tmp/message-id"
> > mesg_id=`cat $mesg_file`
> > tmp_file="/tmp/mutt_$$_$PPID.tmp"
> > formail -A "$mesg_id" < $1 > $tmp_file
> > mv $tmp_file $1
> > sleep 1
> > ============================== snip here ==============================
>
> Why not try:
>
> ============================== snip here ==============================
> #!/bin/sh
>
> mesg_file=/tmp/message-id
> tmp_file=`tempfile`
> cat $1 |formail -A `cat $mesg_file` > $tmp_file
> mv $tmp_file $1
> ============================== snip here ==============================
>
> Tried and it works.
Logically, there's nothing different between your script and my script.
The only major difference is your use of the "tempfile" program, which
is not standard on all Linux distros, any *BSD distro, and certainly
anything Mac OS X which I use. :-) You piped the message to formail
via cat, whereas I used normal shell redirection and saved a process.
However, it still doesn't work for me. Maybe it's an OS X issue...?
*sigh*