POP3 Filter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • crystal1

    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?

  • Harry Penner

    #2
    Re: POP3 Filter

    Check spambayes


    -Harry
    On Fri, 24 Sep 2004 11:11:43 -0700, crystal1 <crystal1@spaml ess.net> wrote:[color=blue]
    > 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
    >[/color]

    Comment

    • William Park

      #3
      Re: POP3 Filter

      crystal1 <crystal1@spaml ess.net> wrote:[color=blue]
      > 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?[/color]

      I think you may be confused about SMTP and POP3.

      --
      William Park <opengeometry@y ahoo.ca>
      Open Geometry Consulting, Toronto, Canada

      Comment

      • Richie Hindle

        #4
        Re: POP3 Filter


        [crystal1][color=blue]
        > 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?[/color]

        [Harry][color=blue]
        > Check spambayes
        > http://spambayes.sourceforge.net/[/color]

        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
        richie@entrian. com

        Comment

        • Ross Boylan

          #5
          Re: POP3 Filter

          On Fri, 24 Sep 2004 11:11:43 -0700, crystal1 wrote:
          [color=blue]
          > 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?[/color]

          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.


          Comment

          Working...