procmail
[Top] [All Lists]

Re: Sendmail reading from address

1997-09-12 19:08:02
dattier(_at_)wwa(_dot_)com (David W. Tamkin) writes:
...
Third, add an extra blank line at the foot of $HOME/www/faq.html; then you
can read the two files with one cat command and not have to break them apart
to echo a blank line in between.

 :0h
 * ^TOfaq
 * !^X-Loop: swsim(_at_)swsim\(_dot_)com
 | (formail -rA"X-Loop: swsim(_at_)swsim(_dot_)com" ; \
    cat $HOME/www/faq.html $HOME/.signature) | $SENDMAIL -oi -t

If guaranteeing a blank line at the end of faq.html is not possible
(say, it's generated by someone else who's rather forgetful), you can
still do it in one call to 'cat' by piping the 'echo' into the cat:

        :0h
        * ^TOfaq
        * !^X-Loop: swsim(_at_)swsim\(_dot_)com
        | (formail -rA"X-Loop: swsim(_at_)swsim(_dot_)com" ; \
           echo '' | cat $HOME/www/faq.html - $HOME/.signature) \
          | $SENDMAIL -oi -t

That should be more efficient than two cats, though less so than the
echoless version, of course.

Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>