diff options
author | Tobias Scherbaum <dertobi123@gentoo.org> | 2008-06-15 09:28:02 +0000 |
---|---|---|
committer | Tobias Scherbaum <dertobi123@gentoo.org> | 2008-06-15 09:28:02 +0000 |
commit | f14ce43dcb14d5b7d1a272aed05bc7072f35dcd8 (patch) | |
tree | 8dc1e6eb1e5f974fec91990b700cddd23d1f97b6 /mail-filter | |
parent | Bump edit-utils dependency (diff) | |
download | gentoo-2-f14ce43dcb14d5b7d1a272aed05bc7072f35dcd8.tar.gz gentoo-2-f14ce43dcb14d5b7d1a272aed05bc7072f35dcd8.tar.bz2 gentoo-2-f14ce43dcb14d5b7d1a272aed05bc7072f35dcd8.zip |
Optionally use libmilter instead of sendmail, so that spamass-milter can also be used with other MTAs such as Postfix (#177338), fix quoting.
(Portage version: 2.1.5.5)
Diffstat (limited to 'mail-filter')
-rw-r--r-- | mail-filter/spamass-milter/ChangeLog | 12 | ||||
-rw-r--r-- | mail-filter/spamass-milter/files/README.gentoo | 45 | ||||
-rw-r--r-- | mail-filter/spamass-milter/files/spamass-milter.conf3 | 30 | ||||
-rw-r--r-- | mail-filter/spamass-milter/files/spamass-milter.rc3 | 38 | ||||
-rw-r--r-- | mail-filter/spamass-milter/spamass-milter-0.3.1-r2.ebuild | 47 |
5 files changed, 159 insertions, 13 deletions
diff --git a/mail-filter/spamass-milter/ChangeLog b/mail-filter/spamass-milter/ChangeLog index 91502e3c2e6c..249c769fc435 100644 --- a/mail-filter/spamass-milter/ChangeLog +++ b/mail-filter/spamass-milter/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for mail-filter/spamass-milter -# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamass-milter/ChangeLog,v 1.19 2007/08/29 17:18:46 phreak Exp $ +# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamass-milter/ChangeLog,v 1.20 2008/06/15 09:28:02 dertobi123 Exp $ + +*spamass-milter-0.3.1-r2 (15 Jun 2008) + + 15 Jun 2008; Tobias Scherbaum <dertobi123@gentoo.org> files/README.gentoo, + +files/spamass-milter.conf3, +files/spamass-milter.rc3, + +spamass-milter-0.3.1-r2.ebuild: + Optionally use libmilter instead of sendmail, so that spamass-milter can + also be used with other MTAs such as Postfix (#177338), fix quoting. 29 Aug 2007; Christian Heim <phreak@gentoo.org> metadata.xml: Removing gustavoz from metadata due to his retirement (see #36010 for diff --git a/mail-filter/spamass-milter/files/README.gentoo b/mail-filter/spamass-milter/files/README.gentoo index c1a841fbbce3..49035c0ac5a5 100644 --- a/mail-filter/spamass-milter/files/README.gentoo +++ b/mail-filter/spamass-milter/files/README.gentoo @@ -1,29 +1,52 @@ -Simple install instructions by raker @ g.o, updates by gustavoz +Simple install instructions by raker @ g.o +updates by gustavoz +updates by SteveB --------------------------------------------------------------- -Open /etc/mail/sendmail.mc in your favorite editor: - - vi /etc/mail/sendmail.mc - -Add these lines before MAILER(local): - +For Sendmail: +------------- +Add these lines in /etc/mail/sendmail.mc before MAILER(local): INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl define(`confMILTER_MACROS_CONNECT',`b, j, _, {daemon_name}, {if_name}, {if_addr}')dnl define(`confMILTER_MACROS_ENVRCPT',`r, v, Z') When that's done run this command: - m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf Restart associated services: - /etc/init.d/sendmail stop /etc/init.d/spamass-milter start /etc/init.d/sendmail start OPTIONAL: To run it automatically after booting: - rc-update add spamass-milter default rc-update add sendmail default -That's it. + +For Postfix >= 2.3.0 and < 2.4.0: +--------------------------------- +Add those lines to /etc/postfix/main.cf: +smtpd_milters = unix:/var/run/milter/spamass-milter.sock +milter_end_of_data_macros = b i j _ {daemon_name} {if_name} {if_addr} {mail_addr} +milter_default_action = accept + +Change in /etc/conf.d/spamass-milter the socket group owner to mail: +SOCKET_GROUP="mail" + +Change in /etc/conf.d/spamass-milter the options for spamass-milter to include "-m": +OPTIONS="${OPTIONS} -m" + +Restart associated services: + /etc/init.d/postfix stop + /etc/init.d/spamass-milter start + /etc/init.d/postfix start + +OPTIONAL: To run it automatically after booting: + rc-update add spamass-milter default + rc-update add postfix default + + +For Postfix >= 2.4.0: +--------------------- +Same settings as for Postfix >= 2.3.0 (see above) but you can now use the option "-m" +in /etc/conf.d/spamass-milter. diff --git a/mail-filter/spamass-milter/files/spamass-milter.conf3 b/mail-filter/spamass-milter/files/spamass-milter.conf3 new file mode 100644 index 000000000000..94d27a3642cd --- /dev/null +++ b/mail-filter/spamass-milter/files/spamass-milter.conf3 @@ -0,0 +1,30 @@ +# Copyright 1999-2006 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamass-milter/files/spamass-milter.conf3,v 1.1 2008/06/15 09:28:02 dertobi123 Exp $ + +DAEMON=/usr/sbin/spamass-milter +SOCKET=/var/run/milter/spamass-milter.sock +PIDFILE=/var/run/milter/spamass-milter.pid + +# User owning the socket +SOCKET_USER="milter" + +# Group owning the socket +# Note: Change this to mail if you run Postfix +SOCKET_GROUP="milter" + +# Permission for the socket +SOCKET_MODE="664" + +# spamass-milter options +OPTIONS="" + +# Example: Reject mails above score 20 +#OPTIONS="${OPTIONS} -r 20" + +# Example: Do not modify mail body +# NOTE: This needs to be enabled if you use Postfix >= 2.3.0 and < 2.4.0 +#OPTIONS="${OPTIONS} -m" + +# Example: Pass the remaining flags to spamc +#OPTIONS="${OPTIONS} -- --headers --username spamc" diff --git a/mail-filter/spamass-milter/files/spamass-milter.rc3 b/mail-filter/spamass-milter/files/spamass-milter.rc3 new file mode 100644 index 000000000000..20e5dd1af4cb --- /dev/null +++ b/mail-filter/spamass-milter/files/spamass-milter.rc3 @@ -0,0 +1,38 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamass-milter/files/spamass-milter.rc3,v 1.1 2008/06/15 09:28:02 dertobi123 Exp $ + +depend() { + need net spamd + use logger + before mta +} + +start() { + ebegin "Starting spamass-milter" + start-stop-daemon --start --quiet --pidfile ${PIDFILE} -c ${SOCKET_USER:-milter}:${SOCKET_GROUP:-milter} \ + --exec ${DAEMON} -- -P ${PIDFILE} -p ${SOCKET} -f ${OPTIONS} + eend $? "Failed to start ${DAEMON}" + for ((spamass_timeout=0 ; spamass_timeout <= 20 ; spamass_timeout++)) + do + if [ ! -S "${SOCKET}" -o ! -r "${SOCKET}" ] + then + sleep 1 + else + break + fi + done + chown ${SOCKET_USER:-milter}:${SOCKET_GROUP:-milter} ${SOCKET} 1>/dev/null 2>&1 + chmod ${SOCKET_MODE:-664} ${SOCKET} 1>/dev/null 2>&1 +} + +stop() { + ebegin "Stopping spamass-milter" + start-stop-daemon --stop --quiet --pidfile ${PIDFILE} && + { + sleep 5 + rm -f ${SOCKET} + } + eend $? "Failed to stop ${DAEMON}" +} diff --git a/mail-filter/spamass-milter/spamass-milter-0.3.1-r2.ebuild b/mail-filter/spamass-milter/spamass-milter-0.3.1-r2.ebuild new file mode 100644 index 000000000000..24df763365b1 --- /dev/null +++ b/mail-filter/spamass-milter/spamass-milter-0.3.1-r2.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamass-milter/spamass-milter-0.3.1-r2.ebuild,v 1.1 2008/06/15 09:28:02 dertobi123 Exp $ + +inherit eutils + +IUSE="" + +DESCRIPTION="A milter for SpamAssassin" +HOMEPAGE="http://savannah.nongnu.org/projects/spamass-milt/" +SRC_URI="http://savannah.nongnu.org/download/spamass-milt/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" + +DEPEND=">=sys-devel/autoconf-2.57 + >=sys-devel/automake-1.7.2" +RDEPEND="|| ( mail-filter/libmilter mail-mta/sendmail ) + >=mail-filter/spamassassin-3.1.0" + +pkg_setup() { + enewgroup milter + enewuser milter -1 -1 /var/milter milter +} + +src_install() { + make DESTDIR="${D}" install || die + + newinitd "${FILESDIR}"/spamass-milter.rc3 spamass-milter + newconfd "${FILESDIR}"/spamass-milter.conf3 spamass-milter + dodir /var/run/milter + keepdir /var/run/milter + fowners milter:milter /var/run/milter + dodir /var/milter + keepdir /var/milter + fowners milter:milter /var/milter + + dodoc AUTHORS NEWS README ChangeLog "${FILESDIR}/README.gentoo" +} + +pkg_postinst() { + elog + elog "Documentation is in /usr/share/doc/${P}" + elog "Check README.gentoo.gz there for some basic gentoo installation instructions" + elog +} |