View | Details | Raw Unified | Return to bug 115560
Collapse All | Expand All

(-)Makefile (-14 / +22 lines)
Lines 7-16 Link Here
7
7
8
PORTNAME=	simscan
8
PORTNAME=	simscan
9
PORTVERSION=	1.1
9
PORTVERSION=	1.1
10
PORTREVISION=	2
10
PORTREVISION=	3
11
CATEGORIES=	mail security
11
CATEGORIES=	mail security
12
MASTER_SITES=	http://www.inter7.com/simscan/
12
MASTER_SITES=	http://www.inter7.com/simscan/
13
MASTER_SITE_SUBDIR=	${PORTNAME}
14
DISTNAME=	${PORTNAME}-${PORTVERSION:S/.r/rc/}
13
DISTNAME=	${PORTNAME}-${PORTVERSION:S/.r/rc/}
15
14
16
MAINTAINER=	toxa@toxahost.ru
15
MAINTAINER=	toxa@toxahost.ru
Lines 22-29 Link Here
22
21
23
WORKDIR?=	${QMAIL_PREFIX}/${PORTNAME}
22
WORKDIR?=	${QMAIL_PREFIX}/${PORTNAME}
24
QMAIL_QUEUE=	${QMAIL_PREFIX}/bin/qmail-queue
23
QMAIL_QUEUE=	${QMAIL_PREFIX}/bin/qmail-queue
25
PLIST_SUB=	QMAIL_PREFIX=${QMAIL_PREFIX} \
24
25
SUB_FILES=	pkg-message \
26
		pkg-install \
27
		pkg-deinstall
28
SUB_LIST=	QMAIL_PREFIX=${QMAIL_PREFIX} \
26
		SIMSCAN_DIR=${PORTNAME}
29
		SIMSCAN_DIR=${PORTNAME}
30
PLIST_SUB=	QMAIL_PREFIX=${QMAIL_PREFIX}
27
31
28
OPTIONS=	CLAMAV "Support for ClamAV Virus Scanning" on \
32
OPTIONS=	CLAMAV "Support for ClamAV Virus Scanning" on \
29
		RIPMIME "Ripmime Processing (if Clamav ScanMail disabled)" on \
33
		RIPMIME "Ripmime Processing (if Clamav ScanMail disabled)" on \
Lines 110-131 Link Here
110
	exit 1; \
114
	exit 1; \
111
fi
115
fi
112
116
117
post-patch:
118
	@${REINPLACE_CMD} -E 's,($f/daily.cvd"),\1 || test -d "$f/daily.inc",' \
119
		${WRKSRC}/configure
120
113
pre-configure:
121
pre-configure:
114
	@${ECHO_MSG} ""
122
	@${ECHO_MSG} ""
115
	@${ECHO_MSG} "=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~="
123
	@${ECHO_MSG} "=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~="
116
	@${ECHO_MSG} "You may also use the following build options:"
124
	@${ECHO_MSG} "You may also use the following build options:"
117
	@${ECHO_MSG} ""
125
	@${ECHO_MSG} ""
118
	@${ECHO_MSG} "QMAIL_PREFIX		Base qmail directory. Default is /var/qmail"
126
	@${ECHO_MSG} "QMAIL_PREFIX	Base qmail directory. Default is ${QMAIL_PREFIX}"
119
	@${ECHO_MSG} "WORKDIR		Directory to unpack emails. Default is /var/qmail/simscan"
127
	@${ECHO_MSG} "WORKDIR		Directory to unpack emails. Default is ${QMAIL_PREFIX}/${PORTNAME}"
120
	@${ECHO_MSG} "QMAIL_QUEUE		Define full path and name of the qmail-queue program"
128
	@${ECHO_MSG} "QMAIL_QUEUE	Define full path and name of the qmail-queue program"
121
	@${ECHO_MSG} "			Incoming mail is passed to this program after being"
129
	@${ECHO_MSG} "		Incoming mail is passed to this program after being"
122
	@${ECHO_MSG} "			scanned by SimScan. Default is /var/qmail/bin/qmail-queue"
130
	@${ECHO_MSG} "		scanned by SimScan. Default is ${QMAIL_PREFIX}/bin/qmail-queue"
123
	@${ECHO_MSG} "SPAMC_ARGS		Define the arguments to pass to spamc."
131
	@${ECHO_MSG} "SPAMC_ARGS	Define the arguments to pass to spamc."
124
	@${ECHO_MSG} "			Be sure to place quotes around the options you define"
132
	@${ECHO_MSG} "		Be sure to place quotes around the options you define"
125
	@${ECHO_MSG} "SPAM_HITS		Reject spam only above this hit level"
133
	@${ECHO_MSG} "SPAM_HITS	Reject spam only above this hit level"
126
	@${ECHO_MSG} "			Default is 10.0. Useful without PASSTHRU option"
134
	@${ECHO_MSG} "		Default is 10.0. Useful without PASSTHRU option"
127
	@${ECHO_MSG} "QUARANTINE_DIR		Directory to keep spam and/or infected emails"
135
	@${ECHO_MSG} "QUARANTINE_DIR	Directory to keep spam and/or infected emails"
128
	@${ECHO_MSG} "			Default is disabled"
136
	@${ECHO_MSG} "		Default is disabled"
129
	@${ECHO_MSG} "=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~="
137
	@${ECHO_MSG} "=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~="
130
	@${ECHO_MSG} ""
138
	@${ECHO_MSG} ""
131
139
(-)pkg-deinstall (-13 lines)
Removed Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: ports/mail/simscan/pkg-deinstall,v 1.1 2005/04/03 16:04:21 novel Exp $
4
5
USER=simscan
6
GROUP=${USER}
7
8
if [ x$2 != xDEINSTALL ]; then
9
    exit
10
fi
11
12
pw groupdel -n ${GROUP} || true
13
pw userdel -n ${GROUP} || true
(-)pkg-install (-51 lines)
Removed Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: ports/mail/simscan/pkg-install,v 1.2 2005/08/09 13:58:38 garga Exp $
4
5
USER=simscan
6
GROUP=${USER}
7
UID=74
8
GID=${UID}
9
SIMDIR=/var/qmail/simscan
10
11
if [ "$2" = "PRE-INSTALL" ]; then
12
13
echo adding simscan user
14
15
        if pw group show "${GROUP}" 2>/dev/null; then
16
                echo "You already have a group \"${GROUP}\", so I will use it."
17
        else
18
                if pw groupadd ${GROUP} -g ${GID}; then
19
                        echo "Added group \"${GROUP}\"."
20
                else
21
                        echo "Adding group \"${GROUP}\" failed..."
22
                        exit 1
23
                fi
24
        fi
25
26
27
        if pw user show "${USER}" 2>/dev/null; then
28
                echo "You already have a user \"${USER}\", so I will use it."
29
        else
30
                if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
31
                        -d /nonexistent -s /sbin/nologin -c "Simscan User"
32
                then
33
                        echo "Added user \"${USER}\"."
34
                else
35
                        echo "Adding user \"${USER}\" failed..."
36
                        exit 1
37
                fi
38
        fi
39
40
elif [ "$2" = "POST-INSTALL" ]; then
41
42
	if [ ! -d "$SIMDIR" ]; then
43
		/bin/mkdir -p "$SIMDIR" || exit 1
44
		/usr/sbin/chown "$USER:$GROUP" "$SIMDIR" || exit 1
45
		/bin/chmod 0750 "$SIMDIR" || exit 1
46
		/bin/chmod 04711 ${QMAIL_DIR}/bin/simscan
47
		/bin/chown $USER:$GROUP ${QMAIL_DIR}/bin/simscan ${QMAIL_DIR}/bin/simscanmk
48
	fi
49
fi
50
51
exit 0
(-)pkg-message (-23 lines)
Removed Link Here
1
2
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
3
NOTES:
4
5
* You have to configure your anti-virus and anti-spam products!
6
7
* You have to modify your qmail startup files to call simscan.
8
In most cases, you just need to edit /var/qmail/tcp.smtp in
9
order to call simscan instead of qmail-queue, by setting up
10
QMAILQUEUE variable. For example:
11
12
127.0.0.1:allow,RELAYCLIENT=""
13
192.168.0.:allow,RELAYCLIENT="",QMAILQUEUE="/var/qmail/bin/simscan"
14
:allow,QMAILQUEUE="/var/qmail/bin/simscan"
15
16
* Don't forget to rebuild tcp.smtp.cdb from new tcp.smtp using tcprules!
17
18
* Also, read documentation about how to configure 
19
attachment blocking and per domain processing. 
20
Additional documentation can be found here: 
21
http://qmailwiki.inter7.com/index.php?title=Simscan
22
23
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
(-)pkg-plist (-4 lines)
Lines 1-7 Link Here
1
@cwd %%QMAIL_PREFIX%%
1
@cwd %%QMAIL_PREFIX%%
2
bin/simscanmk
2
bin/simscanmk
3
bin/simscan
3
bin/simscan
4
@unexec rmdir %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% || true
5
@unexec echo ""
6
@unexec echo "If you're not updating this port, you can delete %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% directory"
7
@unexec echo ""
(-)files/pkg-deinstall.in (+19 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
5
USER=simscan
6
GROUP=${USER}
7
8
if [ x$2 != xDEINSTALL ]; then
9
    exit
10
fi
11
12
pw groupdel -n ${GROUP} || true
13
pw userdel -n ${GROUP} || true
14
15
rmdir %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% || true
16
17
echo ""
18
echo "If you're not updating this port, you can delete %%QMAIL_PREFIX%%/%%SIMSCAN_DIR%% directory"
19
echo ""
(-)files/pkg-install.in (+51 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
5
USER=simscan
6
GROUP=${USER}
7
UID=74
8
GID=${UID}
9
SIMDIR=%%QMAIL_PREFIX%%/%%SIMSCAN_DIR%%
10
11
if [ "$2" = "PRE-INSTALL" ]; then
12
13
echo adding simscan user
14
15
        if pw group show "${GROUP}" 2>/dev/null; then
16
                echo "You already have a group \"${GROUP}\", so I will use it."
17
        else
18
                if pw groupadd ${GROUP} -g ${GID}; then
19
                        echo "Added group \"${GROUP}\"."
20
                else
21
                        echo "Adding group \"${GROUP}\" failed..."
22
                        exit 1
23
                fi
24
        fi
25
26
27
        if pw user show "${USER}" 2>/dev/null; then
28
                echo "You already have a user \"${USER}\", so I will use it."
29
        else
30
                if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
31
                        -d /nonexistent -s /sbin/nologin -c "Simscan User"
32
                then
33
                        echo "Added user \"${USER}\"."
34
                else
35
                        echo "Adding user \"${USER}\" failed..."
36
                        exit 1
37
                fi
38
        fi
39
40
elif [ "$2" = "POST-INSTALL" ]; then
41
42
	if [ ! -d "$SIMDIR" ]; then
43
		/bin/mkdir -p "$SIMDIR" || exit 1
44
		/usr/sbin/chown "$USER:$GROUP" "$SIMDIR" || exit 1
45
		/bin/chmod 0750 "$SIMDIR" || exit 1
46
		/bin/chmod 04711 %%QMAIL_PREFIX%%/bin/simscan
47
		/usr/sbin/chown $USER:$GROUP %%QMAIL_PREFIX%%/bin/simscan %%QMAIL_PREFIX%%/bin/simscanmk
48
	fi
49
fi
50
51
exit 0
(-)files/pkg-message.in (+23 lines)
Added Link Here
1
2
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
3
NOTES:
4
5
* You have to configure your anti-virus and anti-spam products!
6
7
* You have to modify your qmail startup files to call simscan.
8
In most cases, you just need to edit %%QMAIL_PREFIX%%/tcp.smtp in
9
order to call simscan instead of qmail-queue, by setting up
10
QMAILQUEUE variable. For example:
11
12
127.0.0.1:allow,RELAYCLIENT=""
13
192.168.0.:allow,RELAYCLIENT="",QMAILQUEUE="%%QMAIL_PREFIX%%/bin/simscan"
14
:allow,QMAILQUEUE="%%QMAIL_PREFIX%%/bin/simscan"
15
16
* Don't forget to rebuild tcp.smtp.cdb from new tcp.smtp using tcprules!
17
18
* Also, read documentation about how to configure 
19
attachment blocking and per domain processing. 
20
Additional documentation can be found here: 
21
http://qmailwiki.inter7.com/index.php?title=Simscan
22
23
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=

Return to bug 115560