[aiaiai PATCH v3 08/12] email: check the "Old-To:" header as well as "To:" and "Cc:"
Artem Bityutskiy
dedekind1 at gmail.com
Fri Feb 7 01:22:50 PST 2014
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.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.
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?
--
Best Regards,
Artem Bityutskiy
More information about the aiaiai
mailing list