nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Dealing with missing From: header during send.


From: Ken Hornstein
Subject: Re: [Nmh-workers] Dealing with missing From: header during send.
Date: Tue, 10 Jan 2012 15:19:34 -0500

>Yes, that works, but as I noted, when in a replcomps, further
>attempts to access {to} and other components return empty
>values.

Ow.  Damn your eyes, Earl ... I now have a headache from staring at the
damn mh-format code.

But, on the upside ... I figured out the issue here.

The problem is not technically with accessing the same component
again.  It's actually accessing the same _ADDRESS_ again via
%(formataddr).  Let me explain.

There is a cache inside of replsbr.c of addresses that were seem by
the %(formataddr) function; if you try to insert the same email address
twice, it will silently stop you from doing so.  This is obviously to
prevent duplicate email addresses from appearing in To: and cc: lines.

So what is happening to you is when you try to use the "to" component
again to make the decision to construct your From: line, it doesn't
get addded to the list because formataddr considers it a duplicate.

So, possible solutions?

- Have %(putaddr) clear out the address cache via a callback to replsbr.c.
  This is a behavior change, and could result in duplicate addresses
  appearing in a cc: line (for example).
- Create a new mh-format function (perhaps %(clearaddr) ?) that explicitly
  clears out the address cache.

The first one is easy, but might have unintended consequences.  The second
is more complicated, but not terrible and is arguably more correct.  Thoughts?

--Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]