On 26 Apr 2019, at 1:49, tumbal wrote:
Hi,
I would like to know if Postfix can insert a text inside the body of a
message before send it.
i have done my research in this forum and the closest post i have seen
similar to my problem is this
<http://postfix.1071664.n5.nabble.com/Rewrite-body-messages-td31670.html>
but it was 10 years old post so maybe now there are much more relevant
answer.
Nope. Same answer. Adding to message content is not a proper job for a
MTA like Postfix.
Adding to message content is generally a bad idea. The most common sort
of addition done server-side is for so-called "legal disclaimers" which
are entirely meaningless under any rational jurisprudence and can amount
to fraud.
in my searching for the solution the relevant answer that i found is
using
content filter or using milter application (which i don't know a thing
because i only heard and search postfix for 2 days) i found mimedefang
which
is milter application but i don't know how it work or even if it can
solve
my problem.
MIMEDefang is probably the best tool for this, if you really are
committed to doing it.
But you should not. Even if you aren't doing something silly like adding
a legal disclaimer or a corporately-ordained footer or advertisements,
ANYTHING you add risks breaking any digital signature mechanism (DKIM,
OpenPGP, S-MIME, etc.)
So is there another solution for my problem? or if there is no other
solution other than what i describe above then can someone give me
advice
where to start and if there are any tutorial that i can learn.
Repeating in the clearest way possible: do not do this.
If you absolutely MUST, MIMEDefang is the best tool for this because it
has a mature correct implementation for adding content to messages
without damaging the MIME structure. It is a very big tool however, and
if all you want to do is add some text to a message, you'll want to at
least understand how to turn most of its functionality off. Fortunately,
it is fairly well-documented and it has a somewhat active mailing list
full of people who use it.
--
Bill Cole
[email protected] or [email protected]
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Available For Hire: https://linkedin.com/in/billcole