procmail
[Top] [All Lists]

Re: keeping a copy

1999-11-28 22:17:40
On Sun, 28 Nov 1999, Philip Guenther wrote:

pg> "S.Toms" <tomas(_at_)primenet(_dot_)com> writes:
pg> >On Mon, 15 Nov 1999, ++++ Gary ++++ wrote:
pg> >g> is it possible to also receive a copy of the email from the sender ? At 
the
pg> >g> moment, the auto responder is emailed to them, but I don't receive their
pg> >g> email. Is this possible?
pg> >
pg> >  I believe that if you add the c flag ie: :0c  it should do what your
pg> >asking for.
pg> 
pg> Yep.
pg> 
pg> 
pg> >:0c
pg> >* ^TOinfo
pg> >*!^FROM_DAEMON
pg> >*!^X-Loop: info(_at_)web-hosting(_dot_)co(_dot_)uk
pg> >|(formail -r -A "Precedence: junk"\
pg> >  -I"From: Auto Reply " \
pg> >  -I"Subject: Information Request " \
pg> >  -A "X-Loop: info(_at_)web-hosting(_dot_)co(_dot_)uk"; \
pg> >  cat $filedir/info.txt ) | $sendmail -t
pg> 
pg> I see two other bugs in the above: $sendmail should be capitalized and

  Does it have to be capitalized though? I agree with capitalizing the
variables to distinguish them, but if he sets the variable with lower
case, won't that work? 

pg> there should be a space before the backslash that continues the first
pg> line of the action.  As it was originally written without indentation,

  Does that also include lines that end commands with ;\ ? I have various
filters that have ;\ immediately following the command line, where as I
have just a space \ when its a formail argument.

pg> the lack of a space caused the "Precendence: junk" and the "-IFrom:
pg> Auto Reply " to be joined into a single argument, resulting in the
pg> addition just a Precedence: header field with the value
pg>     junk-IFrom: Auto Reply 
pg> 
pg> Unless you have a specific reason for doing so, it's an excellant habit
pg> to always put a space or tab before a newline used to continue an action.
pg> 
pg>     :0 c
pg>     *   ^TO_info
pg>     * ! ^FROM_DAEMON
pg>     * ! ^X-Loop: info(_at_)web-hosting\(_dot_)co\(_dot_)uk
pg>     |(formail -r \
pg>         -A"Precedence: junk" \
pg>         -A"X-Loop: info(_at_)web-hosting(_dot_)co(_dot_)uk" \
pg>         -I"From: Auto Reply" \
pg>         -I"Subject: Information Request"; \
pg>       cat $filedir/info.txt \
pg>      ) | $SENDMAIL -t
pg> 
pg> 

  Why was the closing parenthesis placed on the same line as the sendmail
command? I would have put it on the same line as the cat command. Is that
a habit on your part or am I missing something vital? Again, I'm just
curious, you and era would know allot more about this then I would and I
don't want to make silly mistakes. :)

pg> Philip Guenther
pg> 

-- 
        S.Toms - tomas(_at_)primenet(_dot_)com - New homepage coming soon
                   SuSE Linux v6.2+ - Kernel 2.2.13

Economists state their GNP growth projections to the nearest tenth of a
percentage point to prove they have a sense of humor.
                -- Edgar R. Fiedler

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