Manual Page
Project Page
Juan's Homepage



   pop3filter - POP3 Transparent Proxy with filters support


   pop3filter [-hvf] [-e file] [--help] [--version] [--fork]
] rhost remoteport lport [ filter ] ARGUMENTS rhost remote host to connect (the POP3 server) remoteport remote port to connect (usually 110) lport local port to bind and listen filter program that will filter the messages. If none is selected the message is left as-is OPTIONS -h or --help display the help and exit -V or --version print version information and exit -f or --fork fork to the background -e file Append filter stderr output to file --listen
bind only to the interface address --user run server as user --group run server in group FILTERS TODO The following enviroment variables are defined in the enviroment of the filter process: POP3_USERNAME The POP3 username. Eg. bob POP3_SERVER The POP3 server. Eg: pop3.isp.net POP3_RPORT The server's port. Eg: 110 POP3_LPORT Local opened port. Eg: 11011 POP3_VERSION Version of pop3filter. Eg: 0.0.1 NOTES When you kill the server (when running as a stand alone server) the child process (active clients) are not killed so they can finish their transaccions. I found this like a good behavior. Tell me your opinion if you do not agree. EXAMPLES I assume that the POP3 server that we want to proxy is at pop3.isp.net at the port 110. * Say you want just to set up the proxy at the port 11011 with no filter. AMPLE * Now you want to catch all request on your network going to pop3.isp.net so the thing goes transparent. If you use Linux() 2.4, with Netfilter: AMPLE * Now you want to leave the program running as a daemon? AMPLE * Lets do some filtering. Filter can be another file or just an `in-line' expression: AMPLE (yes. nobody wants to do that, but is just an example) * Want to add some anti-spam header and rename dangerous attachments? You can use a filter something like: AMPLE * This program runs also from inetd. All errors and information goes to syslog. In your inetd.conf put something like: AMPLE Note that the filter can be called several times at the same time (multiple connections from different clients, so if you are writing things to a file use some sort of lock. Backup the message in an mbox and maildir format is left as exercise. I probably must add them here. USEFULL TOOLS RenAttach Renattach is a small, efficient and surprisingly effective filter designed primarily to offer an additional level of safety to Windows users whose e-mails pass through a UNIX-like mail server. Many modern viruses are spread through e-mail, and renattach combats such viruses by filtering e-mail attachments based on file extension. [3]http://www.pc-tools.net/linux/ DSPAM SPAM (as in De-Spam) is an extremely scalable, open-source statistical hybrid anti-spam filter. While most commercial solutions only provide a mere 95% accuracy (1 error in 20), a majority of DSPAM users frequently see between 99.95% (1 error in 2000) all the way up to 99.985% (1 error in 7000). DSPAM is currently effective as both a server-side agent for UNIX email servers and a developer's library for mail clients, other anti-spam tools, and similar projects requiring drop-in spam filtering. DSPAM has been implemented on many large and small scale systems with the largest systems being reported at about 125,000 mailboxes. [4]http://www.nuclearelephant.com/projects/dspam/ SpamAssasin SpamAssassin is a mail filter to identify spam. Using its rule base, it uses a wide range of heuristic tests on mail headers and body text to identify "spam", also known as unsolicited commercial email. [5]http://spamassassin.taint.org/ ripMIME Let you get all the parts of a MIME message (that means also get the files) With this one you can use an anti-virus. [6]http://pldaniels.org/ripmime/ TNEF TNEF decodes those annoying MS-TNEF MIME attachments that Microsoft mail servers helpfully use to encapsulate your already MIME encoded attachments. [7]http://world.std.com/~damned/software.html BASE64 BASE64 (RFC 1341) Encoder/Decoder that i wrote some years ago. Very simple. [8]http://www.ibiblio.org//pub/Linux/system/mail/base64-1.1.tar .gz Tell me if you want a pointer to your filter! BUGS See the BUGS file in the distribution or go to Bug the Tracking Site AUTHOR Original written by Juan F. Codagnone <[9]juam@users.sourceforge.net> COPYRIGHT Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being ``GNU General Public License'' and ``GNU Free Documentation License'', with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''.