[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Dealing with missing From: header during send.
From: |
Earl Hood |
Subject: |
Re: [Nmh-workers] Dealing with missing From: header during send. |
Date: |
Tue, 10 Jan 2012 15:09:29 -0600 |
On Tue, Jan 10, 2012 at 2:19 PM, Ken Hornstein <address@hidden> wrote:
> Ow. Damn your eyes, Earl ... I now have a headache from staring at the
> damn mh-format code.
I'm glad you decided to look at the code since I was not
looking forward to it myself.
> 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.
I would assume that if I use %(lit) to clear the str buffer, it
should clear the cache.
> 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).
I do not like this. I would think %(lit) should clear the cache
since it empty the str register.
> - Create a new mh-format function (perhaps %(clearaddr) ?) that explicitly
> clears out the address cache.
This may be acceptable. I'm not sure if there are components files
that depending on the caching, even after %(lit) is used.
> The first one is easy, but might have unintended consequences.
Agreed.
> The second
> is more complicated, but not terrible and is arguably more correct. Thoughts?
My question is: If the str buffer is zeroed, or set, via %(lit), should
the cache be automatically cleared?
--ewh
- Re: [Nmh-workers] smart header processing, (continued)
- Re: [Nmh-workers] smart header processing, Valdis . Kletnieks, 2012/01/09
- Re: [Nmh-workers] Dealing with missing From: header during send., Earl Hood, 2012/01/10
- Re: [Nmh-workers] Dealing with missing From: header during send., Ralph Corderoy, 2012/01/10
- Re: [Nmh-workers] Dealing with missing From: header during send., Earl Hood, 2012/01/10
- Re: [Nmh-workers] Dealing with missing From: header during send., Ken Hornstein, 2012/01/10
- [Nmh-workers] request for mh-format "printf" operator, bergman, 2012/01/10
- Re: [Nmh-workers] request for mh-format "printf" operator, Ken Hornstein, 2012/01/10
- Re: [Nmh-workers] Dealing with missing From: header during send.,
Earl Hood <=
- Re: [Nmh-workers] Dealing with missing From: header during send., Ken Hornstein, 2012/01/10
- Re: [Nmh-workers] Dealing with missing From: header during send., Valdis . Kletnieks, 2012/01/10
- Re: [Nmh-workers] Dealing with missing From: header during send., Robert Elz, 2012/01/11
- Re: [Nmh-workers] Dealing with missing From: header during send., Ken Hornstein, 2012/01/11
- Re: [Nmh-workers] Dealing with missing From: header during send., Paul Fox, 2012/01/11
- Re: [Nmh-workers] Dealing with missing From: header during send., Ken Hornstein, 2012/01/11
- Re: [Nmh-workers] Dealing with missing From: header during send., Paul Fox, 2012/01/11
- Re: [Nmh-workers] Dealing with missing From: header during send., Tethys, 2012/01/11
- Re: [Nmh-workers] Dealing with missing From: header during send., Earl Hood, 2012/01/11
- Re: [Nmh-workers] Dealing with missing From: header during send., Ken Hornstein, 2012/01/12