LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-17-2005, 10:31 AM   #1
JamieBrown
Member
 
Registered: Jan 2005
Location: Great Ayton, North Yorkshire, UK
Distribution: Gentoo, Mandriva, RHES, Debian
Posts: 61

Rep: Reputation: 15
SpamAssassin for remote POP3 boxes


Hello,

I have a Linux server that is permanently connected to the internet. Two of my users have remote POP3 boxes on other servers hosted by their ISPs. They don't want their mail to be downloaded to the Linux server because they check them from their mobile phones / at home etc.

I'm looking for spam solutions for these users. Is it possible to set up SpamAssassin so that it checks these POP3 boxes at regular intervals and removes spam mail from them / marks them as spam? So when the user comes to download their e-mail the spam messages are not there, or at least marked as spam so that they can be easily filtered or deleted?

(I'm aware that if they check their messages and a spam mail has been received since the last time SpamAssassin checked the account then that will still be there, but hopefully that should be minimal)

Alternatively, if SpamAssasssin cannot do this, does anyone know of an alternative solution that would do it (preferably Linux and Open Source, but not definitely)? Or a different idea to acheive the same result? Local spam scanners are not ideal, because we can't install it on mobile phones etc, and installing spam scanning at the ISP level is not an option unfortunately.

Cheers,

Jamie.
 
Old 05-17-2005, 02:32 PM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Rather than writing an entire script, you can probably do something with fetchmail. This will let you download each message to the Linux box and filter it, doing whatever you like with spam.

You'll can then forward email to another mail box to if you don't want to keep it on the Linux box; then just point your users at the “filtered” mail box instead.

The actions you can perform on a POP3 mail box are rather basic — getting the number of emails, retrieving the entirity of an email, marking an email for deletion when you log out, and logging out.

So you could write a script that downloads each email from the server without deleting it, pipes it through spamassassin, then deletes it if it is found as spam. If you want to mark it as spam, you'll either have to upgrade to IMAP or forward the email to the recipient again (and make sure you don't keep reprocessing each message).

The Perl modules Mail::Internet and Mail::SpamAssassin will help you here. There'll be a POP3 or IMAP module for CPAN as well.
 
Old 05-17-2005, 03:45 PM   #3
JamieBrown
Member
 
Registered: Jan 2005
Location: Great Ayton, North Yorkshire, UK
Distribution: Gentoo, Mandriva, RHES, Debian
Posts: 61

Original Poster
Rep: Reputation: 15
That sounds like a solution - thank you! I'll try it out! :-)

Jamie
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't SSH to remote machine: Connection closed by remote host Avatar Linux - Networking 35 10-23-2017 12:21 AM
spamassassin w/ procmail vs. spamassassin w/sendmail bleunuit Linux - Networking 1 08-01-2004 07:12 AM
SpamAssassin + Virusscanner + Fetchmail + POP3 Server dARkHunTEr Linux - Software 44 05-17-2004 10:20 PM
Downloading remote POP3 Mail to local mailbox Saffsd Linux - Newbie 7 01-26-2004 10:36 PM
win2000 boxes cannot map but winnt boxes can - same user! starbeetlechick Linux - Networking 0 07-24-2003 07:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration