On 9/9/18 1:35 PM, Durga Prasad Malyala wrote: > Hello Friends, > I would like to make postfix add a warning message for all external > incoming emails - Something like this at the top of each mail. > > WARNING: This email originated outside of our organization. Do not > click any links or open any attachments unless you recognize the > sender and know the content is safe > > How is this possible in postfix? > > Thanks/DP > I can't see any way for postfix to do this itself. As far as I know, it doesn't have any general changing of the content of an email message in it. The best is can probably do is route the messages through something to try and add it.
The bigger issue is that due to the way mail is structured, It can be very difficult to actually do something like that. First, a message may actually not have ANY text in it to add the message to, but might be just something like a picture. Also, if the message is HTML formatted, it can be very tricky to figure out how to insert text into it to be displayed in a given manner. You could add a text section to the beginning of the document with MIME, but you would need to find out all the MUAs used internally, and make sure you add the message in a way that they all handle reasonably (some MUAs will take any multisection message and display all but the first part as attachments, and don't handle email messages as attachments well. -- Richard Damon
