Re: python newbie, linux novice, needs to run spamassassin



Gates Danderhoff <danderup@xxxxxxxxx> writes:
[ . . ]
I have a very simple request regarding spamassain: I just need an example
of how to run it once you have downloaded one or more emails into a
folder.

I have a python script which runs poplib and is downloading emails into a
folder, say ~/mymailin.

Each time the script is run and emails have been downloaded into the
folder, I would like to run spamassassin to read through the emails in the
folder and check them for their spamminess and if they are spammy, it
should do whatever spamassassin does: add a header and move it to another
folder, say ~/myspam, or maybe ~/mygoodemail if it's not spammy?

I'm unaware if SA can run on a folder. You may instead need poplib hands
off to SA, SA does its thing, SA hands off passes back to poplib and
poplib deposits in folder.

SA only marks (tags as spam) headers (so it appears to me). It's up
to some other filtering unit (procmail or email client with filter,
etc.) to move (a/the spam) according to rules that you tell_it/set in
the filter.

I'm yet to grok the whole thing myself.

But just ran across this:

http://linux.org.mt/article/killspam

Perhaps rare, lay person's terms utilized. Also is for
desktop/workstation, not server.

If you get something working with your few components, please share it
back here as I'd be interested to see it.

BTW if only a few emails per day, I've a Perl script, uses Net::Pop3 to
scans most recent messages on pop3 server, checks (against your list of
allowed parties whom you know, it's a list of their email addresses)
for "disallowed From entries" can see a list offered to delete,
can edit list if needed and/or pass the list back in and in doing so it
deletes only those messages that you told it from pop3 server. Then use
email client to retrieve remaining email from pop3 server. I'd willing
to share the script if someone interested. Switched ISP's and no
longer use the script -- it's login is clear text -- not such a good
idea -- although I think encrypted login is supported via another Perl
module.

--
Cu, Alan abc
.



Relevant Pages

  • Re: Switch identities
    ... hope that there's a better way for me to retreive my old emails from ... This script will recover a plain text version of the emails. ... OSAX into your /Library/ScriptingAdditions folder before you start up Script ... set recoveryFolder to folder "Recovered Emails" ...
    (microsoft.public.mac.office.entourage)
  • Re: Messages stuck in Queue
    ... > Trend Micro CSM for SMB patch for POP3 Connector installed? ... >> Quite a bit of email since Wed afternoon - about 600 emails all in all ... >> As a workaround I have the clients downloading direct to their Outlook ...
    (microsoft.public.windows.server.sbs)
  • Re: RDO objects and C#
    ... When I'm trying to traverse through a folder and deleting the emails it is ... RDOFolder rdoFolder = rdoFolders.GetFirst; ... RDOFolder subFolder; ...
    (microsoft.public.outlook.interop)
  • Re: copy or import saved emails
    ... I had an HUGE tree of saved emails and I suspect I ... I had changed the location of my Store Folder to a folder named Saved Emails ... To restore a bak folder to the message store folder, ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Emails Missing from Outlook Express 2003
    ... Empty Deleted Items folder daily. ... To restore a bak folder to the message store folder, ... name as the bak file you want to restore but without the .bak. ... and all my inbox Emails from Jan to March 2007 were missing. ...
    (microsoft.public.windowsxp.newusers)