Email filters in python

sf sf at sf.sf
Fri Dec 17 10:07:26 EST 2004


Would someome like to post their email filters code. Its so common that
probably some standard library
supports it or many would have written it already. If I have basic
structure, I can take from there.

( Essentially I want get rid of XP by getting rid of powerful mail client
"TheBat!" )

..........................
- open POP-SSL connection to pop.someserver.com
- Get all mails and store as Unix mail file (mymails)
- do not delete mails from server
- close connection.
..........................
- open mymails file

- Do following for each mail in mymails file (one by one)
    {
        - get header fields:  {FROM, TO, CC, Subject,... more ... }
        - some conditons (FROM is found my addresslist.txt but not part of
my rejectlist.txt )
            append that mail to some existing file.
    }


..........................
- open SMTP-TLS connection to smtp.someserver.com
    - send all mails in my unix mail file
- close connection
..........................


Thanks.





More information about the Python-list mailing list