Re: Regard To-Envelope for alternates?

2022-09-19 Thread Bastian
On 13Sep22 09:49-0700, Will Yardley wrote:
> I agree that would be useful. That said, I usually handle the scenario
> you describe this way:
> send-hook '~C ^mutt-users@mutt\.org$' 'my_hdr From: Will Yardley 
> '

I had a look into the code and also experimented a bit how 
mutt_find_user_in_envelope [1] works. But as far as I see, there is no 
easy way to make it also look into further headers, because the ENVELOPE 
struct [2] does not provide those.

  1: https://gitlab.com/muttmua/mutt/-/blob/master/alias.c#L692
  2: https://gitlab.com/muttmua/mutt/-/blob/master/mutt.h#L739

Anyways, your reply gave me the idea, if the `reply-hook` might work. 
But I also did not succeed here. I think it is not possible with mutt 
hooks to work with the matched groups like below, is it?

--- paste:
reply-hook ~h'^Envelope-to:\ (.\*)$' set from=\1
--- eop

This does not work because if the expression is matched, the from is set 
to "1", group referencing is not applied or I do it wrongly. Also the 
alternates matching is run afterwards, which is good. So when the 
alternates match, they'll overwrite what the reply-hook set before.

Any idea how to use the reply-hook properly?


Cheers,
-- 
Bastian


Re: Regard To-Envelope for alternates?

2022-09-13 Thread Will Yardley
On Tue, Sep 13, 2022 at 04:42:17PM +, Tim Chase wrote:
> 
> While I wish I had a satisfactory answer, this is mostly to chime
> in that I too wish that reverse_name would consult the
> Envelope-To/Delivered-To.  This includes this mutt list, where I
> have to manually change my default From: to my mutt-ML-specific
> address.  It's not overly taxing, but it's annoying to manually do
> what could be done automatically.

I agree that would be useful. That said, I usually handle the scenario
you describe this way:
send-hook '~C ^mutt-users@mutt\.org$' 'my_hdr From: Will Yardley 
'

w



Re: Regard To-Envelope for alternates?

2022-09-13 Thread Tim Chase
On 2022-09-12 14:24, Bastian wrote:
> I am a happy user of Alternative Addresses [1] in mutt, together with 
> reverse_name and reverse_realname. 
[snip] 
> However, when the mail is sent for instance to a maillist or without 
> setting the headers to/c, then mutt sets the default From address when 
> replying (setting realname).
> 
> Would it be feasible to also let the alternates scan the mail headers 
> and find the header 'To-Envelope'?

While I wish I had a satisfactory answer, this is mostly to chime
in that I too wish that reverse_name would consult the
Envelope-To/Delivered-To.  This includes this mutt list, where I
have to manually change my default From: to my mutt-ML-specific
address.  It's not overly taxing, but it's annoying to manually do
what could be done automatically.

-tkc






Re: Regard Envelope-to: for alternates?

2022-09-12 Thread Will Yardley
On Mon, Sep 12, 2022 at 02:28:43PM +0200, Bastian wrote:
> On 12Sep22 14:24+0200, Bastian wrote:
> > Would it be feasible to also let the alternates scan the mail headers 
> > and find the header 'To-Envelope'?
> 
> Sorry, the header is labled Envelope-to:

I agree having some kind of ability to guess here might be a useful
feature for those using $alternates, $reverse_name, etc.

One issue is that I don't believe there is a standard for this per
rfc2076 etc.

You will see X-Apparently-To, `X-Envelope-To`, etc (or nothing)
depending on the MTA and other circumstances (for example, some versions
of some MTAs can't reliably assign this in the case where messages may
be BCCd to multiple recipients). Maybe someone could make an option to
include a header (set to null by default) whose value is examined for
help in determining what email the message was addressed to?

the procmailrc(5) man page (if you look for TO and TO_) has an
interesting list of the regex that it uses internally for more or less
this purpose.

w



Re: Regard Envelope-to: for alternates?

2022-09-12 Thread Bastian
On 12Sep22 14:24+0200, Bastian wrote:
> Would it be feasible to also let the alternates scan the mail headers 
> and find the header 'To-Envelope'?

Sorry, the header is labled Envelope-to:

-- 
Bastian


Regard To-Envelope for alternates?

2022-09-12 Thread Bastian
Dear all,

I am a happy user of Alternative Addresses [1] in mutt, together with 
reverse_name and reverse_realname. I use this primarily when replying to 
a mail. This works if the mail is addressed (in headers to, and cc) to 
me. Then mutt recognizes and sets the from correctly to the matches 
address.

  1:  http://www.mutt.org/doc/manual/#alternates

However, when the mail is sent for instance to a maillist or without 
setting the headers to/c, then mutt sets the default From address when 
replying (setting realname).

Would it be feasible to also let the alternates scan the mail headers 
and find the header 'To-Envelope'? For me, this seems to always contain 
the correct address to which the mail was delivered to me. Well, I do 
not know where this header comes from; could be that my exim sets these 
during delivery to maildir.


Cheers,
-- 
Bastian


Re: envelope sender address setting

2019-09-23 Thread Claus Assmann
On Mon, Sep 23, 2019, rand pie wrote:

> How to set the sendmail binary sender address
> base on different email addresses with mutt?

*-hook might work, e.g., something like:

folder-hook . "set sendmail=\"/usr/sbin/sendmail -i -oem -fUSER@B.C\""
send-hook ietf-smtp "set sendmail=\"/usr/sbin/sendmail -i -oem 
-fietf-smtp@B.C\""


envelope sender address setting

2019-09-23 Thread rand pie
Hello list.

How to set the sendmail binary sender address
base on different email addresses with mutt?



Re: Pulling the From address using Envelope-To:

2016-02-25 Thread Cameron Simpson

On 26Feb2016 15:17, Cameron Simpson  wrote:
Failing that, you can fairly easily write scripts which emit mutt directives 
based on header contents. I have a script "mhdrs" which can emit message 
headers as shell settings, which you can then source in a shell script

file, which you can then source.


That sentence is pretty mangled. I mean you can process a message and emit mutt 
directives, then source those directives from mutt.


Cheers,
Cameron Simpson 


Re: Pulling the From address using Envelope-To:

2016-02-25 Thread Cameron Simpson

On 25Feb2016 20:50, Tim Chase <m...@tim.thechases.com> wrote:

On 2016-02-25 21:34, Patrick Shanahan wrote:

> Is there some setting I've missed, or some way around this to have
> mutt extract my From: address using the Envelope-To: header?

send-hook  'my_hdr From: Your Addr <your.addr...@123.us>'


It looks like that would require me to hand-specify every mailing
list's From: address.  I was hoping to auto-extract it from the
Envelope-To: like the reverse_name=yes does with the To: headers.

While I can do that, I'd rather not dig into every From: address I've
sent from, and add my umpteen mailing-lists.  If I can avoid it.
Especially since "reverse_name" is already doing mostly what I want.


Had you considered a message-hook based on the Envelope-To:? You might still 
need to enumerate your alternate addresses (untested):


 message-hook '~h ^Envelope-To: *<me@isp1>' 'my_hdr From: Your Addr 
<your.addr...@123.us>'

A send-hook with the same pattern might be better.

Failing that, you can fairly easily write scripts which emit mutt directives 
based on header contents. I have a script "mhdrs" which can emit message 
headers as shell settings, which you can then source in a shell script

file, which you can then source. Round about, but (again untested):

Have a little shell script like this:

 #!/bin/sh
 #
 # Compute and emit mutt settings for any message.
 #
 mhdrs=$( mhdrs -sh | sed 's/^/hdr_/' )
 eval "$mhdrs"
 if [ -n "$hdr_ENVELOPE_TO" ]
 then
   echo "my_hdr From: $hdr_ENVELOPE_TO"
 fi
 ... whatever else ...

and then:

 message-hook . 'compute_mutt_settings.sh 
tempfilesource tempfile'

A little awkward. You can't just:

 source `compute_mutt_settings.sh`

because you need to pipe the message into it, per message, first.

You can get mhdrs here:

 https://bitbucket.org/cameron_simpson/css/src/tip/bin/mhdrs

Just a thought.

Cheers,
Cameron Simpson <c...@zip.com.au>


Re: Pulling the From address using Envelope-To:

2016-02-25 Thread Patrick Shanahan
* Tim Chase <m...@tim.thechases.com> [02-25-16 21:59]:
> On 2016-02-25 21:34, Patrick Shanahan wrote:
> > > Is there some setting I've missed, or some way around this to have
> > > mutt extract my From: address using the Envelope-To: header?
> > 
> > send-hook  'my_hdr From: Your Addr <your.addr...@123.us>'
> 
> It looks like that would require me to hand-specify every mailing
> list's From: address.  I was hoping to auto-extract it from the
> Envelope-To: like the reverse_name=yes does with the To: headers.

No, only those where reverse_name is not accomplishing your wishes.
 
> While I can do that, I'd rather not dig into every From: address I've
> sent from, and add my umpteen mailing-lists.  If I can avoid it.
> Especially since "reverse_name" is already doing mostly what I want.

I guess then you must provide an answer to "If I can avoid it".
-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  @ptilopteri
http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri
http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2
Registered Linux User #207535@ http://linuxcounter.net


Re: Pulling the From address using Envelope-To:

2016-02-25 Thread Patrick Shanahan
* Tim Chase <m...@tim.thechases.com> [02-25-16 21:03]:
> [tried on IRC, but it was pretty quiet there, so trying here]
> 
> I'm trying to transition from claws-mail to mutt and have hit a snag.
> I'd like to configure mutt to automatically extract the receiving
> address and use that as the From: address for replies.  So I started
> with the guide found here:
> 
>   http://dev.mutt.org/trac/wiki/UseCases/MultiAccounts
> 
> I've set reverse_name=yes and have my "alternatives" set correctly.
> So now when I reply to a message where I'm in the To: field (and
> possibly the CC field), it correctly sets the From: based on the
> corresponding recipient in the message to which I'm replying.
> 
> However, for certain mailing-lists, "my" address only appears in the
> Envelope-To: header of the message source.  When I attempt to use the
> above settings, it defaults to my usual From address, which suggests
> it's not trying to compare the Envelope-To: headers against the
> "alternatives" for the purpose of extracting my address.
> 
> Is there some setting I've missed, or some way around this to have
> mutt extract my From: address using the Envelope-To: header?

send-hook  'my_hdr From: Your Addr <your.addr...@123.us>'

Make sure you have set relevant "mail-list" in ~/.muttrc, lists and/or
subscribe

-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  @ptilopteri
http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri
http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2
Registered Linux User #207535@ http://linuxcounter.net


Pulling the From address using Envelope-To:

2016-02-25 Thread Tim Chase
[tried on IRC, but it was pretty quiet there, so trying here]

I'm trying to transition from claws-mail to mutt and have hit a snag.
I'd like to configure mutt to automatically extract the receiving
address and use that as the From: address for replies.  So I started
with the guide found here:

  http://dev.mutt.org/trac/wiki/UseCases/MultiAccounts

I've set reverse_name=yes and have my "alternatives" set correctly.
So now when I reply to a message where I'm in the To: field (and
possibly the CC field), it correctly sets the From: based on the
corresponding recipient in the message to which I'm replying.

However, for certain mailing-lists, "my" address only appears in the
Envelope-To: header of the message source.  When I attempt to use the
above settings, it defaults to my usual From address, which suggests
it's not trying to compare the Envelope-To: headers against the
"alternatives" for the purpose of extracting my address.

Is there some setting I've missed, or some way around this to have
mutt extract my From: address using the Envelope-To: header?

Thanks,

-tkc

PS: in case it matters, these are maildir message files synced to my
IMAP server using offlineimap.




Re: prevent gmail from rewriting from envelope

2010-07-14 Thread Ben Moon
Dear Nicolas,
 Notice I don't set use_envelope_from.
*grummel* still doesn't work. I was just thinking: do have some official 
dns-name on your mutt box? I'm behind a router in a private network and thought 
that this might be the problem; somehow.

Thank you

Ben


Re: prevent gmail from rewriting from envelope

2010-07-12 Thread Ben Moon
   In mutt I set my_hdr From: m...@email and in gmail I remove the envelope
   rewriting (somewhere in the options).
 
  thank you for your answer. Could you please be a bit more precise about the
  'somewhere in the options'? I haven't found anything. It works with 
  thunderbird,
  though.
 
 - settings
   - accounts and import
 - send mail as
   - edit info
 - Specify a different reply-to address (optional): nothing
hmm, strange, that doesn't work here. 
I changed for the n...@gmail.com the reply-to address to othern...@yahoo.com but
with mutt there's no effect. Even if it would work, how do you manage more than 
1 different address?

Thank you again

Ben


Re: prevent gmail from rewriting from envelope

2010-07-12 Thread Nicolas Sebrecht
On Thu, Jul 08, 2010 at 11:10:35AM +0200, Ben Moon wrote:
 
 Dear Nicolas,
If I send the mail with mutt the 'from: otheru...@yahoo.de' is always 
   changed to 'from: usern...@gmail.com'. Is there a way to prevent this 
   rewriting by google when I use mutt?
  
  Yes, this is my current work flow.
  
  In mutt I set my_hdr From: m...@email and in gmail I remove the envelope
  rewriting (somewhere in the options).
 thank you for your answer. Could you please be a bit more precise about the
 'somewhere in the options'? I haven't found anything. It works with 
 thunderbird,
 though.
 
 @ Nathaniel
 Yes, since set use_envelope_from=no is default, I have tried both

Notice I don't set use_envelope_from.

-- 
Nicolas Sebrecht


Re: prevent gmail from rewriting from envelope

2010-07-08 Thread Ben Moon
Dear Nicolas,
   If I send the mail with mutt the 'from: otheru...@yahoo.de' is always 
  changed to 'from: usern...@gmail.com'. Is there a way to prevent this 
  rewriting by google when I use mutt?
 
 Yes, this is my current work flow.
 
 In mutt I set my_hdr From: m...@email and in gmail I remove the envelope
 rewriting (somewhere in the options).
thank you for your answer. Could you please be a bit more precise about the
'somewhere in the options'? I haven't found anything. It works with thunderbird,
though.

@ Nathaniel
Yes, since set use_envelope_from=no is default, I have tried both

Thank you

Ben


Re: prevent gmail from rewriting from envelope

2010-07-08 Thread Nicolas Sebrecht
On Thu, Jul 08, 2010 at 11:10:35AM +0200, Ben Moon wrote:
 
If I send the mail with mutt the 'from: otheru...@yahoo.de' is always 
   changed to 'from: usern...@gmail.com'. Is there a way to prevent this 
   rewriting by google when I use mutt?
  
  Yes, this is my current work flow.
  
  In mutt I set my_hdr From: m...@email and in gmail I remove the envelope
  rewriting (somewhere in the options).

 thank you for your answer. Could you please be a bit more precise about the
 'somewhere in the options'? I haven't found anything. It works with 
 thunderbird,
 though.

- settings
  - accounts and import
- send mail as
  - edit info
- Specify a different reply-to address (optional): nothing

-- 
Nicolas Sebrecht


prevent gmail from rewriting from envelope

2010-07-07 Thread Ben Moon
Dear Mutt-guru's,
I recently needed to create a gmail account 'username' and now I try to use 
its smtp server as relay for my other mail addresses. The 
'from: otheru...@yahoo.de' remains by using its webmail and thunderbird. 
However,
it doesn't with mutt. If I send the mail with mutt the 
'from: otheru...@yahoo.de' is always changed to 'from: usern...@gmail.com'. Is 
there a way to prevent this rewriting by google when I use mutt?
Here's the relevant config:
  set imap_user = username
  set folder= imaps://imap.gmail.com:993
  set spoolfile=+INBOX
  set use_envelope_from=yes
  set smtp_url = smtps://usern...@smtp.gmail.com:465/

I also tried ssmtp with set sendmail

Thank you very much in advance

Ben


Re: prevent gmail from rewriting from envelope

2010-07-07 Thread Nicolas Sebrecht
On Wed, Jul 07, 2010 at 03:41:05PM +0200, Ben Moon wrote:

   If I send the mail with mutt the 
 'from: otheru...@yahoo.de' is always changed to 'from: usern...@gmail.com'. 
 Is 
 there a way to prevent this rewriting by google when I use mutt?

Yes, this is my current work flow.

In mutt I set my_hdr From: m...@email and in gmail I remove the envelope
rewriting (somewhere in the options).

-- 
Nicolas Sebrecht


envelope-to and scoring

2009-03-04 Thread ssizarit
I'm currently trying to set up a scoring policy for mail sent to
u...@example.com.

The problem is, I only get mass-mailings to this adress, with
u...@example.com usually residing in the BCC. But the header contains
envelope-to: u...@example.com, I just don't get how to access this
information.

I tried ~L ~t ~C and whatnot.


Re: envelope-to and scoring

2009-03-04 Thread Ed Blackman

On Wed, Mar 04, 2009 at 02:35:16PM +0100, ssiza...@gmail.com wrote:

I'm currently trying to set up a scoring policy for mail sent to
u...@example.com.

The problem is, I only get mass-mailings to this adress, with
u...@example.com usually residing in the BCC. But the header contains
envelope-to: u...@example.com, I just don't get how to access this
information.

I tried ~L ~t ~C and whatnot.


~h '^Envelope-to: u...@example.com'

Adjustments may be necessary if your mailer adds something other than a 
bare email address to the Envelope-to line.


Ed


signature.txt
Description: Digital signature


Re: envelope-to and scoring

2009-03-04 Thread ssizarit
On Wed, Mar 4, 2009 at 15:14, Ed Blackman e...@edgewood.to wrote:
 On Wed, Mar 04, 2009 at 02:35:16PM +0100, ssiza...@gmail.com wrote:

 I'm currently trying to set up a scoring policy for mail sent to
 u...@example.com.

 The problem is, I only get mass-mailings to this adress, with
 u...@example.com usually residing in the BCC. But the header contains
 envelope-to: u...@example.com, I just don't get how to access this
 information.

 I tried ~L ~t ~C and whatnot.

 ~h '^Envelope-to: u...@example.com'

 Adjustments may be necessary if your mailer adds something other than a bare
 email address to the Envelope-to line.


 ~h '^Envelope-to: u...@example.com'

works when I'm limiting messages once inside the folder, but

score '~h '^Envelope-to: u...@example.com'' 41

in my .muttrc doesn't. Mutt complains about errors. I've tried
replacing ' with  besides removing it completely, putting \ in front
of my dots and removing everything but the domain name. But I still
get errors.


Re: envelope-to and scoring

2009-03-04 Thread Anders Rayner-Karlsson
* ssiza...@gmail.com ssiza...@gmail.com [20090304 17:02]:
[snip]
 
  ~h '^Envelope-to: u...@example.com'
 
 works when I'm limiting messages once inside the folder, but
 
 score '~h '^Envelope-to: u...@example.com'' 41
 
 in my .muttrc doesn't. Mutt complains about errors. I've tried
 replacing ' with  besides removing it completely, putting \ in front
 of my dots and removing everything but the domain name. But I still
 get errors.

score '~h ^Envelope-to: u...@example.com' 41

That ought to work, but do read the manual on scoring. Not everything
(as in patterns) works and I have a vague recollection that ~h is one
of the things that don't work with scoring, same as matching on what
is in the body of a message.

-- 
Anders Rayner-Karlsson and...@trudheim.co.uk
All-Round Linux Tinkerer, RHCE and PITA DeLuxe


Re: envelope-to and scoring

2009-03-04 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wednesday, March  4 at 05:01 PM, quoth ssiza...@gmail.com:
 ~h '^Envelope-to: u...@example.com'

works when I'm limiting messages once inside the folder, but

score '~h '^Envelope-to: u...@example.com'' 41

in my .muttrc doesn't.

Obviously. It gets parsed as the strings:

 score
 ~h ^Envelope-to:
 u...@example.com
 41

The reason is that each ' terminates the quoted string before it. If 
you want embedded quotes, you either have to escape them (which is 
annoying) or you have to use a different kind of quote for the 
embedded version. For example, this would work:

 score '~h ^Envelope-to: u...@example.com' 41

The difference is that mutt's parser will see that as the following 
strings:

 score
 ~h ^Envelope-to: u...@example.com
 41

If you had replaced ALL single quotes with double quotes, e.g.:

 score ~h ^Envelope-to: u...@example.com 41

That would get parsed the exact same way as having all of the quotes 
be single quotes. The key is *mixing* the quotes. You could also use 
double-quotes for the outside string, and it would still work, like 
so:

 score ~h '^Envelope-to: u...@example.com' 41

Here's what I mean by escaping quotes:

 score ~h \^Envelope-to: u...@example.com\ 41

That way you're telling mutt which quotes should be considered to end 
the string and which are instead *part* of the string. When they're 
read, the backslashes get stripped off, so mutt sees that line like 
this:

 score
 ~h ^Envelope-to: u...@example.com
 41

Does that make sense?

~Kyle
- -- 
University politics are vicious precisely because the stakes are so 
small.
 -- Henry Kissinger
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iEYEARECAAYFAkmuqdMACgkQBkIOoMqOI16PmgCfVYPBOHu6csh/Cwtgrg/k5BfJ
g84AoJywxgHQFZ+FUxdA7suR6oYYNW+C
=feZJ
-END PGP SIGNATURE-


Re: envelope-to and scoring

2009-03-04 Thread ssizarit
On Wed, Mar 4, 2009 at 17:18, Kyle Wheeler kyle-m...@memoryhole.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On Wednesday, March  4 at 05:01 PM, quoth ssiza...@gmail.com:
 ~h '^Envelope-to: u...@example.com'

works when I'm limiting messages once inside the folder, but

score '~h '^Envelope-to: u...@example.com'' 41

in my .muttrc doesn't.

 Obviously. It gets parsed as the strings:

     score
     ~h ^Envelope-to:
     u...@example.com
     41

 The reason is that each ' terminates the quoted string before it. If
 you want embedded quotes, you either have to escape them (which is
 annoying) or you have to use a different kind of quote for the
 embedded version. For example, this would work:

     score '~h ^Envelope-to: u...@example.com' 41

 The difference is that mutt's parser will see that as the following
 strings:

     score
     ~h ^Envelope-to: u...@example.com
     41

 If you had replaced ALL single quotes with double quotes, e.g.:

     score ~h ^Envelope-to: u...@example.com 41

 That would get parsed the exact same way as having all of the quotes
 be single quotes. The key is *mixing* the quotes. You could also use
 double-quotes for the outside string, and it would still work, like
 so:

     score ~h '^Envelope-to: u...@example.com' 41

 Here's what I mean by escaping quotes:

     score ~h \^Envelope-to: u...@example.com\ 41

 That way you're telling mutt which quotes should be considered to end
 the string and which are instead *part* of the string. When they're
 read, the backslashes get stripped off, so mutt sees that line like
 this:

     score
     ~h ^Envelope-to: u...@example.com
     41

 Does that make sense?


Well it would make sense if any of your examples worked, but
unfortunately they don't.

I've tried mixing  and ' myself, except for the
escaping-quotes-trick. That's new, but gives me an error message as
well.


Re: envelope-to and scoring

2009-03-04 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wednesday, March  4 at 05:33 PM, quoth ssiza...@gmail.com:
 Well it would make sense if any of your examples worked, but 
 unfortunately they don't.

 I've tried mixing  and ' myself, except for the 
 escaping-quotes-trick. That's new, but gives me an error message as 
 well.

Ah! Right! Because, according to the manual 
(http://www.mutt.org/doc/devel/manual.html#score-command):

 note: For efficiency reasons, patterns which scan information not
 available in the index, such as ˜b, ˜B or ˜h, may not be used

Personally, I think that's a silly restriction, but you'd have to take 
that up with the developers.

~Kyle
- -- 
Formal symbolic representation of qualitative entities is doomed to 
its rightful place of minor significance in a world where flowers and 
beautiful women abound.
 -- Albert Einstein
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iEYEARECAAYFAkmut/UACgkQBkIOoMqOI15AegCfSKuUcfDOeH8OqbqeTauruubA
lcAAmwc55oxf21OidREgvkKSUCSJ81nS
=n94l
-END PGP SIGNATURE-


Re: envelope-to and scoring

2009-03-04 Thread ssizarit
On Wed, Mar 4, 2009 at 18:18, Kyle Wheeler kyle-m...@memoryhole.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On Wednesday, March  4 at 05:33 PM, quoth ssiza...@gmail.com:
 Well it would make sense if any of your examples worked, but
 unfortunately they don't.

 I've tried mixing  and ' myself, except for the
 escaping-quotes-trick. That's new, but gives me an error message as
 well.

 Ah! Right! Because, according to the manual
 (http://www.mutt.org/doc/devel/manual.html#score-command):

     note: For efficiency reasons, patterns which scan information not
     available in the index, such as ˜b, ˜B or ˜h, may not be used

 Personally, I think that's a silly restriction, but you'd have to take
 that up with the developers.

Ah ok, sorry I didn't see that myself.
I guess I'll just use ~f mailinglist or something like that to take
care of the scoring.

Thanks,
Meli


Can mutt set envelope at message-compose-time?

2002-08-03 Thread Mel

Can mutt set the envelope to the user's choice *at the time of
message compose* to an address different from the message's
From:  address?

How is it done?  For starters, I'd probably want to:

 unset envelope_from

and maybe comment-out this in my .muttrc:

my_hdr From: Mel [EMAIL PROTECTED]   (or not)


Can the envelope be changed *per message* without setting it globally?

(Doing it by using a non-standard patch to mutt doesn't count.  Setting it
globally without the ability to change per message is insufficient, and
having it always copied from the From: header address is also insufficient.)

(I know that an X-Authentication-Warning will appear -- that's okay.
I know the only way to change that is to add my user to the trusted
users section of my sendmail.cf., and that it can't be changed
from within mutt.)

Those are the basic requirements to make sure that
[EMAIL PROTECTED]
can be easily used as the envelope, a la various mailing lists.





Re: Can mutt set envelope at message-compose-time?

2002-08-03 Thread Sven Guckes

* Mel [EMAIL PROTECTED] [2002-08-03 08:28]:
 Can mutt set the envelope to the user's choice
 *at the time of message compose* to an address
 different from the message's From:  address?

you can only set or unset the envelope_from variable -
but not set what goes into the header.  this is MTA stuff.

 How is it done?  For starters, I'd probably want to:
  unset envelope_from

 and maybe comment-out this in my .muttrc:
 my_hdr From: Mel [EMAIL PROTECTED]   (or not)

make up your mind! ;-)

 Can the envelope be changed *per message* without setting it globally?

  send-hook . unset envelope_from
  send-hook pattern set envelope_from

 Doing it by using a non-standard patch to mutt doesn't count.  Setting it
 globally without the ability to change per message is insufficient, and
 having it always copied from the From: header address is also insufficient.

then what, exactly, are the rules for your sufficiency?

 (I know that an X-Authentication-Warning will appear --
 that's okay.  I know the only way to change that is to add
 my user to the trusted users section of my sendmail.cf.,
 and that it can't be changed from within mutt.)

well, if you can change the sendmail.cf - then why don't you?

 Those are the basic requirements to make sure that
 [EMAIL PROTECTED]
 can be easily used as the envelope, a la various mailing lists.

whatever..

Sven



Re: Can mutt set envelope at message-compose-time?

2002-08-03 Thread Nicolas Rachinsky

* Mel [EMAIL PROTECTED] [2002-08-03 04:28 -0400]:
 Can mutt set the envelope to the user's choice *at the time of
 message compose* to an address different from the message's
 From:  address?

Yes, of course!

 How is it done?  For starters, I'd probably want to:

unset envelope_from

then change $sendmail to the desired value:
sendmail=/usr/sbin/sendmail -oem -oi -f [EMAIL PROTECTED]


Nicolas



Re: Can mutt set envelope at message-compose-time?

2002-08-03 Thread Melvin Q Watchpocket

On Sat 08/03/02 at 11:50 AM +0200,
Sven Guckes [EMAIL PROTECTED] wrote:

 * Mel [EMAIL PROTECTED] [2002-08-03 08:28]:
  Can mutt set the envelope to the user's choice
  *at the time of message compose* to an address
  different from the message's From:  address?

 you can only set or unset the envelope_from variable -
 but not set what goes into the header.  this is MTA stuff.


Then we can't *really* say that mutt gives
us total control over headers,  can we?

Is there *any* Mail User Agent that can do this from
within the MUA itself, without having to invoke
Sendmail to do it (if even from the command-line)?




Re: Can mutt set envelope at message-compose-time?

2002-08-03 Thread Michael Tatge

Melvin Q Watchpocket ([EMAIL PROTECTED]) muttered:
 Then we can't *really* say that mutt gives
 us total control over headers,  can we?
 Is there *any* Mail User Agent that can do this from
 within the MUA itself, without having to invoke
 Sendmail to do it (if even from the command-line)?

First of all the envelope is no header. It is createted by the MTA. No
MUA has controll over it. Second you can controll the envelope with
sendmails -f option which can easily be set in mutt.

HTH,

Michael
-- 
Running Windows on a Pentium is like having a brand new Porsche but only
be able to drive backwards with the handbrake on.
(Unknown source)

PGP-Key: http://www-stud.ims.uni-stuttgart.de/~tatgeml/public.key



Re: Can mutt set envelope at message-compose-time?

2002-08-03 Thread Nicolas Rachinsky

* Melvin Q Watchpocket [EMAIL PROTECTED] [2002-08-03 08:20 -0400]:
 On Sat 08/03/02 at 12:50 PM +0200,
 Nicolas Rachinsky [EMAIL PROTECTED] wrote:
 
  * Mel [EMAIL PROTECTED] [2002-08-03 04:28 -0400]:
   Can mutt set the envelope to the user's choice *at
   the time of message compose* to an address
   different from the message's From:  address?
 
  Yes, of course!
 
 
 I mean, can this be done strictly from within mutt,
 without having to invoke Sendmail or any other program.

This is from within mutt. Mutt always calls sendmail to deliver mails.

And I'm sure you can use send-hooks and macros to achieve, what you
want.

Nicolas



Set envelope: realy shouldn't be touched?

2002-08-03 Thread Melvin Q Watchpocket

On Sat 08/03/02 at 03:02 PM +0200,
Sven Guckes [EMAIL PROTECTED] wrote:
[that I wrote:]

  Then we can't really say that mutt gives us
  total control over headers, can we?
 
 no.  there are some which should not be touched.
 and that's good.

In mutt?  But why?  This sounds like you want
to save mutt-users from themselves.

I mean, why not have the envelope be settable as
one of the headers visible with edit_headers set?


  Is there *any* Mail User Agent that allows to do this
  from within the MUA itself, without having to go into
  Sendmail to do it (even if from the command-line)?
 
 if there wer then you would not install it.  trust me on this!

But I'm not sure I understand *why* someone should just
trust you on this?

Because I say so ??  What's wrong with being able to
set the envelope (*not* as the default) on the fly as
an edit-headers setting from within mutt/vim, instead
of having to do it via Sendmail on the command-line?

And perhaps with a warning not to make it settable
unless you know what you're doing?  The more I think
about it, the more it seems very un-muttlike not to
have it available this way.






Re: Set envelope: realy shouldn't be touched?

2002-08-03 Thread Sven Guckes

* Melvin Q Watchpocket [EMAIL PROTECTED] [2002-08-03 15:33]:
 Sven Guckes [EMAIL PROTECTED] wrote:
   Then we can't really say that mutt gives us
   total control over headers, can we?
  no.  there are some which should not be touched.
  and that's good.
 In mutt?  But why?  This sounds like you
 want to save mutt-users from themselves.

exactly!  some mutt user should be using pine or outlook.
then they would not even *bother* about such problems.

 I mean, why not have the envelope be settable as
 one of the headers visible with edit_headers set?

users can and *will8 be confused, ask silly questions, and
find that mutt is a tool to fool around with arbitrary headers.
i'd rather they used emacs for that. *grin*

 What's wrong with being able to set the envelope (*not* as the
 default) on the fly as an edit-headers setting from within mutt/vim,
 instead of having to do it via Sendmail on the command-line?

please go to msnews.microsoft.com and state this question in
microsoft.public.de.german.inetexplorer.ie5.outlookexpress .
good luck!

 And perhaps with a warning not to make it settable unless you
 know what you're doing?  The more I think about it, the more
 it seems very un-muttlike not to have it available this way.

if you know what you're doing then you might as well
tune the MTA - for this is the right palce for it.

 From: Sven Guckes [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Mail-Followup-To: [EMAIL PROTECTED]

as you can see i used a MFT header -
and still you sent me a CC?
do you know what you are doing, Melvin?  ;-)

Sven



Re: Set envelope: realy shouldn't be touched?

2002-08-03 Thread Michael Tatge

Melvin Q Watchpocket ([EMAIL PROTECTED]) muttered:
 I mean, why not have the envelope be settable as
 one of the headers visible with edit_headers set?

Why should it? You are able to tweak the envelope by setting mutt's
$sendmail variable. What else do you want? This would be a feature
nobody else would make use of.

HTH,

Michael
-- 
..you could spend *all day* customizing the title bar.  Believe me.  I
speak from experience.
(By Matt Welsh)

PGP-Key: http://www-stud.ims.uni-stuttgart.de/~tatgeml/public.key



Re: Can mutt set envelope at message-compose-time?

2002-08-03 Thread Brad Knowles

At 11:50 AM +0200 2002/08/03, Sven Guckes wrote:

  you can only set or unset the envelope_from variable -
  but not set what goes into the header.  this is MTA stuff.

The MTA doesn't touch the headers (with the exception of adding 
suitable Received: headers).  So far as the MTA is concerned, 
headers are part of the message body.

-- 
Brad Knowles, [EMAIL PROTECTED]

They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.
 -Benjamin Franklin, Historical Review of Pennsylvania.

GCS/IT d+(-) s:+(++): a C++(+++)$ UMBSHI$ P+++ L+ !E W+++(--) N+ !w---
O- M++ V PS++(+++) PE- Y+(++) PGP+++ t+(+++) 5++(+++) X++(+++) R+(+++)
tv+(+++) b+() DI+() D+(++) G+() e++ h--- r---(+++)* z(+++)



Re: Can mutt set envelope at message-compose-time?

2002-08-03 Thread Melvin Q Watchpocket

On Sat 08/03/02 at 09:30 PM +0200,
Brad Knowles [EMAIL PROTECTED] wrote:

 At 11:50 AM +0200 2002/08/03, Sven Guckes wrote:
 you can only set or unset the envelope_from variable -
 but not set what goes into the header.  this is MTA stuff.

 The MTA doesn't touch the headers (with the exception of adding
 suitable Received: headers).  So far as the MTA is concerned,
 headers are part of the message body.


But if you use the MTA (sendmail in this case, and in many cases)
to create an envelope header that's gonna be different from a
message's From: header, (by doing 'sendmail -f'), then it (the
MTA) has to at least touch the envelope header.

Which still makes setting what goes into that header essentially
MTA stuff, I'd think, even though in most other respects (the
received headers excepted) it's correct to say that headers
are indeed part of the message body so far as the MTA is concerned.




Re: Can mutt set envelope at message-compose-time?

2002-08-03 Thread Nicolas Rachinsky

* Melvin Q Watchpocket [EMAIL PROTECTED] [2002-08-03 18:45 -0400]:
 On Sat 08/03/02 at 09:30 PM +0200,
 But if you use the MTA (sendmail in this case, and in many cases)
 to create an envelope header that's gonna be different from a
 message's From: header, (by doing 'sendmail -f'), then it (the
 MTA) has to at least touch the envelope header.

An envelope header does not exist (by definition). The envelope is
around the mail, including the headers.

Nicolas



Re: Can mutt set envelope at message-compose-time?

2002-08-03 Thread Brad Knowles

At 6:45 PM -0400 2002/08/03, Melvin Q Watchpocket wrote:

  But if you use the MTA (sendmail in this case, and in many cases)
  to create an envelope header that's gonna be different from a
  message's From: header, (by doing 'sendmail -f'), then it (the
  MTA) has to at least touch the envelope header.

There is no such thing as an envelope header.  There is the 
envelope sender (the address specified in the MAIL FROM: portion of 
the SMTP dialog), the envelope recipients (the address or addresses 
specified in the RCPT TO: portion), and all header data comes after 
the sending MTA says DATA.

Note that the envelope sender and recipients may have absolutely 
nothing in common with the From: header or any of the recipient 
headers.

  Which still makes setting what goes into that header essentially
  MTA stuff, I'd think, even though in most other respects (the
  received headers excepted) it's correct to say that headers
  are indeed part of the message body so far as the MTA is concerned.

No.  Absolutely not.  If you knew anything at all about MTAs, you 
would not be making this claim.


Once again -- the envelope information and the header information 
are totally separate.  As far as the MTA is concerned, the header 
information should be sacrosanct, and not touched in any way (with 
the sole exception of adding the appropriate Received: header).


Now, if you want to claim that mutt should allow you to modify 
the envelope information at the same time it allows you to modify the 
message headers, that is a different matter -- but don't confuse the 
issue by thinking that these two necessarily have anything at all to 
do with each other.

-- 
Brad Knowles, [EMAIL PROTECTED]

They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.
 -Benjamin Franklin, Historical Review of Pennsylvania.

GCS/IT d+(-) s:+(++): a C++(+++)$ UMBSHI$ P+++ L+ !E W+++(--) N+ !w---
O- M++ V PS++(+++) PE- Y+(++) PGP+++ t+(+++) 5++(+++) X++(+++) R+(+++)
tv+(+++) b+() DI+() D+(++) G+() e++ h--- r---(+++)* z(+++)



Re: Can mutt set envelope at message-compose-time?

2002-08-03 Thread Albert Lunde

On Sat, Aug 03, 2002 at 06:45:06PM -0400, Melvin Q Watchpocket wrote:
 But if you use the MTA (sendmail in this case, and in many cases)
 to create an envelope header that's gonna be different from a
 message's From: header, (by doing 'sendmail -f'), then it (the
 MTA) has to at least touch the envelope header.

Something that makes this statement rather fuzzy is that what's
commonly called the envelope from is not an RFC822 header
at all, but part of the SMTP transaction which sends the
entire RFC822 message (both headers and body).

Your desires may be reasonable, but your terminology is misleading.

-- 
Albert Lunde  [EMAIL PROTECTED] (new address)
  [EMAIL PROTECTED] (old address)




Re: setting envelope-from

2002-04-20 Thread Volker Kuhlmann

how can I set the envelope-from independently from From: ?

  ~~/.muttrc:
  
  folder-hook .*-List set sendmail=/usr/sbin/sendmail -oem -oi

  -oem: unknown variable
  
  which I can't make sense of. Can anyone enlighten me?

 But the first folder-hooks work?
 Why don't you set the variables for XXX.*-List the same way then?

Sorry, my fault for being stupid. Look at just the line from ~/.muttrc,
above, which sets sendmail.

When I c folder to any -List, I get that error. The offending line is
the one shown above in ~/.muttrc.

Question: what's wrong with

folder-hook .*-List set sendmail=/usr/sbin/sendmail -oem -oi

in ~/.muttrc? mutt complains about the -oem and some variable.
Does the rc-file parser stuff up here? Is the syntax incorrect? The
value assigned to sendmail *is* quoted.

In effect I have:

set sendmail=/usr/sbin/sendmail -oem -oi
folder-hook .*-List set sendmail=/usr/sbin/sendmail -oem -oi

As far as I can see this is supposed to work. Why does mutt complain
about the second line? (Yes there's a workaround, but ...)

Thanks,

Volker

-- 
Volker Kuhlmann is possibly list0570 with the domain in header
http://volker.orcon.net.nz/ Please do not CC list postings to me.




Re: setting envelope-from

2002-04-20 Thread Gary Johnson

On Sat, Apr 20, 2002 at 10:04:59AM +1200, Volker Kuhlmann wrote:
 how can I set the envelope-from independently from From: ?
 
   ~~/.muttrc:
   
   folder-hook .*-List set sendmail=/usr/sbin/sendmail -oem -oi
 
 -oem: unknown variable
   
   which I can't make sense of. Can anyone enlighten me?

 Question: what's wrong with
 
 folder-hook .*-List set sendmail=/usr/sbin/sendmail -oem -oi
 
 in ~/.muttrc? mutt complains about the -oem and some variable.
 Does the rc-file parser stuff up here? Is the syntax incorrect? The
 value assigned to sendmail *is* quoted.

Well, the value of sendmail *was* quoted when the folder-hook command
was parsed, but that operation stripped off the first layer of quotes,
leaving the folder-hook's second argument as:

set sendmail=/usr/sbin/senmail -oem -oi

Hence the error you're seeing.  One way to fix this is to quote the
entire set command as well as the sendmail value:

folder-hook .*-List 'set sendmail=/usr/sbin/sendmail -oem -oi'

Gary

-- 
Gary Johnson   | Agilent Technologies
[EMAIL PROTECTED]   | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |



Re: setting envelope-from

2002-04-19 Thread Volker Kuhlmann

  how can I set the envelope-from independently from From: ? As is, mutt

 AFAIK envelope_from does nothing but invokes sendmail with parameter
 -f From:-Header

Correct

 By setting sendmail directly you can call it with the -f paramater
 set freely, i.e. to your real email adress. This is independent from
 the setting of From:

Oh - ok, great. Good trick.

But I'll have a problem with this:

~~/.muttrc:

folder-hook .*-List set sendmail=/usr/sbin/sendmail -oem -oi
folder-hook .*-List set from=
folder-hook .*-List set envelope_from=yes

folder-hook XXX.*-List source ~/.muttrc.obscurefrom

~~/.muttrc.obscurefrom:

set sendmail=/usr/sbin/sendmail -oem -oi -f real@...
set from=hidden@...
set envelope_from=no

When I c folder to XXX-List, I get an error:

-oem: unknown variable

which I can't make sense of. Can anyone enlighten me?

Thanks,

Volker

-- 
Volker Kuhlmann is possibly list0570 with the domain in header
http://volker.orcon.net.nz/ Please do not CC list postings to me.





Re: setting envelope-from

2002-04-19 Thread Christoph Maurer

On 2002-04-19 Volker Kuhlmann wrote:
   how can I set the envelope-from independently from From: ? As is, mutt
 
  AFAIK envelope_from does nothing but invokes sendmail with parameter
  -f From:-Header
 
 Correct
 
  By setting sendmail directly you can call it with the -f paramater
  set freely, i.e. to your real email adress. This is independent from
  the setting of From:
 
 Oh - ok, great. Good trick.
 
 But I'll have a problem with this:
 
 ~~/.muttrc:
 
 folder-hook .*-List set sendmail=/usr/sbin/sendmail -oem -oi
 folder-hook .*-List set from=
 folder-hook .*-List set envelope_from=yes
 
 folder-hook XXX.*-List source ~/.muttrc.obscurefrom
 
 ~~/.muttrc.obscurefrom:
 
 set sendmail=/usr/sbin/sendmail -oem -oi -f real@...
 set from=hidden@...
 set envelope_from=no
 
 When I c folder to XXX-List, I get an error:
 
   -oem: unknown variable
 
 which I can't make sense of. Can anyone enlighten me?
 

But the first folder-hooks work?
Why don't you set the variables for XXX.*-List the same way then?

Regards,

Christoph 

-- 
Christoph Maurer - D - 52072 Aachen
mailto:[EMAIL PROTECTED] - http://www.christophmaurer.de
On my Homepage: SuSE 7.0 on an Acer Travelmate 508 T Notebook



setting envelope-from

2002-04-18 Thread Volker Kuhlmann

Hi all,

how can I set the envelope-from independently from From: ? As is, mutt
copies From: into envelope-from. I want to use a mangled From: as spam
protection, but list servers need to see a correct envelope-from
(unless it's lists like this, which seems to accept any 'ol stuff)?

Of course it wouldn't work if list servers identify subscribers by
From:, but it's a good start.

Thanks,

Volker

-- 
Volker Kuhlmann is possibly list0570 with the domain in header
http://volker.orcon.net.nz/ Please do not CC list postings to me.




Re: setting envelope-from

2002-04-18 Thread Christoph Maurer

On 2002-04-18 Volker Kuhlmann wrote:
 Hi all,
 
 how can I set the envelope-from independently from From: ? As is, mutt
 copies From: into envelope-from. I want to use a mangled From: as spam
 protection, but list servers need to see a correct envelope-from
 (unless it's lists like this, which seems to accept any 'ol stuff)?
 

Don't use envelope_from but set sendmail directly.
AFAIK envelope_from does nothing but invokes sendmail with parameter
-f From:-Header
By setting sendmail directly you can call it with the -f paramater
set freely, i.e. to your real email adress. This is independent from
the setting of From:

 Of course it wouldn't work if list servers identify subscribers by
 From:, but it's a good start.

Never heard this.

Gruß

Christoph 


-- 
Christoph Maurer - D - 52072 Aachen
mailto:[EMAIL PROTECTED] - http://www.christophmaurer.de
On my Homepage: SuSE 7.0 on an Acer Travelmate 508 T Notebook



envelope ?

2002-01-10 Thread Todd Kokoszka

Hi,

Some people mentioned that I should use the
envelope_from setting to help with mail delivery. It
worked.

What is the envelope_from setting and how is it
different from the From: field? Does anyone know where
I can learn how these function?

Thanks,
Todd

=
Todd Kokoszka
25, rue Richard Lenoir
75011 Paris
Tel. 01.43.72.77.08

__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/



Re: envelope ?

2002-01-10 Thread Maciej Kalisiak

On Thu, Jan 10, 2002 at 11:01:29AM -0500, Todd Kokoszka wrote:
 What is the envelope_from setting and how is it
 different from the From: field? Does anyone know where
 I can learn how these function?

It is documented in the manual (section 6.3.43 in the manual for Mutt 1.3.25).

-- 
Maciej Kalisiak [EMAIL PROTECTED] www.dgp.toronto.edu/~mac



Re: envelope ?

2002-01-10 Thread Todd Kokoszka


  What is the envelope_from setting and how is it
  different from the From: field? Does anyone know
 where
  I can learn how these function?
 
 It is documented in the manual (section 6.3.43 in
 the manual for Mutt 1.3.25).

I found the entry for envelope_from, but that doesn't
tell me what an envelope is or does and how that's
different from a From: field. The only thing I know is
that when I include envelope_from, more of mail gets
to where I want it to. I'm trying to figure out what
an envelope is and why it exists. Then I can figure
out what else I should know about mutt and mail.

Thanks,
Todd

=
Todd Kokoszka
25, rue Richard Lenoir
75011 Paris
Tel. 01.43.72.77.08

__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/



Re: envelope ?

2002-01-10 Thread Knute

On Thu, 10 Jan 2002, Todd Kokoszka wrote:

 
 
   What is the envelope_from setting and how is it
   different from the From: field? Does anyone know
  where
   I can learn how these function?
  
  It is documented in the manual (section 6.3.43 in
  the manual for Mutt 1.3.25).
 
 I found the entry for envelope_from, but that doesn't
 tell me what an envelope is or does and how that's
 different from a From: field. The only thing I know is
 that when I include envelope_from, more of mail gets
 to where I want it to. I'm trying to figure out what
 an envelope is and why it exists. Then I can figure
 out what else I should know about mutt and mail.
 

My understanding may be flawed, but it's the same as using an envelope
to mail a letter via snail mail.
It's the information that is needed to get it from your mail client to it's
reciepient.

-- 
Knute

You live, You die.  Enjoy the interval!
-- Clarence



Re: envelope ?

2002-01-10 Thread Curt Zirzow

* Todd Kokoszka [EMAIL PROTECTED] wrote:
 
 I found the entry for envelope_from, but that doesn't
 tell me what an envelope is or does and how that's
 different from a From: field. The only thing I know is
 that when I include envelope_from, more of mail gets
 to where I want it to. I'm trying to figure out what
 an envelope is and why it exists. Then I can figure
 out what else I should know about mutt and mail.
 

I would suggest reading up on rfc2821 section 3.
http://www.faqs.org/rfcs/rfc2821.html

Your envelope is established by sending: 
MAIL FROM: [EMAIL PROTECTED]
RCPT TO: [EMAIL PROTECTED]



Curt
-- 
Any time things appear to be going better, you have overlooked
something.



Re: envelope ?

2002-01-10 Thread John P Verel

There is a From: field in the email message and there is a from field
on the envelope wrapping the message.  They are two different things.
When mutt passes off the message to your Mail Transport Agent, e.g.
Sendmail, Sendmail prepends certain information to it: specifically the
from field, date and time, all on the first line.  Sendmail may try to
create this from field using, say, your login name and your machine
name, based on /etc/hosts.  Unfortunately, this may not be your address
with your ISP.  In some cases, this will cause you message to bounce.

Sendmail has a -f switch, documented in the Mutt manual, which forces
Sendmail to use your email From: address to be your envelope from.  

A side benefit is that you may get an additional header inserted by
sendmail that looks like this: 

X-Authentication-warning:
John.optonline.net: john set sender to [EMAIL PROTECTED] using -f

This can be fixed by changing Sendmail configurations, but, hey life is
too short already, no?

So, mutt lets you fix this problem with the envelope_from setting.  OT,
this issue is encountered elsewhere, like, for instance, slrn, where I
have to force the sendmail command to be able to forward mail from it.

HTH

John

On 01/10/02, 09:07:55AM -0800, Todd Kokoszka wrote:
 
   What is the envelope_from setting and how is it
   different from the From: field? Does anyone know
  where
   I can learn how these function?

-- 
John P. Verel
Living Proof That Low Tech Beats High Tech!



setting envelope sender with qmail (was: failure notice)

2000-06-20 Thread Mikko Hänninen

Vincent Danen [EMAIL PROTECTED] wrote on Tue, 20 Jun 2000:
 Someone mentioned an envelope header
 string that can be defined but I think I lost that message...
 
 Can someone re-post that info?  I seem to have lost that message...

I guess you mean the message I posted yesterday.  Here's a better
summary of how to set envelope server with qmail. :-)

With qmail, there's a few ways to specify the envelope sender.
See the man page for qmail-inject for the order used and other details,
but here's a quick list:

1) with the -f switch on the command line
2) with QMAILUSER, QMAILHOST environment variables (and a few
alternatives)
3) add a Return-Path: header to the message, and qmail-inject will
pick the envelope sender from that, unless it's already been defined
with some other means
4) it has a default of username@server, where the server comes from
the contents of the "me" file in qmail control dir


Hope this helps,
Mikko
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy  scifi, the Corrs /
The required OS was Windows 95 or better, so I installed Linux.



Re: setting envelope from how?

2000-05-06 Thread Roberto Suarez Soto

El día 02/May/2000, Claus Assmann escribía:

  Uh, right now this is a SUSE box with sendmail. I fiddled with sendmail.cf
  and filled in the correct masquerading stuff. Sendmail sucks. Big time.
 
 Yeah, if you "fiddled with sendmail.cf"...
 It requires two lines in your .mc file:
 MASQUERADE_AS(`host.domain')
 FEATURE(`masquerade_envelope')

Or even better: use genericstable and remap the addresses you like to
whatever you like, in a more "human readable" manner :-) See "genericstable"
in sendmail docs.

-- 
   Roberto Suarez Soto   ·Orange is young full of daring
   [EMAIL PROTECTED]·   But very unsteady in the first go-round
Corgo/Lugo/Galicia/Spain ·



Re: setting envelope from how?

2000-05-03 Thread Frank Derichsweiler

On Tue, May 02, 2000 at 11:28:26AM +0200, Ralf Hildebrandt wrote:
 My problem: The envelope from is set to [EMAIL PROTECTED]
 I already tried to
 
 set hostname = "innominate.de"
 
 but to no avail. How can I specify which envelope from mutt should use when
 talking to my local sendmail?
 
 Transcript of session follows.
 

As already posted, Mutt uses a local command to send mail. The command
is set via the sendmail var in your muttrc.

E.g.

set sendmail="/var/qmail/bin/qmail-inject -ffoo@bar "

will set the envelope sender to foo@bar.
(Using qmail ;-))

Sendmail should have the same -f option.

HTH
Frank



Re: setting envelope from how?

2000-05-03 Thread Frank Derichsweiler

On Wed, May 03, 2000 at 02:20:44AM +0200, cFischer wrote:
  tweaked the "correct" config files. Anyway, right now I'm just too lazy to
  throw away sendmail :)

 that is, i tried smail.  easy to configure and much leaner than sendmail.

IMHO you should forget sendmail and use qmail.
* Works *VERY GOOD*
* easy and fast to configure
* easy setup for dial-up connections with different ISPs
* ...
* ...

Frank





MTA comparisons (was Re: setting envelope from how?)

2000-05-03 Thread Bennett Todd

2000-05-03-10:50:35 cFischer:
 On Wed 03.0500-08:18, Ralf Hildebrandt wrote:
  You didn't try postfix.
 
 no.  did you?  is it big 'n nasty?

Nope. Postfix is not big or nasty. It is, by design: simple to
install, configure, and maintain; fast; secure; and as compatible
with sendmail as needed to cover a very large proportion of all
installations.

I recommend it for most installations.

Postfix shares some features with qmail: both of them are much
faster and more secure than sendmail, and simpler to configure and
maintain than sendmail. qmail grew from a different set of goals,
and matured under the direction of a different author with a
different style. It has some strengths over Postfix: it exposes more
of its internal modular interfaces, making it straightforward to do
some exotic and powerful things with scripting glue. It also has
some weaknesses; I at least find it rather more complex to initially
configure and to understand, and at least historically qmail's
author has been likelier to respond to requests for features,
particularly compatibility features to let people keep doing things
the same way, with a straight "no", arguing that they should change
their setup to do things a fundamentally different way. Over time
this has eased a good bit, but Postfix still seems (at least, this
is my impression) to have gained a lead which grows over time, in
support of features to allow it to be a painless drop-in replacement
for sendmail.

But both Postfix and qmail are very fast and reliable and secure,
and they're both enormously simpler to configure and maintain than
sendmail. I'd definitely recommend removing sendmail nearly
everywhere. There are occasional jobs that sendmail can do that
people actually need to do, that Postfix and maybe even qmail
haven't learned to do yet. But they are rare. And if you ditch
sendmail in favour of postfix or qmail, you lose the requirement to
constantly upgrade, since postfix and qmail don't get security
problems requiring urgent mandatory upgrades lest you get burgled.

-Bennett

 PGP signature


Mailbox read only? was Re: setting envelope from how?

2000-05-02 Thread Ralf Hildebrandt

On Tue, May 02, 2000 at 12:37:25PM +0200, Ralf Hildebrandt wrote:

my_hdr From: Lutz Jaenicke [EMAIL PROTECTED]
 
 This is not the envelope from...

But it gets derived from that. Anyway, the reason why that didn't work was
because I set my_hdr From: from within a send-hook only...

 Uh, right now this is a SUSE box with sendmail. I fiddled with sendmail.cf
 and filled in the correct masquerading stuff. Sendmail sucks. Big time.

Now I have another problem:

I set up a simple .procmailrc :
:0:
$HOME/Mail/inbox

which is supposed to deliver all mail to ~/Mail/inbox
That works.

Unfortunately mutt (1.1.12i) can't delete anything in this mailbox:

Mailbox is read-only.

($HOME is mounted via NFS)

Any ideas?

-- 
Ralf Hildebrandt [EMAIL PROTECTED] www.stahl.bau.tu-bs.de/~hildeb
I trust Microsoft. 
I trust them to be spectacularly unable to get anything right,
including and especially hard things like large-scale industrial
espionage. Sure, they'll make clownish, clumsy stabs at it and fail in
predictable, amusing and embarassing ways, and then do it all over
again. And their victi^H^H users will not only forgive them but spend
a lot of energy making up excuses for them.  


 PGP signature


Re: setting envelope from how?

2000-05-02 Thread Thomas Roessler

On 2000-05-02 12:37:25 +0200, Ralf Hildebrandt wrote:

 Uh, right now this is a SUSE box with sendmail. I
 fiddled with sendmail.cf and filled in the correct
 masquerading stuff. Sendmail sucks. Big time.

Hey, when fiddling with the sendmail.cf is an option,
switching to your favorite MTA may be one, too... ;-)


-- 
http://www.guug.de/~roessler/



Re: setting envelope from how?

2000-05-02 Thread Thomas Roessler

On 2000-05-02 11:28:26 +0200, Ralf Hildebrandt wrote:

 set hostname = "innominate.de"

 but to no avail. How can I specify which envelope from
 mutt should use when talking to my local sendmail?

   envelope_from
   Type: boolean
   Default: no
   
   When set, mutt will try to derive the message's
   envelope sender from the "From:" header.  Note that
   this information is passed to sendmail command
   using the "-f" command line switch, so don't set
   this option if you are using that switch in send­
   mail yourself, or if the sendmail on your machine
   doesn't support that command line switch.


-- 
http://www.guug.de/~roessler/



Re: setting envelope from how?

2000-05-02 Thread Martin Macok

On Tue, May 02, 2000 at 11:28:26AM +0200, Ralf Hildebrandt wrote:
 My problem: The envelope from is set to [EMAIL PROTECTED]
 I already tried to
 
 set hostname = "innominate.de"
 
 but to no avail. How can I specify which envelope from mutt should use
 when talking to my local sendmail?

try
set sendmail="/usr/sbin/sendmail -oi -oem -f [EMAIL PROTECTED]"
or something similar ...

bye

-- 
 Martin Maok[EMAIL PROTECTED]   iso-8859-2 
  \\  http://kocour.ms.mff.cuni.cz/~macok/  http://underground.cz/  //
\\\ -=  t.r.u.s.t  n.0  o.n.e  =-///

 PGP signature


Re: setting envelope from how?

2000-05-02 Thread Lutz Jaenicke

On Tue, May 02, 2000 at 11:28:26AM +0200, Ralf Hildebrandt wrote:
 My problem: The envelope from is set to [EMAIL PROTECTED]
 I already tried to
 
 set hostname = "innominate.de"
 
 but to no avail. How can I specify which envelope from mutt should use when
 talking to my local sendmail?

mutt is not using port 25, it uses the sendmail command line interface.
Specify your "From" address with the
  my_hdr From: Lutz Jaenicke [EMAIL PROTECTED]
setting or fix the local MTA on proto.bln.innominate.de to generate a
valid from address when none is given (or have a mail_relay on the way
(gulliver?) rewrite internal hostnames and/or mail-addresses, using e.g.
sender_canonical since I presume you prefer postfix :-).

Best regards,
Lutz
-- 
Lutz Jaenicke [EMAIL PROTECTED]
BTU Cottbus   http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus  Fax. +49 355 69-4153

 PGP signature


setting envelope from how?

2000-05-02 Thread Ralf Hildebrandt

My problem: The envelope from is set to [EMAIL PROTECTED]
I already tried to

set hostname = "innominate.de"

but to no avail. How can I specify which envelope from mutt should use when
talking to my local sendmail?

Transcript of session follows.

 Out: 220 stahlw06.stahl.bau.tu-bs.de ESMTP Postfix
 In:  EHLO gulliver.bln.innominate.de
 Out: 250-stahlw06.stahl.bau.tu-bs.de
 Out: 250-PIPELINING
 Out: 250-SIZE 1024
 Out: 250-ETRN
 Out: 250 8BITMIME
 In:  MAIL From:[EMAIL PROTECTED] SIZE=259
 Out: 250 Ok
 In:  RCPT To:[EMAIL PROTECTED]
 Out: 554 [EMAIL PROTECTED]: Sender address rejected: Domain not
 found
 In:  RSET
 Out: 250 Ok
 In:  QUIT
 Out: 221 Bye

No message was collected successfully.

- End forwarded message -

-- 
Ralf Hildebrandt [EMAIL PROTECTED] www.stahl.bau.tu-bs.de/~hildeb
The best answer when anybody asks you if you're any good with
explosives is to hold up two open hands and simply say "Ten". 


 PGP signature


From envelope date on postponed message

2000-01-23 Thread Wayne Chapeskie

I'm seeing a mildly annoying behaviour when using postponed messages
in mutt-1.0.1i:
  - compose a message
  - postpone it, at time T1
  - edit it again later; even postpone it again
  - use the f command (edit-fcc) from the compose menu to set to save
a copy to a file
  - send the message, at time T2

The copy of the message saved to file has the timestamp in the "From "
mailbox envelope header (not the "From:" RFC 822 header) set to T1 and
the "Date:" header set to T2.  This can be a bit disconcerting if there
is a significant interval between T1 and T2, and you then sort the saved
file by received date (which looks at the "From " envelope).  I would
have expected the "From " envelope header to be set to T2, as that would
be the timestamp when it was placed in the file.

The time of the first postpone is also propogated through successive
postpones; for some reason, mutt thinks that first postpone date is
significant enough to save.  Any idea why?


Thanks,
Wayne Chapeskie



Re: Setting envelope-sender according to alternates

1999-12-11 Thread Thomas Roessler

On 1999-12-10 10:28:07 +0100, Thomas Roessler wrote:

 It would be fairly easy to bloat up mutt_invoke_sendmail (in
 sendlib.c) a bit - depending on a suitable option (say,
 set_envelope_from), mutt could just pass "-faddress" to sendmail.

 Note that at least sendmail and the sendmail emulation of postfix
 can handle this.

diff -u .bak/init.h ./init.h
--- .bak/init.h Fri Dec 10 11:14:22 1999
+++ ./init.hFri Dec 10 11:31:01 1999
@@ -410,6 +410,16 @@
   ** Useful to avoid the tampering certain mail delivery and transport
   ** agents tend to do with messages.
   */
+  { "envelope_from",   DT_BOOL, R_NONE, OPTENVFROM, 0 },
+  /*
+  ** .pp
+  ** When \fIset\fP, mutt will try to derive the message's \fIenvelope\fP
+  ** sender from the "From:" header.  Note that this information is passed 
+  ** to sendmail command using the "-f" command line switch, so don't set this
+  ** option if you are using that switch in $$sendmail yourself,
+  ** or if the sendmail on your machine doesn't support that command
+  ** line switch.
+  */
   { "escape",  DT_STR,  R_NONE, UL EscChar, UL "~" },
   /*
   ** .pp
diff -u .bak/mutt.h ./mutt.h
--- .bak/mutt.h Fri Dec 10 11:14:24 1999
+++ ./mutt.hFri Dec 10 11:23:51 1999
@@ -284,6 +284,7 @@
   OPTDELETEUNTAG,
   OPTEDITHDRS,
   OPTENCODEFROM,
+  OPTENVFROM,
   OPTFASTREPLY,
   OPTFCCATTACH,
   OPTFCCCLEAR,
diff -u .bak/protos.h ./protos.h
--- .bak/protos.h   Fri Dec 10 11:14:25 1999
+++ ./protos.h  Fri Dec 10 11:16:04 1999
@@ -241,7 +241,7 @@
 int mutt_get_postponed (CONTEXT *, HEADER *, HEADER **, char *, size_t);
 int mutt_get_tmp_attachment (BODY *);
 int mutt_index_menu (void);
-int mutt_invoke_sendmail (ADDRESS *, ADDRESS *, ADDRESS *, const char *, int);
+int mutt_invoke_sendmail (ADDRESS *, ADDRESS *, ADDRESS *, ADDRESS *, const char *, 
+int);
 int mutt_is_autoview (BODY *, const char *);
 int mutt_is_mail_list (ADDRESS *);
 int mutt_is_message_type(int, const char *);
diff -u .bak/send.c ./send.c
--- .bak/send.c Fri Dec 10 11:14:27 1999
+++ ./send.cFri Dec 10 11:15:17 1999
@@ -898,8 +898,8 @@
 return mix_send_message (msg-chain, tempfile);
 #endif
 
-  i = mutt_invoke_sendmail (msg-env-to, msg-env-cc, msg-env-bcc,
-  tempfile, (msg-content-encoding == ENC8BIT));
+  i = mutt_invoke_sendmail (msg-env-from, msg-env-to, msg-env-cc, 
+   msg-env-bcc, tempfile, (msg-content-encoding == 
+ENC8BIT));
   return (i);
 }
 
diff -u .bak/sendlib.c ./sendlib.c
--- .bak/sendlib.c  Fri Dec 10 11:14:28 1999
+++ ./sendlib.c Fri Dec 10 11:20:28 1999
@@ -1629,7 +1629,8 @@
 
 
 int
-mutt_invoke_sendmail (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc, /* recips */
+mutt_invoke_sendmail (ADDRESS *from,   /* the sender */
+ADDRESS *to, ADDRESS *cc, ADDRESS *bcc, /* recips */
 const char *msg, /* file containing message */
 int eightbit) /* message contains 8bit chars */
 {
@@ -1660,8 +1661,15 @@
 ps = NULL;
 i++;
   }
+
   if (eightbit  option (OPTUSE8BITMIME))
 args = add_option (args, argslen, argsmax, "-B8BITMIME");
+
+  if (option (OPTENVFROM)  from  !from-next)
+  {
+args = add_option (args, argslen, argsmax, "-f");
+args = add_args   (args, argslen, argsmax, from);
+  }
   if (DsnNotify)
   {
 args = add_option (args, argslen, argsmax, "-N");
@@ -1850,7 +1858,8 @@
 mutt_copy_bytes (fp, f, h-content-length);
 fclose (f);
 
-mutt_invoke_sendmail (to, NULL, NULL, tempfile, h-content-encoding == ENC8BIT);
+mutt_invoke_sendmail (NULL, to, NULL, NULL, tempfile, 
+ h-content-encoding == ENC8BIT);
   }
 
   if (msg)





Re: Setting envelope-sender according to alternates

1999-12-10 Thread Thomas Roessler

On 1999-12-10 03:44:03 +0200, Mikko Hänninen wrote:

 Sounds like something that could be done with a wrapper script,
 invoked instead of the real sendmail command to first parse the
 email, set the environment variable, and then call sendmail.

It would be fairly easy to bloat up mutt_invoke_sendmail (in
sendlib.c) a bit - depending on a suitable option (say,
set_envelope_from), mutt could just pass "-faddress" to sendmail.

Note that at least sendmail and the sendmail emulation of postfix
can handle this.



Re: Setting envelope-sender according to alternates

1999-12-10 Thread Mikko Hänninen

Thomas Roessler [EMAIL PROTECTED] wrote on Fri, 10 Dec 1999:
 mutt could just pass "-faddress" to sendmail.
 
 Note that at least sendmail and the sendmail emulation of postfix
 can handle this.

I was trying to see if qmail's sendmail emulation script does, I think
so, but wasn't able to confirm it in documentation.  (Yes, I know,
should be easy enough to test.)

I wonder about the other popular MTA's, exim, smail, whatever are
there?  Maybe they have good enough "sendmail emulation" that this
would actually work as a general case.  If so, then it's worth
considering.  Then again, it's already possible for the user to
change the sendmail command for this purpose.  But I suppose it
would be nice if Mutt would do this automatically according to the
From address, or have a separate $return_path variable or something.

The most flexible approach that I can think of would be to have two
variables, $use_from_as_return_path, and $return_path.  $return_path
gets used always if defined, otherwise there's either no explicit
return path set or it's set according to the From header, depending
on whether $use_from_as_return_path is set.  Obviously the names
could be something better.

Anyway, I'm not arguing for or against whether this should or shouldn't
added, I'm quite happy to have a single address as my envelope sender
for all my emails. :-)


Mikko
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy  scifi, the Corrs /
"Yesterday was the deadline on all complaints."



Re: Setting envelope-sender according to alternates

1999-12-10 Thread Henrique M. Holschuh

On Fri, 10 Dec 1999, Mikko Hänninen wrote:
 Thomas Roessler [EMAIL PROTECTED] wrote on Fri, 10 Dec 1999:
  mutt could just pass "-faddress" to sendmail.
  
  Note that at least sendmail and the sendmail emulation of postfix
  can handle this.

I second that. And the -f address option is _required_ for extended
addressing (the so-called "+ hack". See my from address for an example) to
work As It Should(tm) with MTAs.

 I wonder about the other popular MTA's, exim, smail, whatever are
 there?  Maybe they have good enough "sendmail emulation" that this

I seem to recall exim did understand -f, but since its extended address
support is broken somewhere else (or at the very least a RPITA to setup), I
changed to Postfix a while ago. I am not sure of the current state of exim.

Regardless, -f is the documented way to set the envelope sender for mutt's
method of delivering mail (i.e.: it's the MTA's problem). It should be
properly supported IMHO. If a MTA doesn't suport it, that's the MTA's
problem (and a serious bug in their sendmail-compatibility layer IMHO).

 considering.  Then again, it's already possible for the user to
 change the sendmail command for this purpose.  But I suppose it

Yes, it is possible to use $sendmail... However, it is also somewhat of
kludge, and it rapidly becomes a pain if you have lots of (valid) envelope
addresses to set everywhere.

 The most flexible approach that I can think of would be to have two
 variables, $use_from_as_return_path, and $return_path.  $return_path
 gets used always if defined, otherwise there's either no explicit
 return path set or it's set according to the From header, depending
 on whether $use_from_as_return_path is set.  Obviously the names
 could be something better.

This seems very good. You could also use my_hdr from_, but that's far more
cryptic. And I really like $use_from_as_return_path...

 added, I'm quite happy to have a single address as my envelope sender
 for all my emails. :-)

Well, I don't :-) Some of mine are spamtraps (so I really don't want my
canon address anywhere in the (sender|from) headers), while others get
through paranoid software which sends anything which mismatches envelope
sender and RFC822 from to the bitbucket.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh 



Re: Setting envelope-sender according to alternates

1999-12-10 Thread Mike Bell


 I was trying to see if qmail's sendmail emulation script does, I think
 so, but wasn't able to confirm it in documentation.  (Yes, I know,
 should be easy enough to test.)

Yes, not only does qmail's sendmail emulation work just fine, you can
actually set your sendmail variable to qmail-inject and it still
works. That's how I do things now.



Re: Setting envelope-sender according to alternates

1999-12-09 Thread Mikko Hänninen

Mike Bell [EMAIL PROTECTED] wrote on Thu, 09 Dec 1999:
 Would it be possible to arrange for the contents of the from: header in sent
 mail to be exported to the sendmail command, maybe as an environment
 variable? I'd like to have my envelope-sender mirror the address I use in my
 from: line, since I send email from multiple accounts.

Sounds like something that could be done with a wrapper script, invoked
instead of the real sendmail command to first parse the email, set the
environment variable, and then call sendmail.

I wonder if anyone's done anything like this?


I suppose the functionality could be added to Mutt easily enough, but
then you run into issues such as different MTA's which determine the
envelope sender address in different ways...  So there won't be a
solution that works in all cases, and possibly not even in "most"
cases.  That indicates strongly that a wrapper script might be the
best solution for the (rare) cases where this is needed.


Mikko
PS. Please use [EMAIL PROTECTED] when posting to the list.  Yes, the
Majordomo welcome message gives the list address as @gbnet.net but
don't believe that.
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy  scifi, the Corrs /
 Dyslexics of the world, untie!



Re: Setting envelope-sender according to alternates

1999-12-09 Thread Aaron Schrab

At 03:44 +0200 10 Dec 1999, Mikko Hänninen [EMAIL PROTECTED] wrote:
 Mike Bell [EMAIL PROTECTED] wrote on Thu, 09 Dec 1999:
  Would it be possible to arrange for the contents of the from: header in sent
  mail to be exported to the sendmail command, maybe as an environment
  variable? I'd like to have my envelope-sender mirror the address I use in my
  from: line, since I send email from multiple accounts.
 
 Sounds like something that could be done with a wrapper script, invoked
 instead of the real sendmail command to first parse the email, set the
 environment variable, and then call sendmail.
 
 I wonder if anyone's done anything like this?

I'm doing almost exactly that.  But instead of putting the address in
the environment, I just add the proper arguments to the command line
when calling the real sendmail.  Perl script attached, although it needs
to be modified, since it basically has my $alternates setting hard coded
into it.

-- 
Aaron Schrab [EMAIL PROTECTED]  http://www.execpc.com/~aarons/
 If you want to program in C, program in C. It's a nice language. I
 use it occasionally...   :-)
   --Larry Wall


#!/usr/bin/perl

$debug = 0;
$sendmail = '/usr/sbin/sendmail';
@args = @ARGV;

if ($debug) {
  open (STDERR, "/tmp/sm.log");
  print STDERR join(':', @args), "\n";
}

goto SEND if (grep /^-f/, @args);

while (STDIN) {
  push @l, $_;
  last if (/^$/);
  if (/^From:\s*(.*)/) {
$from = $1;

if ($from =~ /((aarons|ats|bofh|listmaster|lsm-help|procmail|Aaron\.Schrab)
\@([a-z0-9-]+\.)*execpc\.com|
  (aaron(s|\+[a-z0-9+-]+)?|(post|web)master|ats|root|bofh)
\@schrab\.com
  )/ix)
{
  print STDERR "Found address $1\n" if $debug;
  unshift @args, "-f$1";
  last;
}
  }
}

SEND:

if ($debug) {
  print STDERR "Command: $sendmail ", join (' ', @args), "\n";
  print STDERR @l, STDIN;
  exit;
}
else {
  open (S, "|-") or exec $sendmail, @args;
  print S @l, STDIN;
  close S;
  exit ($?);
}


# vim: ai si