Reputation: 19
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.
Upvotes: 0
Views: 564
Reputation: 2246
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 the xxfi_eom
callback is called, you can use smfi_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 of xxfi_flags
when calling smfi_register
, otherwise calling smfi_replacebody
will failContent-Type
of the message (and it's mime parts) so that you can distinguish between text/plain
and text/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).
Upvotes: 1