[aiaiai PATCH v3 08/12] email: check the "Old-To:" header as well as "To:" and "Cc:"

Keller, Jacob E jacob.e.keller at intel.com
Fri Feb 7 11:53:05 PST 2014

> -----Original Message-----
> From: Artem Bityutskiy [mailto:dedekind1 at gmail.com]
> Sent: Friday, February 07, 2014 1:23 AM
> To: Keller, Jacob E
> Cc: aiaiai at lists.infradead.org
> Subject: Re: [aiaiai PATCH v3 08/12] email: check the "Old-To:" header as
> well as "To:" and "Cc:"
> On Thu, 2014-02-06 at 21:33 +0000, Keller, Jacob E wrote:
> > Based on this, I use procmail to add a new "To:" address, which replaces
> > the original "To:". This "To:" is the new aiaiai+project at domain, which
> > enables me to have the project in the email.
> Why do you need to replace the original "To:"? It contains some person
> or the mailing list. All you need to do is to _add_ another e-mail
> address to the Cc: list: aiaiai+project at domain

I didn't think it would pick up the project name from the Cc list? Doesn't it only do that if you directly send via the "To:"?

> I.e., you have originally:
> From: x
> To: a1, a2, a3
> Cc: a4, a5
> One of the e-mails will obviously be the mailing list address. Although,
> it could be in Bcc. But that should be fine to.
> Then what you do is transform this into:
> From: x
> To: a1, a2, a3
> Cc: a4, a5, aiaiai+project at domain
> And aiaiai-email-test-patchset will find it and pick the project name
> from there.
> When aiaiai-email-test-patchset sends the results back, it will remove
> aiaiai+project at domain. So the resulting e-mail should be:
> To: x
> Cc: a1, a2, a3, a4, a5
> I did not verify this, but I believe this is how it should and will
> work.
> > formail's re-write tool, moves the current "To:" which is my mailing
> > list, to be "Old-To:" so it's fairly standard in that sense.
> If "Old-To:" is something commonly used, and the original e-mail
> contains it, probably we do not want to send the reply there. So I'd go
> for an Aiaiai-specifi name.
> But again, if we have to. I still think the approach I described above
> should work.
> But I do not know if procmail can add an address to Cc. I'd guess so,
> but I never used procmail before.
> > An alternative, would be instead of replacing the "To:" address, that I
> > have procmail add an 'X-Aiaiai-Project' header, and modify this patch so
> > that if X-Aiaiai-Project exists, we use that instead of the project from
> > the email address.
> If we have to do this, I'd vote for this approach. It looks nicer to me.
> > Basically, I need a way to specify the project that doesn't destroy the
> > "To:" address. The reason for this, is that I need to be able to still
> > keep track of the mailing list, as my team wants the replies from aiaiai
> > to be visible by all the people that watch this list.
> Sure. As I also interpret this is that you cannot make your team specify
> the Aiaiai addresses properly, which is absolutely normal. Instead, your
> team uses different suffixes in the subject for this purposes. Which is
> fine as well.

I can't make my team send patches differently. Even the net vs net-next is actually a hack, since if there is no specifier I have to assume net-next

> And you need an "agent" which matches the subjects and maps them to
> aiaiai projects.
> Your agent is a procmail rule.
> In theory, this could be another shell or python or whatever script.
> You invented a mechanism to pass the project name from the agent to
> Aiaiai. You substitute "To", and save the previous one in "Old-To".
> At this point I think the right way to go is to just add the aiaiai
> address to the Cc list. And things should just work.
> If they don't or you have a reason to dislike this approach, let me
> know. As an alternative, we could go for "X-Aiaiai-Project".
> What do you think?

I had assumed that the project had to be the "To:" header. I will attempt the Cc approach. If this fails, I will mock up a X-Aiaiai-Project version of this patch.

I would much rather have a method that doesn't rely on modifying aiaiai for this, but I didn't think of just adding Cc.

One question is whether aiaiai grabs multiple Cc headers out? I know it doesn't do it for the "To:" header, as I originally tried just adding an extra "To: and aiaiai only used the first one.


> --
> Best Regards,
> Artem Bityutskiy

More information about the aiaiai mailing list