469,275 Members | 1,823 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

POP3 Filter

Not sure if this has been done...

Has anyone created a python script that listens on the default POP3 port
for incoming mail, kills certain messages based on a criteria, and
forwards the output to a non-standard port the POP3 server is listening on?

Upon recieving requests from a sender, the script would transparently
forward traffic to the off port unless a violating condition is encountered.

I'd like to use the listening python script to check for a correct 'to:'
address format, attachment size limit, etc.

Before I waste too much time, do you think this is do-able?

Jul 18 '05 #1
4 1770
Check spambayes
http://spambayes.sourceforge.net/

-Harry
On Fri, 24 Sep 2004 11:11:43 -0700, crystal1 <cr******@spamless.net> wrote:
Not sure if this has been done...

Has anyone created a python script that listens on the default POP3 port
for incoming mail, kills certain messages based on a criteria, and
forwards the output to a non-standard port the POP3 server is listening on?

Upon recieving requests from a sender, the script would transparently
forward traffic to the off port unless a violating condition is encountered.

I'd like to use the listening python script to check for a correct 'to:'
address format, attachment size limit, etc.

Before I waste too much time, do you think this is do-able?

--
http://mail.python.org/mailman/listinfo/python-list

Jul 18 '05 #2
crystal1 <cr******@spamless.net> wrote:
Not sure if this has been done...

Has anyone created a python script that listens on the default POP3 port
for incoming mail, kills certain messages based on a criteria, and
forwards the output to a non-standard port the POP3 server is listening on?

Upon recieving requests from a sender, the script would transparently
forward traffic to the off port unless a violating condition is encountered.

I'd like to use the listening python script to check for a correct 'to:'
address format, attachment size limit, etc.

Before I waste too much time, do you think this is do-able?


I think you may be confused about SMTP and POP3.

--
William Park <op**********@yahoo.ca>
Open Geometry Consulting, Toronto, Canada
Jul 18 '05 #3

[crystal1]
Has anyone created a python script that listens on the default POP3 port
for incoming mail, kills certain messages based on a criteria, and
forwards the output to a non-standard port the POP3 server is listening on?
[Harry] Check spambayes
http://spambayes.sourceforge.net/


The SpamBayes POP3 proxy only annotates messages; it doesn't kill them.
Killing them isn't easily possible, because a typical POP3 conversation looks
like this:

Client: "How many messages are there?"
Server: "Two"
Client: "Give me message number 1"
Server: "Here it is: ..."
Client: "Give me message number 2"
Server: "Here it is: ..."
Client: "Thanks, bye."

The only way you can kill messages is to download them all at the start of the
conversation and decide which ones you need to kill. That's unreasonable for
many people's setups.

SpamBayes' approach is to add a header (X-Spambayes-Classification) or to
annotate an existing header (Subject or To) and let the user use his email
client to filter the messages based on the annotation. (This has the added
benefit that the user has the option of reviewing the proxy's decisions and
correcting them if it makes a mistake.)

--
Richie Hindle
ri****@entrian.com

Jul 18 '05 #4
On Fri, 24 Sep 2004 11:11:43 -0700, crystal1 wrote:
Not sure if this has been done...

Has anyone created a python script that listens on the default POP3 port
for incoming mail, kills certain messages based on a criteria, and
forwards the output to a non-standard port the POP3 server is listening on?

Upon recieving requests from a sender, the script would transparently
forward traffic to the off port unless a violating condition is encountered.

I'd like to use the listening python script to check for a correct 'to:'
address format, attachment size limit, etc.

Before I waste too much time, do you think this is do-able?


It's doable, and has been done. For example, I use mailfilter (though
I don't think it's in python).

POP3 does allow you to kill individual messages before downloading
them. The problem is that, if you want to avoid downloading them, you
can't get too much info. I think it would be possible to be cleverer
than mailfilter, since (at least some) POP servers can give you the
start of a message without giving you the whole thing.
Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Lev Altshuler | last post: by
reply views Thread by Eric McDaniel | last post: by
8 posts views Thread by Captain Nemo | last post: by
2 posts views Thread by Mike Brearley | last post: by
1 post views Thread by Kevin F | last post: by
4 posts views Thread by bill | last post: by
9 posts views Thread by flit | last post: by
reply views Thread by =?Utf-8?B?Q2hhcmxlcw==?= | last post: by
5 posts views Thread by Craig Buchanan | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.