Re: procmail forward and auto-reply to the same address not working
- From: "rezzz" <jasonrezzz@xxxxxxxxx>
- Date: 13 Jul 2006 12:18:46 -0700
Garen Erdoisa wrote:
rezzz wrote:
[snip]>
Well here's the recipe I wrote, but for some reason the auto-responder
comes back repeatedly, and the actual message sent to the person is
sent repeatedly as well
:0
* ^To:.*alias@xxxxxxxxxx
{
:0 c
! real_person@xxxxxxxxxx, real_person2@xxxxxxxxxx,
real_person3@xxxxxxxxxx
This part is sending a Cc: to the listed recipients resulting in one
copy of the original message to each.
:0:
* !^X-Loop: alias@xxxxxxxxxx
| (formail -r -A "From: Someone Else<real_person4@xxxxxxxxxx>"
-A"X-Loop: alias@xxxxxxxxxx" ; cat autoreply.txt) | sendmail -t
In this recipe, formail will generate an auto-reply header based on the
original message, with the target of the reply being the address in the
Return-path: header, instead of the address in the From: header. If the
two addresses are different, then it could generate an unexpected
result. Also, procmail will stop processing the mail at this point
because the auto-reply recipe isn't using the "c" (carbon copy) flag.
The 2nd colon tells procmail to use an implied lockfile, however there
is no delivery to a file here, it's a delivery to a program, so procmail
will be unable to intuit a lockfile name.
Procmail will treat this as a delivering recipe with an action, which
may cause some other issues. Among them the original mail will be lost
to the intended recipient since formail will discard the original
message body and most of the original message headers in favor of the
auto-reply header it's being asked to generate.
If you want the auto-responder to go to the address in the From: header
use formail -rt instead of formail -r
It's also important to use the -oi switch on sendmail if you are
appending a file as the body of the message. That tells sendmail to
expect an EOF instead of a .CR. to terminate the message body.
}
any reason why this is happening?
So, all that said, here are some suggested corrections to your recipe.
:0
* ^To:.*alias@xxxxxxxxxx
{
# Send carbon copies of the incoming message to the following people
:0 c
! real_person@xxxxxxxxxx, real_person2@xxxxxxxxxx, real_person3@xxxxxxxxxx
# Generate an autoreply to the envelope sender
# Note use formail -rt to reply to the From: header instead
:0c
* !^X-Loop: alias@xxxxxxxxxx
| ( formail -r -A "From: Someone Else<real_person4@xxxxxxxxxx>" \
-A "X-Loop: alias@xxxxxxxxxx" ; \
cat autoreply.txt) | $SENDMAIL -oi -t
}
:0
$DEFAULT
Thank you for all your help!
.
- References:
- procmail forward and auto-reply to the same address not working
- From: rezzz
- Re: procmail forward and auto-reply to the same address not working
- From: Garen Erdoisa
- Re: procmail forward and auto-reply to the same address not working
- From: rezzz
- Re: procmail forward and auto-reply to the same address not working
- From: AK
- Re: procmail forward and auto-reply to the same address not working
- From: Garen Erdoisa
- Re: procmail forward and auto-reply to the same address not working
- From: rezzz
- Re: procmail forward and auto-reply to the same address not working
- From: rezzz
- Re: procmail forward and auto-reply to the same address not working
- From: rezzz
- Re: procmail forward and auto-reply to the same address not working
- From: rezzz
- Re: procmail forward and auto-reply to the same address not working
- From: AK
- Re: procmail forward and auto-reply to the same address not working
- From: rezzz
- Re: procmail forward and auto-reply to the same address not working
- From: Garen Erdoisa
- procmail forward and auto-reply to the same address not working
- Prev by Date: Re: procmail forward and auto-reply to the same address not working
- Next by Date: question about Undisclosed-recipients:;
- Previous by thread: Re: procmail forward and auto-reply to the same address not working
- Next by thread: Re: procmail forward and auto-reply to the same address not working
- Index(es):
Relevant Pages
|