auto bounce mail - apple script moron

i did a search on this topic and it appears not to have been answered. i know nothing about applescript except that osx mail can filter messages using a script. can anyone give me the code to do this or point me to a resource?


I don’t have a specific link for you, but I do have a suggestion.

Just trash the mail.

Don’t try to bounce the mail, for several reasons. The primary reason is that most spam is sent from junk email addresses. All your script is going to do is generate another email back to a bogus email address. This spam is going to add to the load of your ISP’s mail server, and that of the receiving domain (which likely has nothing to do with the original spam). Best case is it’s going to sit in a mail queue for several days until the mail server gives us, but the worst case is that the email address you bounce to actually exists in which case your bounce message ends up in the mail box of some innocent user (remember, the ‘from’ email address of the original email was fake), so now you’ve added load to your ISP and to the recipient’s ISP’s mail server, and to some innocent user.
Now, assuming the person you bounce to wants to protest his innocence he sends a message back to you, clogging up his ISP’s mail server, and your ISP’s mail server, and your mailbox. And so it goes on.

The best solution is to trash it and move on.