summaryrefslogtreecommitdiff
blob: e5adb816ee71a81c8b9877ebaf6ab9dc97b736ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-mail/pop3vscan/pop3vscan-0.4.ebuild,v 1.13 2004/06/24 23:26:27 agriffis Exp $

S="${WORKDIR}/${P}"
DESCRIPTION="A transparent POP3-Proxy with virus-scanning capabilities."
SRC_URI="mirror://sourceforge/pop3vscan/${P}.tar.gz"
HOMEPAGE="http://pop3vscan.sf.net/"

DEPEND="net-mail/ripmime dev-libs/libpcre"
RDEPEND="net-firewall/iptables"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="x86 sparc"

src_unpack() {
	unpack ${A}
	rm -f ${S}/ripmime/ripmime.a
}

src_compile() {
	make || die
}

src_install () {
	dodir /usr/sbin
	dosbin pop3vscan
	dodir /etc
	insinto /etc
	doins pop3vscan.conf pop3vscan.mail

	insinto /etc/init.d
	doins ${FILESDIR}/pop3vscan
	fperms 755 /etc/init.d/pop3vscan

	dodoc README
}

pkg_postinst() {
	useradd -d /tmp -s /bin/false -g nogroup mail
	dodir /var/spool/pop3vscan
	fowners mail /var/spool/pop3vscan
	fperms 700 /var/spool/pop3vscan

	einfo "You need configure /etc/pop3vscan and /etc/pop3vscan.mail"
	einfo "For start pop3vscan you can use /etc/init.d/pop3vscan start"
	einfo "You need port-redirecting, a rule like:"
	einfo "iptables -t nat -A PREROUTING -p tcp -i eth0 --dport pop3 -j REDIRECT --to 8110"
	einfo "is enough"
}