pop3filter - POP3 Transparent Proxy with filters support
pop3filter [-hvf] [-e file] [--help] [--version] [--fork]
[--listen] rhost remoteport lport [ filter ]
remote host to connect (the POP3 server)
remote port to connect (usually 110)
local port to bind and listen
program that will filter the messages. If none is selected the
message is left as-is
-h or --help
display the help and exit
-V or --version
print version information and exit
-f or --fork
fork to the background
Append filter stderr output to file
bind only to the interface address
run server as user
run server in group
The following enviroment variables are defined in the enviroment of
the filter process:
The POP3 username. Eg. bob
The POP3 server. Eg: pop3.isp.net
The server's port. Eg: 110
Local opened port. Eg: 11011
Version of pop3filter. Eg: 0.0.1
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.
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
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:
Now you want to leave the program running as a daemon?
Lets do some filtering. Filter can be another file or just an
(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:
This program runs also from inetd. All errors and information
goes to syslog. In your inetd.conf put something like:
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.
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.
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
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
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.
TNEF decodes those annoying MS-TNEF MIME attachments that
Microsoft mail servers helpfully use to encapsulate your
already MIME encoded attachments.
BASE64 (RFC 1341) Encoder/Decoder that i wrote some years ago.
Tell me if you want a pointer to your filter!
See the BUGS file in the distribution or go to Bug the Tracking Site
Original written by Juan F. Codagnone <firstname.lastname@example.org>
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''.