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_bodycallback of libmilter allows you to obtain the message body. When thexxfi_eomcallback is called, you can usesmfi_replacebodyto 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_CHGBODYflag to the value ofxxfi_flagswhen callingsmfi_register, otherwise callingsmfi_replacebodywill failContent-Typeof the message (and it's mime parts) so that you can distinguish betweentext/plainandtext/htmlmessages 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).