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 | a4257ae4d191a6c1e7ee4bdbc2d930cc94a12d54 (patch) | |
tree | f43554346941bc9894598ed77650a6e5ca564d86 /mail-filter | |
parent | Bump edit-utils dependency (diff) | |
download | historical-a4257ae4d191a6c1e7ee4bdbc2d930cc94a12d54.tar.gz historical-a4257ae4d191a6c1e7ee4bdbc2d930cc94a12d54.tar.bz2 historical-a4257ae4d191a6c1e7ee4bdbc2d930cc94a12d54.zip |
Optionally use libmilter instead of sendmail, so that spamass-milter can also be used with other MTAs such as Postfix (#177338), fix quoting.
Package-Manager: portage-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/Manifest | 7 | ||||
-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 |
6 files changed, 164 insertions, 15 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/Manifest b/mail-filter/spamass-milter/Manifest index 02fd73f295e6..b5ebe70f6b3c 100644 --- a/mail-filter/spamass-milter/Manifest +++ b/mail-filter/spamass-milter/Manifest @@ -1,7 +1,10 @@ -AUX README.gentoo 826 RMD160 bc1d33a2a7e1efbb00819554392de7038e8d63f5 SHA1 cbbd1d6d2055f5436154593cfe2b2e0827b27261 SHA256 f34a3855281e90a3170d8cf38342d3ffe4edb1c2b8382d96f1ed61f1ebe7b83e +AUX README.gentoo 1680 RMD160 db0fa0f42f83626d9a62a6d3fdb9b69ff67b1967 SHA1 1241d8eb3be3d19cf2cecd572b58510a942ee652 SHA256 3ae980f0f8f6c82e2ae8a0677751275e0467e9c1f33b1a835a964a2ee3e80bbf AUX spamass-milter.conf2 445 RMD160 0cdfdb269142d732780d0cc028494d5a606ef8bd SHA1 dd177e36ec5672b1991ef11d852a6da636a3202d SHA256 a7f4f6c57bbfb76fab2c627e916696812e9a562f8c2b3657899de6448f40bd06 +AUX spamass-milter.conf3 903 RMD160 04d98b6b4cd9bf3b0966b596ae4ba710c1c6f90a SHA1 7f16ac4ec6a118b822517777000247381d0634d8 SHA256 f1969e8d1dcba108c379469a5e88e4286624c994bb8e22fd563d1f5cc4063617 AUX spamass-milter.rc2 702 RMD160 bd20e0bb09a96af2f2192b05bbfd6107d231baef SHA1 65e631aed7c495317602ab019acc562cb37361a4 SHA256 669242a2c1e65fd651e03fb2f4a537b816b08b9a88e1f4790d8f9b4928357f7a +AUX spamass-milter.rc3 1039 RMD160 8b7c049bc1e7509f2d3043705c27b47f0a38e167 SHA1 9cb52b238d44f0ea04cbf46a0d8f7ef7244fc349 SHA256 e8acb8f341d7f5d4cfd9b77da7ef75407c543020546fcf52556f3b07e0781665 DIST spamass-milter-0.3.1.tar.bz2 116591 RMD160 49946c80ac99e04190981cd6c8de12ef54f0619d SHA1 71f8f2d56baf47058789c61e76c5cffd4046da5a SHA256 d7423835af7bb9cdf97bba7f31c5bea197dc86a600133d354aa6083bf1bbd24c EBUILD spamass-milter-0.3.1-r1.ebuild 1277 RMD160 a2cce04f206be9d520eb888026ad51e3d3ddfa4c SHA1 9a9354529d6509ea80861c84cd7c8952c639abf4 SHA256 da4eaa77dc57329ddda0fabd39dad0ecd480bef041f7f4d6f7b52cae9e3adc1f -MISC ChangeLog 3088 RMD160 00a920e287aadafbc36f23f0a1010e5cd522d8ce SHA1 99d6ea7e758fec8de9c1757006bf5c831bf7b135 SHA256 72c9cc86d2999d3b04370832cca9d09c71738a5c72a9e3f26882b3cf62484a44 +EBUILD spamass-milter-0.3.1-r2.ebuild 1302 RMD160 9321311aa681388f3e72c252e242621d7ec50f94 SHA1 cf322a7933348cf558da1f44b0822b3326fd3485 SHA256 ab2d6f10b2652c395104439a52bfba8e8838f574473ebe7d922d200ca3beaa05 +MISC ChangeLog 3449 RMD160 6830878d88650ba924f61e9e035299a36fe311d8 SHA1 e7c7aebf23b890c258eef34c715f9b0e9fdfd424 SHA256 1c38781726ecbfb699d7bf6d064064ff3654760a5cb2349ba2fa13e31c7cf506 MISC metadata.xml 162 RMD160 fd38b82541901b3c6df18b630d79fe7883ae3f01 SHA1 e6aecefcc2137d6047cedfe447686775ab59cb48 SHA256 569031668e39895fb20829fb17a49a91a83e8f41b2195b0f04825c4340d2af6b 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 +} |