is it possible to add a pop-up message on the received email?
I have searched IMAP but it can only fetch the email, view the email content. and I have considered milter, but it only uses for filtering. My idea is when there is a URL in the context of email, I could show a warning message to tell the users that it is a phishing URL or not. I would like to make the warning message is available for no matter what email client I am using.
Since you already mention milter in your question: a milter would be capable to modify the message bodies and can solve your problem.
The
xxfi_body
callback of libmilter allows you to obtain the message body. When thexxfi_eom
callback is called, you can usesmfi_replacebody
to replace the body of the message.This would allow you to search for URLs in the bodies and append a warning message to them.
Notes:
SMFIF_CHGBODY
flag to the value ofxxfi_flags
when callingsmfi_register
, otherwise callingsmfi_replacebody
will failContent-Type
of the message (and it's mime parts) so that you can distinguish betweentext/plain
andtext/html
messages and append the warning message at the proper positionFor more information on how to write a milter application, you can find the current HTML docs in the sendmail source under the path
libmilter/docs/index.html
. There is also an online version (may not be the latest one).