MTA, easy insertion of header line
Heather Stern
star at starshine.org
Sat Jun 28 11:50:30 PDT 2003
On Fri, Jun 27, 2003 at 04:05:41PM -0700, Brett G Lemoine wrote:
>
> I may have a case where I need to build an relay box for the
> sole purpose of adding a header line into incoming mail
> (specifically a content-type/character-set header) (don't ask).
>
> Without starting an MTA religious war, what recommendations
> would the kind folk on baylisa have on this subject? I know
> I could probably kludge it to work on sendmail (perhaps using
> milter), but it's been too long since I looked at postfix, exim,
> etc.. for me to recall if they can easily do something like this.
Essentially the santized question is, you need to do some sort of scan
and tweak during relaying, rather than during delivery. If they were
all sure to arrive at one mail system, it could be during delivery, and
pretty much a solved problem, no? So you must want to help out multiple
destinations inside.
If sendmail milters can be applied during relaying than that seems a
rather simple fix, yes.
If [your mailer's name here] has a good way to tweak what's added during
relaying, ok, that'd work too.
Hmm, in Postfix, it's -really- easy to remove headers, I hadn't tried to
-add- any though. A brief attempt to look this up on the internet led to
a thread from way back in 2000, that Wietse wants to, but hadn't thought
of a clean method yet.
And some random blit about "an MSA would repair and add headers if
necessary, while an MTA would simply relay" from some other site entirely.
Otherwise, hacking the portion of the code which normally adds
"Received:" headers would be the place to jump in and add your code
block too. Ahhh, that glorious open source. :)
Sure, you could degenerate to forcing some sort of delivery through a
reprocessor, but then onwards from you, all the mail would look like it
-originated- from your box, and I can't tell if you really wanted that.
Somehow I doubt it.
> FWIW, the header content will be static.
Then adding it to the Received: section of the world, in just about any
of the modern mailers, sounds like the easiest plan.
> thanks,
> bl
Hope that helps!
. | . Heather Stern | star at starshine.org
--->*<--- Starshine Technical Services - * - consulting at starshine.org
' | ` Sysadmin Support and Training | (800) 938-4078
More information about the Baylisa
mailing list