Q: | I tried to setup a "pre-download"-Filter which should run a script that would send me a notify-mail to another mailaddress.....The script itself is not a problem but I did not find out how to setup the filter so that the script is only processed once per email....Is there a possibilty to create such a filter? |
![]() |
|
A: | If the messages are being left on the server then the filter will continue to run
against them, the only way I can think of solving this would be to modify the script to capture the
"Message-Id:" header from the mail on the server (using the "ReadHeader" command) and log it to a
file (using the "SaveBody" command). Check this file prior to sending the notification, if the
message id header has been logged in the file then don't send a notification.
Note: I found a few messages in my received mail that do not have message-id headers, if you need to cope with such mail then construct a "key" using the "Date:", "From:" and "Subject:" headers, this should be reasonably unique. |