Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Remove spam from POP server after Mail download Internet
Tired of embarrassing pages of spam subject lines whenever I use my webmail account, I put together these scripts which delete messages from the server that are in a certain folder on my Mac. These scripts require installing mpop, a command line POP client. The following scripts do the work; no doubt they could be refined, a lot, but they work for me.

To use the scripts, use a Mail rule or have cron run the runfilter script. This will generate a list of your current spam message-ids and run mpop. mpop will then use the filter script to see if messages on the server match your spam message listing (using message-id), and delete them if they do.

The scripts assume mpop is installed in /usr/local/bin/, that the 'filter' script is in ~/Documents » Scripts » filter, and that spam email will be found in ~/Library » Mail » Mailboxes » Spam.mbox » Messages. However, you can change these paths in the first script if you wish.

[robg adds: I haven't tested this one.]
    •    
  • Currently 2.50 / 5
  You rated: 5 / 5 (8 votes cast)
 
[9,850 views]  

Remove spam from POP server after Mail download | 5 comments | Create New Account
Click here to return to the 'Remove spam from POP server after Mail download' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Remove spam from POP server after Mail download
Authored by: Pedro Estarque on Nov 05, '07 08:17:07AM
bad link on mpop, should be :

http://mpop.sourceforge.net/


[ Reply to This | # ]
Remove spam from POP server after Mail download
Authored by: arcticmac on Nov 05, '07 09:33:24AM

What I usually do for this is to set up Mail to pop itself and only delete mail from the POP server when it's moved out of the inbox for the account. Then when you delete your spam in Mail it gets deleted from the server. It's very nice because I have two machines POPing from the same server, and I usually get mail on my MacBook first, so I can delete spam there and not have to deal with it again when I get home and check mail on my MacPro.



[ Reply to This | # ]
Remove spam from POP server after Mail download
Authored by: Slinkwyde on Nov 05, '07 10:35:26AM

On a somewhat related note, after Google added IMAP support to Gmail recently, I had the idea of taking advantage of IMAP's synchronous nature. I already had a personal server of my own for various other tasks, so I set it up as an extra IMAP client that applies SpamAssassin on top of Gmail's already excellent antispam. I used a script called IMAP Spam Begone to do this.



[ Reply to This | # ]
Remove spam from POP server after Mail download
Authored by: stevewest on Nov 15, '07 06:42:33AM

Could somebody please provide a quick walkthrough on installing mpop?

I just installed Xcode Tools then tried to compile mpop using "./configure". The configure process and compile seemed to run without errors, but I can't find the mpop unix executable or invoke it in terminal.

Obviously I'm missing something. Should I be unpacking it to a particular directory before installing?



[ Reply to This | # ]
Remove spam from POP server after Mail download
Authored by: SJT on Nov 16, '07 08:58:11AM
Once you've done
./configure
run make, and make install
make; make install
. if make install doesn't install the binary into your search path (where bash looks for executables), you can just copy it to /usr/local/bin (one of the directories in the path). Once you've done this
which mpop
should list mpop as being in /usr/local/bin

[ Reply to This | # ]