Setup:
change the line
- Code: Select all
IsAddressPresent &present $email "Address"
to replace the "Address" with an exact name of your own address book against which you want to filter, the name must stay quoted. (I know there is a possibility in Pocoscript to add it as an option instead of having to edit the script....maybe later)
!If you make an error in the above part, all your incoming mail will be deleted!
Add it to your pre-download filters.
Disclaimer:
No guarantees whatsoever, I'm not responsible for any data losses, you can only use it on your own risk. It comes from a complete scripting greenhorn.
If you will find any bugs, or have feature enhancements, you are more than welcome.
No error checks are done, no checks for the presence of address book nor Junk Mail.mbx, nor for it being run in the correct mode (pre-download).
- Code: Select all
Set $OnErrorGoTo ErrorHandler
ReadHeader $email "From:" %message
Lowercase $email
IsAddressPresent &present $email "Address"
if &present then GoodOne
#Junk feeder part
AppendToFile True
ReadHeader $subject "Subject:" %message
ReadHeader $to "To:" %message
ReadHeader $date "Date:" %message
CreateMessage %junkmessage
AddHeader %junkmessage "From:" $email
AddTo %junkmessage $to
AddHeader %junkmessage "Date:" $date
AddHeader %junkmessage "Subject:" $subject
SaveMessage %junkmessage "Junk Mail.mbx"
DeleteMessage %message
Exit
:GoodOne
Exit
:ErrorHandler
set $err "error encountered"
MessageBox $err