summaryrefslogtreecommitdiff
path: root/packages/p3scan/files
diff options
context:
space:
mode:
authorJamie Lenehan <lenehan@twibble.org>2006-10-13 07:54:54 +0000
committerJamie Lenehan <lenehan@twibble.org>2006-10-13 07:54:54 +0000
commited73ca098e3c44c6a08604500876552ffd023b47 (patch)
treef5cb2bd9413f902ede7be99ef0c9b5fb1cba07db /packages/p3scan/files
parent2de2711091ecf78d37a4dbf7abd2ac912bdd744b (diff)
p3scan 2.9.05d: Add p3scan, a transparent proxy for POP3, POP3S and SMTP
with virus scanning support. Default configuration uses clamav directly via libclamav.
Diffstat (limited to 'packages/p3scan/files')
-rw-r--r--packages/p3scan/files/.mtn2git_empty0
-rw-r--r--packages/p3scan/files/doc.configure.txt15
-rw-r--r--packages/p3scan/files/dont-search-use-include.patch11
-rw-r--r--packages/p3scan/files/libtool-fix.patch24
-rw-r--r--packages/p3scan/files/p3scan.conf16
-rw-r--r--packages/p3scan/files/p3scan.init33
-rw-r--r--packages/p3scan/files/volatiles.05_p3scan4
7 files changed, 103 insertions, 0 deletions
diff --git a/packages/p3scan/files/.mtn2git_empty b/packages/p3scan/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/p3scan/files/.mtn2git_empty
diff --git a/packages/p3scan/files/doc.configure.txt b/packages/p3scan/files/doc.configure.txt
new file mode 100644
index 0000000000..2d925f8314
--- /dev/null
+++ b/packages/p3scan/files/doc.configure.txt
@@ -0,0 +1,15 @@
+The following items needs to be considered when using clamsmtp:
+
+1. Transparent proxy
+
+ For transparent proxying you need an IP tables rule such as:
+
+ iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 25 -j REDIRECT --to-ports 8110
+ iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 110 -j REDIRECT --to-ports 8110
+ iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 995 -j REDIRECT --to-ports 8110
+
+ where eth0 is the incomming port, and 8110 is the port that p3scan is
+ running on. Also remember to enable transparent proxy support in the
+ configuration file.
+
+ The ports are 25 for smtp, 110 for pop3 and 995 for pop3s.
diff --git a/packages/p3scan/files/dont-search-use-include.patch b/packages/p3scan/files/dont-search-use-include.patch
new file mode 100644
index 0000000000..91723ce1b6
--- /dev/null
+++ b/packages/p3scan/files/dont-search-use-include.patch
@@ -0,0 +1,11 @@
+--- p3scan-2.9.05d/configure.in 2006/10/12 00:49:31 1.1
++++ p3scan-2.9.05d/configure.in 2006/10/12 00:49:41
+@@ -34,8 +34,6 @@
+ # Checks for libraries.
+
+ AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR([library 'pthread' is required!])])
+-LDFLAGS="$LDFLAGS -L/usr/lib/pthread"
+-CPPFLAGS="$CPPFLAGS -I/usr/include/pthread"
+
+ # Checks for header files.
+ AC_HEADER_DIRENT
diff --git a/packages/p3scan/files/libtool-fix.patch b/packages/p3scan/files/libtool-fix.patch
new file mode 100644
index 0000000000..4645bcc616
--- /dev/null
+++ b/packages/p3scan/files/libtool-fix.patch
@@ -0,0 +1,24 @@
+Use our own libtool that knows about cross compiling, not the libtool
+that is included.
+
+--- p3scan-2.9.05d/aclocal.m4 2006/10/12 04:17:35 1.1
++++ p3scan-2.9.05d/aclocal.m4 2006/10/12 04:18:28
+@@ -73,8 +73,7 @@
+ LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+ # Always use our own libtool.
+-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+-AC_SUBST(LIBTOOL)dnl
++LIBTOOL="$host_alias-libtool"
+
+ # Prevent multiple expansion
+ define([AC_PROG_LIBTOOL], [])
+@@ -140,7 +139,7 @@
+ rm="rm -f"
+
+ # Global variables:
+-default_ofile=libtool
++default_ofile==${host_alias}-libtool
+ can_build_shared=yes
+
+ # All known linkers require a `.a' archive for static linking (except MSVC,
diff --git a/packages/p3scan/files/p3scan.conf b/packages/p3scan/files/p3scan.conf
new file mode 100644
index 0000000000..2d8ba07e87
--- /dev/null
+++ b/packages/p3scan/files/p3scan.conf
@@ -0,0 +1,16 @@
+# See /usr/share/doc/p3scan/ and/or p3scan(8) for more information
+
+# Delete infected messages
+delete
+
+# Maximum # of connections we will handle at once.
+maxchilds = 10
+
+# Tcp port to listen on
+# port = 8110
+
+# Where to look for an email-template when a notification message has to be sent.
+# template = /etc/p3scan/p3scan-en.mail
+
+# The username the daemon should run as.
+user = mail
diff --git a/packages/p3scan/files/p3scan.init b/packages/p3scan/files/p3scan.init
new file mode 100644
index 0000000000..9f3865b8b2
--- /dev/null
+++ b/packages/p3scan/files/p3scan.init
@@ -0,0 +1,33 @@
+#!/bin/sh
+DAEMON=/usr/sbin/p3scan
+P3SCAN_CONFIG=/etc/p3scan/p3scan.conf
+PIDFILE=/var/run/p3scan/p3scan.pid
+NAME="p3scan"
+DESC="P3SCAN"
+
+test -r /etc/default/p3scan && . /etc/default/p3scan
+test -x "$DAEMON" || exit 0
+test ! -r "$P3SCAN_CONFIG" && exit 0
+
+case "$1" in
+ start)
+ echo "Starting $DESC: "
+ start-stop-daemon --oknodo -S -x $DAEMON -- -c $P3SCAN_CONFIG
+ echo "$NAME."
+ ;;
+
+ stop)
+ echo "Stopping $DESC:"
+ start-stop-daemon -K -p $PIDFILE
+ ;;
+
+ restart)
+ $0 stop >/dev/null 2>&1
+ $0 start
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 0
+ ;;
+esac
diff --git a/packages/p3scan/files/volatiles.05_p3scan b/packages/p3scan/files/volatiles.05_p3scan
new file mode 100644
index 0000000000..2a7caeddd9
--- /dev/null
+++ b/packages/p3scan/files/volatiles.05_p3scan
@@ -0,0 +1,4 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d mail mail 0755 /var/run/p3scan none
+d mail mail 0755 /var/spool/p3scan/children none
+d mail mail 0755 /var/spool/p3scan/notify none