diff options
Diffstat (limited to 'mail-filter/spamass-milter/files')
4 files changed, 0 insertions, 227 deletions
diff --git a/mail-filter/spamass-milter/files/README.gentoo b/mail-filter/spamass-milter/files/README.gentoo deleted file mode 100644 index 49035c0ac5a5..000000000000 --- a/mail-filter/spamass-milter/files/README.gentoo +++ /dev/null @@ -1,52 +0,0 @@ -Simple install instructions by raker @ g.o -updates by gustavoz -updates by SteveB ---------------------------------------------------------------- - -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 - - -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-auth_users.patch b/mail-filter/spamass-milter/files/spamass-milter-auth_users.patch deleted file mode 100644 index 8bfc24e4306f..000000000000 --- a/mail-filter/spamass-milter/files/spamass-milter-auth_users.patch +++ /dev/null @@ -1,92 +0,0 @@ -Based on the debian patch: -http://patch-tracker.debian.org/patch/series/view/spamass-milter/0.3.1-10/10_dont_handle_authenticated_users.diff - ---- spamass-milter.cpp 2011-06-08 11:56:33.000000000 +0000 -+++ spamass-milter.cpp 2011-06-08 12:04:41.000000000 +0000 -@@ -170,6 +170,7 @@ - bool flag_full_email = false; /* pass full email address to spamc */ - bool flag_expand = false; /* alias/virtusertable expansion */ - bool warnedmacro = false; /* have we logged that we couldn't fetch a macro? */ -+bool ignore_authenticated_senders = false; - - #if defined(__FreeBSD__) /* popen bug - see PR bin/50770 */ - static pthread_mutex_t popen_mutex = PTHREAD_MUTEX_INITIALIZER; -@@ -181,7 +182,7 @@ - main(int argc, char* argv[]) - { - int c, err = 0; -- const char *args = "fd:mMp:P:r:u:D:i:b:B:e:x"; -+ const char *args = "fd:mMp:P:r:u:D:i:Ib:B:e:x"; - char *sock = NULL; - bool dofork = false; - char *pidfilename = NULL; -@@ -213,6 +214,10 @@ - debug(D_MISC, "Parsing ignore list"); - parse_networklist(optarg, &ignorenets); - break; -+ case 'I': -+ debug(D_MISC, "Ignore authenticated senders"); -+ ignore_authenticated_senders = true; -+ break; - case 'm': - dontmodifyspam = true; - smfilter.xxfi_flags &= ~SMFIF_CHGBODY; -@@ -280,7 +285,7 @@ - cout << PACKAGE_NAME << " - Version " << PACKAGE_VERSION << endl; - cout << "SpamAssassin Sendmail Milter Plugin" << endl; - cout << "Usage: spamass-milter -p socket [-b|-B bucket] [-d xx[,yy...]] [-D host]" << endl; -- cout << " [-e defaultdomain] [-f] [-i networks] [-m] [-M]" << endl; -+ cout << " [-e defaultdomain] [-f] [-i networks] [-I] [-m] [-M]" << endl; - cout << " [-P pidfile] [-r nn] [-u defaultuser] [-x]" << endl; - cout << " [-- spamc args ]" << endl; - cout << " -p socket: path to create socket" << endl; -@@ -294,6 +299,7 @@ - cout << " -f: fork into background" << endl; - cout << " -i: skip (ignore) checks from these IPs or netblocks" << endl; - cout << " example: -i 192.168.12.5,10.0.0.0/8,172.16.0.0/255.255.0.0" << endl; -+ cout << " -I: skip (ignore) checks if sender is authenticated" << endl; - cout << " -m: don't modify body, Content-type: or Subject:" << endl; - cout << " -M: don't modify the message at all" << endl; - cout << " -P pidfile: Put processid in pidfile" << endl; -@@ -783,6 +789,22 @@ - } - /* debug(D_ALWAYS, "ZZZ got private context %p", sctx); */ - -+ if (ignore_authenticated_senders) -+ { -+ char *auth_authen; -+ -+ auth_authen = smfi_getsymval(ctx, "{auth_authen}"); -+ debug(D_MISC, "auth_authen=%s", auth_authen ?: "<unauthenticated>"); -+ -+ if (auth_authen) -+ { -+ debug(D_MISC, "sender authenticated (%s) - accepting message", -+ auth_authen); -+ debug(D_FUNC, "mlfi_envfrom: exit ignore"); -+ return SMFIS_ACCEPT; -+ } -+ } -+ - debug(D_FUNC, "mlfi_envfrom: enter"); - try { - // launch new SpamAssassin ---- spamass-milter.1.in 2011-06-08 12:05:35.000000000 +0000 -+++ spamass-milter.1.in 2011-06-08 12:06:57.000000000 +0000 -@@ -14,6 +14,7 @@ - .Op Fl e Ar defaultdomain - .Op Fl f - .Op Fl i Ar networks -+.Op Fl I - .Op Fl m - .Op Fl M - .Op Fl P Ar pidfile -@@ -119,6 +120,8 @@ - flags will append to the list. - For example, if you list all your internal networks, no outgoing emails - will be filtered. -+.It Fl I -+Ignores messages if the sender has authenticated via SMTP AUTH. - .It Fl m - Disables modification of the - .Ql Subject: diff --git a/mail-filter/spamass-milter/files/spamass-milter.conf3 b/mail-filter/spamass-milter/files/spamass-milter.conf3 deleted file mode 100644 index 6cdbc1e4dd73..000000000000 --- a/mail-filter/spamass-milter/files/spamass-milter.conf3 +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License, v2 or later - -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.rc4 b/mail-filter/spamass-milter/files/spamass-milter.rc4 deleted file mode 100644 index 9688501bcd93..000000000000 --- a/mail-filter/spamass-milter/files/spamass-milter.rc4 +++ /dev/null @@ -1,54 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -depend() { - need net spamd - use logger - before mta -} - -piddir=${PIDFILE%/*} -socketdir=${SOCKET%/*} - -checkconfig() { - if [ ! -d ${piddir:=/var/run/milter} ]; then - checkpath -q -d -o milter:milter -m 0755 ${piddir} || return 1 - fi - if [ ! -d ${socketdir:=/var/run/milter} ]; then - checkpath -q -d -o ${SOCKET_USER:-milter}:${SOCKET_GROUP:-milter} \ - -m 0755 ${socketdir} || return 1 - fi -} - -start() { - checkconfig || return 1 - ebegin "Starting spamass-milter" - start-stop-daemon --start --quiet --pidfile ${PIDFILE} -u ${SOCKET_USER:-milter}:${SOCKET_GROUP:-milter} \ - --exec ${DAEMON} -- -P ${PIDFILE} -p ${SOCKET} -f ${OPTIONS} - eend $? "Failed to start ${DAEMON}" - spamass_timeout=0 - while [ $spamass_timeout -le 20 ] - do - if [ ! -S "${SOCKET}" -o ! -r "${SOCKET}" ] - then - sleep 1 - spamass_timeout=$(( $spamass_timeout+1 )) - else - break - fi - done - echo $spamass_timeout - 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}" -} |