summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2003-01-16 05:07:07 +0000
committeredwin <edwin@FreeBSD.org>2003-01-16 05:07:07 +0000
commitcc140326f1fda26fe372936a553379468938333f (patch)
treeea2110727a197e2a3af24f1141c8a082e5d201b5 /security
parenta6c2a5e9ff0daf50a131526476c4f1edb051b267 (diff)
downloadFreeBSD-ports-cc140326f1fda26fe372936a553379468938333f.zip
FreeBSD-ports-cc140326f1fda26fe372936a553379468938333f.tar.gz
New port: drweb-postfix antivirus checking backend
PR: ports/46496 Submitted by: zhuravlev alexander <zaa@ulstu.ru>
Diffstat (limited to 'security')
-rw-r--r--security/Makefile1
-rw-r--r--security/drweb-postfix/Makefile89
-rw-r--r--security/drweb-postfix/distinfo1
-rw-r--r--security/drweb-postfix/files/patch-aa11
-rw-r--r--security/drweb-postfix/files/patch-ab93
-rw-r--r--security/drweb-postfix/pkg-comment1
-rw-r--r--security/drweb-postfix/pkg-descr8
-rw-r--r--security/drweb-postfix/pkg-message21
-rw-r--r--security/drweb-postfix/pkg-plist72
9 files changed, 297 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile
index 27fa6da..20ecae4 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -45,6 +45,7 @@
SUBDIR += digest
SUBDIR += donkey
SUBDIR += drweb
+ SUBDIR += drweb-postfix
SUBDIR += drweb-sendmail
SUBDIR += drwebd
SUBDIR += dsniff
diff --git a/security/drweb-postfix/Makefile b/security/drweb-postfix/Makefile
new file mode 100644
index 0000000..e8a31cc
--- /dev/null
+++ b/security/drweb-postfix/Makefile
@@ -0,0 +1,89 @@
+# New ports collection makefile for: drweb_postfix
+# Date created: 5 December 2002
+# Whom: zhuravlev alexander <zaa@ulstu.ru>
+#
+# $FreeBSD$
+#
+
+PORTNAME= drweb_postfix
+PORTVERSION= 4.29
+CATEGORIES= security mail
+MASTER_SITES= ftp://ftp.drweb.ru/pub/unix/
+DISTNAME= drweb-clients-${PORTVERSION}-sources
+
+MAINTAINER= zaa@ulstu.ru
+
+RUN_DEPENDS= ${LOCALBASE}/etc/rc.d/drweb-0.sh:${PORTSDIR}/security/drwebd
+
+WRKSRC= ${WRKDIR}/${DISTNAME}
+
+INST_PREFIX= ${PREFIX}/${PORTNAME}
+DOC_DIR= ${PREFIX}/share/doc/drweb-postfix
+
+LANGS=en-ru en-es
+CONFS=drweb_postfix users
+TMPLS=error-admin error-sender mailbomb-admin mailbomb-sender skip-sender \
+ virus-admin virus-rcpts virus-sender
+DOCS=readme notify.rus.txt users_list.rus.txt conf_file.rus.txt notify.txt \
+ users_list.txt conf_file.txt readme.rus
+
+post-patch:
+ cd ${WRKSRC} && \
+ ${SED} "s#%PREFIX%#${PREFIX}#g" < dw_options.c > ndwo.c && \
+ ${MV} ndwo.c dw_options.c
+ cd ${WRKSRC}/etc && \
+ ${SED} -e "s#%PREFIX%#${PREFIX}#g" -e "s#%HOSTNAME%#${HOST}#g" \
+ < drweb_postfix.conf > nconf && \
+ ${MV} nconf drweb_postfix.conf
+
+post-configure:
+ cd ${WRKSRC} && { \
+ ${ECHO_CMD} n; \
+ ${ECHO_CMD} n; \
+ ${ECHO_CMD} n; \
+ ${ECHO_CMD} y; \
+ ${ECHO_CMD} n; \
+ ${ECHO_CMD} n; \
+ ${ECHO_CMD} y; \
+ ${ECHO_CMD} n; \
+ ${ECHO_CMD} ${CFLAGS} ; \
+ ${ECHO_CMD} y; \
+ } | ./configure
+
+do-install:
+ ${MKDIR} ${DOC_DIR}
+.for LANG in ${LANGS}
+ ${MKDIR} ${PREFIX}/etc/drweb/templates/${LANG}/postfix
+.endfor
+.for CONF in ${CONFS}
+ ${INSTALL_DATA} -m 640 -o drweb -g drweb ${WRKSRC}/etc/${CONF}.conf \
+ ${PREFIX}/etc/drweb/${CONF}.conf-dist
+ if [ ! -f ${PREFIX}/etc/drweb/${CONF}.conf ]; then \
+ ${INSTALL_DATA} -m 640 -o drweb -g drweb ${WRKSRC}/etc/${CONF}.conf \
+ ${PREFIX}/etc/drweb/${CONF}.conf; \
+ fi
+.endfor
+.for LANG in ${LANGS}
+.for TMPL in ${TMPLS}
+ cd ${WRKSRC}/etc/templates/${LANG}/postfix && \
+ ${INSTALL_DATA} ${TMPL}.msg \
+ ${PREFIX}/etc/drweb/templates/${LANG}/postfix/${TMPL}.msg-dist
+ if [ ! -f ${PREFIX}/etc/drweb/templates/${LANG}/postfix/${TMPL}.msg ]; then \
+ cd ${PREFIX}/etc/drweb/templates/${LANG}/postfix && \
+ ${CP} ${TMPL}.msg-dist ${TMPL}.msg; \
+ fi
+.endfor
+.endfor
+ ${INSTALL_PROGRAM} ${WRKSRC}/drweb-postfix ${PREFIX}/sbin/
+ ${INSTALL_PROGRAM} ${WRKSRC}/drwebdc ${PREFIX}/sbin/
+ cd ${WRKSRC}/doc/postfix && \
+ ${INSTALL_DATA} ${DOCS} ${DOC_DIR}
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+ @echo
+ @echo "Read documentation about additional Postfix tuning needed"
+ @echo "in ${DOC_DIR}."
+ @echo
+
+.include <bsd.port.mk>
diff --git a/security/drweb-postfix/distinfo b/security/drweb-postfix/distinfo
new file mode 100644
index 0000000..d617511
--- /dev/null
+++ b/security/drweb-postfix/distinfo
@@ -0,0 +1 @@
+MD5 (drweb-clients-4.29-sources.tar.gz) = 5ce100d96dd3a43df4fb49b2a8891457
diff --git a/security/drweb-postfix/files/patch-aa b/security/drweb-postfix/files/patch-aa
new file mode 100644
index 0000000..ac7905c
--- /dev/null
+++ b/security/drweb-postfix/files/patch-aa
@@ -0,0 +1,11 @@
+--- dw_options.c.bak Thu Aug 22 18:35:50 2002
++++ dw_options.c Sat Aug 24 19:19:13 2002
+@@ -92,7 +92,7 @@
+
+ #if defined(__UNIX_DW)
+ #if !defined(EMX_DW)
+-#define OS_SPEC_CONFNAME "/usr/local/drweb/"CONF_FNAME
++#define OS_SPEC_CONFNAME "%PREFIX%/etc/drweb/"CONF_FNAME
+ #else /* EMX */
+ #define OS_SPEC_CONFNAME "./"CONF_FNAME
+ #endif /* EMX */
diff --git a/security/drweb-postfix/files/patch-ab b/security/drweb-postfix/files/patch-ab
new file mode 100644
index 0000000..3f7485b
--- /dev/null
+++ b/security/drweb-postfix/files/patch-ab
@@ -0,0 +1,93 @@
+--- etc/drweb_postfix.conf.orig Wed Dec 4 16:17:33 2002
++++ etc/drweb_postfix.conf Wed Dec 4 16:56:36 2002
+@@ -14,14 +14,14 @@
+ # Address = inet:3000@localhost
+ # Address = local:/usr/local/drweb/run/drwebd.skt
+ # Address = pid:/usr/local/drweb/run/drwebd.pid
+-Address = inet:3000@localhost
++Address = local:%PREFIX%/drweb/run/drwebd.sock
+
+ # Enable/disable caching resolved daemon host
+ # (useful only if daemon uses TCP/IP communications)
+ Cache = yes
+
+ # Timeout for whole scanning session (in seconds)
+-Timeout = 120
++Timeout = 160
+
+ ########################
+ # Scan options section #
+@@ -58,10 +58,10 @@
+ DenyOnOne = yes
+
+ # List with rules for users or domains to block scanning
+-DenyList = /etc/drweb/users.conf
++DenyList = %PREFIX%/etc/drweb/users.conf
+
+ # Directory used for story temporary files
+-Spool = /var/drweb/spool
++Spool = /tmp
+
+ # Permissions for created spool files
+ SpoolFilesMode = 0600
+@@ -144,16 +144,16 @@
+ ProcessingErrors = reject
+
+ # Admin mail address (may be unix-local address)
+-AdminMail = av-admin@example.com
++AdminMail = postmaster
+
+ # Filter address, that be used in From:
+-FilterMail = DrWeb-DAEMON@example.com
++FilterMail = DrWeb-DAEMON@%HOSTNAME%
+
+ # Quarantine directory.
+ # The infected files could be moved in that dir
+ # if you stay this field empty or commented then
+ # infected messages would not been storied
+-Quarantine = /var/drweb/infected
++Quarantine = %PREFIX%/drweb/infected
+
+ # Permissions for quarantined files
+ QuarantineFilesMode = 0660
+@@ -168,32 +168,32 @@
+ RcptsNotify = yes
+
+ # Files with notification templates
+-AdminTemplate = /etc/drweb/templates/en-ru/postfix/virus-admin.msg
+-SenderTemplate = /etc/drweb/templates/en-ru/postfix/virus-sender.msg
+-RcptsTemplate = /etc/drweb/templates/en-ru/postfix/virus-rcpts.msg
++AdminTemplate = %PREFIX%/etc/drweb/templates/en-ru/postfix/virus-admin.msg
++SenderTemplate = %PREFIX%/etc/drweb/templates/en-ru/postfix/virus-sender.msg
++RcptsTemplate = %PREFIX%/etc/drweb/templates/en-ru/postfix/virus-rcpts.msg
+
+ [SkipNotifications]
+ AdminNotify = no
+ SenderNotify = yes
+ RcptsNotify = no
+ AdminTemplate =
+-SenderTemplate = /etc/drweb/templates/en-ru/postfix/skip-sender.msg
++SenderTemplate = %PREFIX%/etc/drweb/templates/en-ru/postfix/skip-sender.msg
+ RcptsTemplate =
+
+ [MailbombNotifications]
+ AdminNotify = yes
+ SenderNotify = yes
+ RcptsNotify = no
+-AdminTemplate = /etc/drweb/templates/en-ru/postfix/mailbomb-admin.msg
+-SenderTemplate = /etc/drweb/templates/en-ru/postfix/mailbomb-sender.msg
++AdminTemplate = %PREFIX%/etc/drweb/templates/en-ru/postfix/mailbomb-admin.msg
++SenderTemplate = %PREFIX%/etc/drweb/templates/en-ru/postfix/mailbomb-sender.msg
+ RcptsTemplate =
+
+ [ErrorNotifications]
+ AdminNotify = yes
+ SenderNotify = yes
+ RcptsNotify = no
+-AdminTemplate = /etc/drweb/templates/en-ru/postfix/error-admin.msg
+-SenderTemplate = /etc/drweb/templates/en-ru/postfix/error-sender.msg
++AdminTemplate = %PREFIX%/etc/drweb/templates/en-ru/postfix/error-admin.msg
++SenderTemplate = %PREFIX%/etc/drweb/templates/en-ru/postfix/error-sender.msg
+ RcptsTemplate =
+
+ ###################
diff --git a/security/drweb-postfix/pkg-comment b/security/drweb-postfix/pkg-comment
new file mode 100644
index 0000000..520d75f
--- /dev/null
+++ b/security/drweb-postfix/pkg-comment
@@ -0,0 +1 @@
+Postfix message filter for virus processing through DrWeb daemon
diff --git a/security/drweb-postfix/pkg-descr b/security/drweb-postfix/pkg-descr
new file mode 100644
index 0000000..854b7ca
--- /dev/null
+++ b/security/drweb-postfix/pkg-descr
@@ -0,0 +1,8 @@
+Postfix message filter for virus processing through DrWeb daemon
+
+WWW: http://www.drweb.ru/unix/
+
+--
+zhuravlev alexander
+ u l s t u n o c
+ zaa @ ulstu . ru
diff --git a/security/drweb-postfix/pkg-message b/security/drweb-postfix/pkg-message
new file mode 100644
index 0000000..822ae63
--- /dev/null
+++ b/security/drweb-postfix/pkg-message
@@ -0,0 +1,21 @@
+1. Add the following lines into Postfix master file (master.cf).
+
+filter unix - n n - - pipe
+ flags=R user=drweb argv={drweb-directory}/drweb-postfix -f ${sender} -- ${recipient}
+
+ or
+
+filter unix - n n - - pipe
+ flags=R user=drweb argv={drweb-directory}/drweb-postfix --conf={/path/to/your/conf/file} -f ${sender} -- ${recipient}
+
+ attention: {path/to/conf/file} should contain filename too
+
+2. Give Postfix a direction to check all the letters incoming through SMTP.
+For that you should find the following record in Postfix master file
+(parameters n - n - - may be different):
+
+smtp inet n - n - - smtpd
+
+and change it into:
+
+smtp inet n - n - - smtpd -o content_filter=filter:dummy
diff --git a/security/drweb-postfix/pkg-plist b/security/drweb-postfix/pkg-plist
new file mode 100644
index 0000000..e8a5887
--- /dev/null
+++ b/security/drweb-postfix/pkg-plist
@@ -0,0 +1,72 @@
+@comment $FreeBSD$
+@unexec if [ -f %D/etc/drweb/drweb_postfix.conf ] && cmp -s %D/etc/drweb/drweb_postfix.conf %D/etc/drweb/drweb_postfix.conf-dist; then rm -f %D/etc/drweb/drweb_postfix.conf; fi
+etc/drweb/drweb_postfix.conf-dist
+@exec [ -f %B/drweb_postfix.conf ] || cp %B/%f %B/drweb_postfix.conf
+@unexec if [ -f %D/etc/drweb/templates/en-ru/postfix/error-admin.msg ] && cmp -s %D/etc/drweb/templates/en-ru/postfix/error-admin.msg %D/etc/drweb/templates/en-ru/postfix/error-admin.msg-dist; then rm -f %D/etc/drweb/templates/en-ru/postfix/error-admin.msg; fi
+etc/drweb/templates/en-ru/postfix/error-admin.msg-dist
+@exec [ -f %B/error-admin.msg ] || cp %B/%f %B/error-admin.msg
+@unexec if [ -f %D/etc/drweb/templates/en-ru/postfix/error-sender.msg ] && cmp -s %D/etc/drweb/templates/en-ru/postfix/error-sender.msg %D/etc/drweb/templates/en-ru/postfix/error-sender.msg-dist; then rm -f %D/etc/drweb/templates/en-ru/postfix/error-sender.msg; fi
+etc/drweb/templates/en-ru/postfix/error-sender.msg-dist
+@exec [ -f %B/error-sender.msg ] || cp %B/%f %B/error-sender.msg
+@unexec if [ -f %D/etc/drweb/templates/en-ru/postfix/mailbomb-admin.msg ] && cmp -s %D/etc/drweb/templates/en-ru/postfix/mailbomb-admin.msg %D/etc/drweb/templates/en-ru/postfix/mailbomb-admin.msg-dist; then rm -f %D/etc/drweb/templates/en-ru/postfix/mailbomb-admin.msg; fi
+etc/drweb/templates/en-ru/postfix/mailbomb-admin.msg-dist
+@exec [ -f %B/mailbomb-admin.msg ] || cp %B/%f %B/mailbomb-admin.msg
+@unexec if [ -f %D/etc/drweb/templates/en-ru/postfix/mailbomb-sender.msg ] && cmp -s %D/etc/drweb/templates/en-ru/postfix/mailbomb-sender.msg %D/etc/drweb/templates/en-ru/postfix/mailbomb-sender.msg-dist; then rm -f %D/etc/drweb/templates/en-ru/postfix/mailbomb-sender.msg; fi
+etc/drweb/templates/en-ru/postfix/mailbomb-sender.msg-dist
+@exec [ -f %B/mailbomb-sender.msg ] || cp %B/%f %B/mailbomb-sender.msg
+@unexec if [ -f %D/etc/drweb/templates/en-ru/postfix/skip-sender.msg ] && cmp -s %D/etc/drweb/templates/en-ru/postfix/skip-sender.msg %D/etc/drweb/templates/en-ru/postfix/skip-sender.msg-dist; then rm -f %D/etc/drweb/templates/en-ru/postfix/skip-sender.msg; fi
+etc/drweb/templates/en-ru/postfix/skip-sender.msg-dist
+@exec [ -f %B/skip-sender.msg ] || cp %B/%f %B/skip-sender.msg
+@unexec if [ -f %D/etc/drweb/templates/en-ru/postfix/virus-admin.msg ] && cmp -s %D/etc/drweb/templates/en-ru/postfix/virus-admin.msg %D/etc/drweb/templates/en-ru/postfix/virus-admin.msg-dist; then rm -f %D/etc/drweb/templates/en-ru/postfix/virus-admin.msg; fi
+etc/drweb/templates/en-ru/postfix/virus-admin.msg-dist
+@exec [ -f %B/virus-admin.msg ] || cp %B/%f %B/virus-admin.msg
+@unexec if [ -f %D/etc/drweb/templates/en-ru/postfix/virus-rcpts.msg ] && cmp -s %D/etc/drweb/templates/en-ru/postfix/virus-rcpts.msg %D/etc/drweb/templates/en-ru/postfix/virus-rcpts.msg-dist; then rm -f %D/etc/drweb/templates/en-ru/postfix/virus-rcpts.msg; fi
+etc/drweb/templates/en-ru/postfix/virus-rcpts.msg-dist
+@exec [ -f %B/virus-rcpts.msg ] || cp %B/%f %B/virus-rcpts.msg
+@unexec if [ -f %D/etc/drweb/templates/en-ru/postfix/virus-sender.msg ] && cmp -s %D/etc/drweb/templates/en-ru/postfix/virus-sender.msg %D/etc/drweb/templates/en-ru/postfix/virus-sender.msg-dist; then rm -f %D/etc/drweb/templates/en-ru/postfix/virus-sender.msg; fi
+etc/drweb/templates/en-ru/postfix/virus-sender.msg-dist
+@exec [ -f %B/virus-sender.msg ] || cp %B/%f %B/virus-sender.msg
+@unexec if [ -f %D/etc/drweb/templates/en-es/postfix/error-admin.msg ] && cmp -s %D/etc/drweb/templates/en-es/postfix/error-admin.msg %D/etc/drweb/templates/en-es/postfix/error-admin.msg-dist; then rm -f %D/etc/drweb/templates/en-es/postfix/error-admin.msg; fi
+etc/drweb/templates/en-es/postfix/error-admin.msg-dist
+@exec [ -f %B/error-admin.msg ] || cp %B/%f %B/error-admin.msg
+@unexec if [ -f %D/etc/drweb/templates/en-es/postfix/error-sender.msg ] && cmp -s %D/etc/drweb/templates/en-es/postfix/error-sender.msg %D/etc/drweb/templates/en-es/postfix/error-sender.msg-dist; then rm -f %D/etc/drweb/templates/en-es/postfix/error-sender.msg; fi
+etc/drweb/templates/en-es/postfix/error-sender.msg-dist
+@exec [ -f %B/error-sender.msg ] || cp %B/%f %B/error-sender.msg
+@unexec if [ -f %D/etc/drweb/templates/en-es/postfix/mailbomb-admin.msg ] && cmp -s %D/etc/drweb/templates/en-es/postfix/mailbomb-admin.msg %D/etc/drweb/templates/en-es/postfix/mailbomb-admin.msg-dist; then rm -f %D/etc/drweb/templates/en-es/postfix/mailbomb-admin.msg; fi
+etc/drweb/templates/en-es/postfix/mailbomb-admin.msg-dist
+@exec [ -f %B/mailbomb-admin.msg ] || cp %B/%f %B/mailbomb-admin.msg
+@unexec if [ -f %D/etc/drweb/templates/en-es/postfix/mailbomb-sender.msg ] && cmp -s %D/etc/drweb/templates/en-es/postfix/mailbomb-sender.msg %D/etc/drweb/templates/en-es/postfix/mailbomb-sender.msg-dist; then rm -f %D/etc/drweb/templates/en-es/postfix/mailbomb-sender.msg; fi
+etc/drweb/templates/en-es/postfix/mailbomb-sender.msg-dist
+@exec [ -f %B/mailbomb-sender.msg ] || cp %B/%f %B/mailbomb-sender.msg
+@unexec if [ -f %D/etc/drweb/templates/en-es/postfix/skip-sender.msg ] && cmp -s %D/etc/drweb/templates/en-es/postfix/skip-sender.msg %D/etc/drweb/templates/en-es/postfix/skip-sender.msg-dist; then rm -f %D/etc/drweb/templates/en-es/postfix/skip-sender.msg; fi
+etc/drweb/templates/en-es/postfix/skip-sender.msg-dist
+@exec [ -f %B/skip-sender.msg ] || cp %B/%f %B/skip-sender.msg
+@unexec if [ -f %D/etc/drweb/templates/en-es/postfix/virus-admin.msg ] && cmp -s %D/etc/drweb/templates/en-es/postfix/virus-admin.msg %D/etc/drweb/templates/en-es/postfix/virus-admin.msg-dist; then rm -f %D/etc/drweb/templates/en-es/postfix/virus-admin.msg; fi
+etc/drweb/templates/en-es/postfix/virus-admin.msg-dist
+@exec [ -f %B/virus-admin.msg ] || cp %B/%f %B/virus-admin.msg
+@unexec if [ -f %D/etc/drweb/templates/en-es/postfix/virus-rcpts.msg ] && cmp -s %D/etc/drweb/templates/en-es/postfix/virus-rcpts.msg %D/etc/drweb/templates/en-es/postfix/virus-rcpts.msg-dist; then rm -f %D/etc/drweb/templates/en-es/postfix/virus-rcpts.msg; fi
+etc/drweb/templates/en-es/postfix/virus-rcpts.msg-dist
+@exec [ -f %B/virus-rcpts.msg ] || cp %B/%f %B/virus-rcpts.msg
+@unexec if [ -f %D/etc/drweb/templates/en-es/postfix/virus-sender.msg ] && cmp -s %D/etc/drweb/templates/en-es/postfix/virus-sender.msg %D/etc/drweb/templates/en-es/postfix/virus-sender.msg-dist; then rm -f %D/etc/drweb/templates/en-es/postfix/virus-sender.msg; fi
+etc/drweb/templates/en-es/postfix/virus-sender.msg-dist
+@exec [ -f %B/virus-sender.msg ] || cp %B/%f %B/virus-sender.msg
+@unexec if [ -f %D/etc/drweb/users.conf ] && cmp -s %D/etc/drweb/users.conf %D/etc/drweb/users.conf-dist; then rm -f %D/etc/drweb/users.conf; fi
+etc/drweb/users.conf-dist
+@exec [ -f %B/users.conf ] || cp %B/%f %B/users.conf
+sbin/drweb-postfix
+sbin/drwebdc
+share/doc/drweb-postfix/readme
+share/doc/drweb-postfix/notify.rus.txt
+share/doc/drweb-postfix/users_list.rus.txt
+share/doc/drweb-postfix/conf_file.rus.txt
+share/doc/drweb-postfix/notify.txt
+share/doc/drweb-postfix/users_list.txt
+share/doc/drweb-postfix/conf_file.txt
+share/doc/drweb-postfix/readme.rus
+@dirrm share/doc/drweb-postfix
+@dirrm etc/drweb/templates/en-es/postfix
+@dirrm etc/drweb/templates/en-es
+@dirrm etc/drweb/templates/en-ru/postfix
+@dirrm etc/drweb/templates/en-ru
+@dirrm etc/drweb/templates
+@dirrm etc/drweb
OpenPOWER on IntegriCloud