|
|
Need help with sendmail / procmail
Hello:
I am having an issue with sendmail & procmail. I'm writing a user
procmail recipe (.procmailrc) to handle email forwarding, and I need
to maintain the envelope sender, just like the .forward file does.
The issue is that in the procmail recipe, if I use either the
"$SENDER" or "$1" variables, they contain no values (they're blank).
I am stumped, am I totally missing something here? I have read all
over and I have not been able to find out what might cause this to
happen.
I'm running on a Red Hat 7.2 system but using sendmail 8.13.6 and
procmail 3.21. Procmail itself is working fine except for this issue
with the variables.
Can anybody help??? Thank you very much...
--
Chris
|
|
0
|
|
|
|
Reply
|
jachall
|
2/11/2007 3:17:45 AM |
|
In article <1171163865.277008.134360@h3g2000cwc.googlegroups.com>,
jachall wrote:
> Hello:
>
> I am having an issue with sendmail & procmail. I'm writing a user
> procmail recipe (.procmailrc) to handle email forwarding, and I need
> to maintain the envelope sender, just like the .forward file does.
> The issue is that in the procmail recipe, if I use either the
> "$SENDER" or "$1" variables, they contain no values (they're blank).
> I am stumped, am I totally missing something here? I have read all
> over and I have not been able to find out what might cause this to
> happen.
Sendmail normally does not normally pass those variables to procmail by
default.
The envelope sender is normally put into the Return-Path: header. However
if the sender provides the Return-Path: header in the SMTP message body
during the SMTP transaction, then sendmail will not overwrite it.
If the header is absent, then sendmail will normally insert that header
prior to the handoff to procmail.
You may be able to extract it from the Berkley mailbox format From header
(the one without the colon). Procmail can see that header, but normally it
will not be visible to an email client.
>
> I'm running on a Red Hat 7.2 system but using sendmail 8.13.6 and
> procmail 3.21. Procmail itself is working fine except for this issue
> with the variables.
>
Try a simple recipe with procmail to see what it sees in those headers:
LOGFILE=${HOME}/procmail.log
NL="
"
# Look for the Berkley mailbox From header used
# internally as a message separator.
:0
* ^()\/From .*
{
FROMHEADER="${MATCH}"
LOG="[$$]$_: FROMHEADER=${FROMHEADER} ${NL}"
}
:0 E
{ LOG="[$$]$_: No From header found.${NL}" }
:0
* ^()\/Return-Path: .*
{
RETURNPATHHEADER=${MATCH}
LOG="[$$]$_: RETURNPATHHEADER=${RETURNPATHHEADER}${NL}"
}
:0 E
{ LOG="[$$]$_: No Return-Path: header found.${NL}" }
> Can anybody help??? Thank you very much...
>
--
Garen
|
|
0
|
|
|
|
Reply
|
Garen
|
2/11/2007 6:35:34 AM
|
|
[ Added comp.mail.sendmail as recipient ]
Garen Erdoisa <gerdoisa@cableone.net> writes in comp.mail.misc:
> The envelope sender is normally put into the Return-Path: header. However
> if the sender provides the Return-Path: header in the SMTP message body
> during the SMTP transaction, then sendmail will not overwrite it.
Are you sure?
$ fgrep -i Return-Path conf.c
{ "return-path", H_FORCE|H_ACHECK|H_BINDLATE, NULL },
$
/ Kari Hurtta
|
|
0
|
|
|
|
Reply
|
Kari
|
2/11/2007 7:22:49 AM
|
|
In article <5dslddgnue.fsf@Hurtta06k.keh.iki.fi>, Kari Hurtta wrote:
> [ Added comp.mail.sendmail as recipient ]
>
> Garen Erdoisa <gerdoisa@cableone.net> writes in comp.mail.misc:
>
>> The envelope sender is normally put into the Return-Path: header. However
>> if the sender provides the Return-Path: header in the SMTP message body
>> during the SMTP transaction, then sendmail will not overwrite it.
>
> Are you sure?
It's something I've tested in the past (few years back) by telneting to my
own SMTP server and submitting messages directly to the server to see how it
reacted under various circumstances.
Since you challenged the statement, I just tried duplicating this
behavior again, and found that sendmail is replacing the return path
header given in the SMTP message body DATA with the envelope sender data.
So somewhere along the line that behavior changed. I stand corrected.
Interesting...
>
> $ fgrep -i Return-Path conf.c
> { "return-path", H_FORCE|H_ACHECK|H_BINDLATE, NULL },
> $
>
--
Garen
|
|
0
|
|
|
|
Reply
|
Garen
|
2/11/2007 8:08:19 AM
|
|
Garen Erdoisa <gerdoisa@cableone.net> writes:
> In article <5dslddgnue.fsf@Hurtta06k.keh.iki.fi>, Kari Hurtta wrote:
>> [ Added comp.mail.sendmail as recipient ]
>>
>> Garen Erdoisa <gerdoisa@cableone.net> writes in comp.mail.misc:
>>
>>> The envelope sender is normally put into the Return-Path: header. However
>>> if the sender provides the Return-Path: header in the SMTP message body
>>> during the SMTP transaction, then sendmail will not overwrite it.
>>
>> Are you sure?
>
> It's something I've tested in the past (few years back) by telneting to my
> own SMTP server and submitting messages directly to the server to see how it
> reacted under various circumstances.
>
> Since you challenged the statement, I just tried duplicating this
> behavior again, and found that sendmail is replacing the return path
> header given in the SMTP message body DATA with the envelope sender data.
> So somewhere along the line that behavior changed. I stand corrected.
>
> Interesting...
<quote src-file="RELEASE_NOTES">
SENDMAIL RELEASE NOTES
[...]
8.2/8.2 1993/07/11
[...]
Fix problem that causes old Return-Path: line to override new
Return-Path: line (conf.c needs H_FORCE to avoid
re-using old value). From Motonori Nakamura.
</quote>
> [...]
--
[pl>en: Andrew] Andrzej Adam Filip : anfi@priv.onet.pl : anfi@xl.wp.pl
Before You Ask: http://anfi.homeunix.net/sendmail/B4UAsk-Sendmail.html
http://anfi.homeunix.net/sendmail/ [orkut,linkedin,xing]
|
|
0
|
|
|
|
Reply
|
anfi
|
2/11/2007 8:47:45 AM
|
|
|
4 Replies
47 Views
(page loaded in 0.078 seconds)
Similiar Articles: Dealing with incoming mail - comp.mail.miscCan anyone help me with the configuration of postfix or procmail to get this ... I need to get procmail to deliver in maildir ... by spamhaus.org - comp.mail.sendmail Invoking procmail from sendmailAlcor On-Line Help catching spam with procmail. DevX: Procmail 'Passthrough ... this approach - I personally have no need for invoking procmail from within sendmail ... Configuring Procmail as a Sendmail rule-invoked mailerI do not utilize this approach - I personally have no need for invoking procmail from within sendmail ... It might help if you create a config file with the above ... 7/30/2012 10:51:00 AM
|
|
|
|
|
|
|
|
|