From: Marcin Krol Date: Fri, 25 Jan 2019 23:51:34 +0000 (+0100) Subject: - migrated configuration to /etc/spamassassin X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=c1afbf53c3b26be67d5774306eda0be93ce514c1;p=packages%2Fspamassassin.git - migrated configuration to /etc/spamassassin --- diff --git a/config-dir.patch b/config-dir.patch new file mode 100644 index 0000000..fa70eb2 --- /dev/null +++ b/config-dir.patch @@ -0,0 +1,510 @@ +diff -ur Mail-SpamAssassin-3.4.2.orig/INSTALL Mail-SpamAssassin-3.4.2/INSTALL +--- Mail-SpamAssassin-3.4.2.orig/INSTALL 2018-09-14 03:27:51.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/INSTALL 2019-01-26 00:07:45.957000000 +0100 +@@ -462,7 +462,7 @@ + perl interpreter. Version 2.83 or later fixes this. + + If you do not plan to use this plugin, be sure to comment out +- its loadplugin line in "/etc/mail/spamassassin/v310.pre". ++ its loadplugin line in "/etc/spamassassin/v310.pre". + + + What Next? +diff -ur Mail-SpamAssassin-3.4.2.orig/ldap/README Mail-SpamAssassin-3.4.2/ldap/README +--- Mail-SpamAssassin-3.4.2.orig/ldap/README 2018-09-14 03:27:55.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/ldap/README 2019-01-26 00:07:45.958000000 +0100 +@@ -13,7 +13,7 @@ + database or LDAP server. + + SpamAssassin will check the global configuration file (ie. any file matching +-/etc/mail/spamassassin/*.cf) for the following settings: ++/etc/spamassassin/*.cf) for the following settings: + + user_scores_dsn ldap://host:port/dc=basedn,dc=de?attr?scope?uid=__USERNAME__ + user_scores_ldap_username bind dn +diff -ur Mail-SpamAssassin-3.4.2.orig/lib/Mail/SpamAssassin/Conf.pm Mail-SpamAssassin-3.4.2/lib/Mail/SpamAssassin/Conf.pm +--- Mail-SpamAssassin-3.4.2.orig/lib/Mail/SpamAssassin/Conf.pm 2018-09-14 03:27:51.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/lib/Mail/SpamAssassin/Conf.pm 2019-01-26 00:07:45.958000000 +0100 +@@ -40,7 +40,7 @@ + =head1 DESCRIPTION + + SpamAssassin is configured using traditional UNIX-style configuration files, +-loaded from the C and C ++loaded from the C and C + directories. + + The following web page lists the most important configuration settings +@@ -2673,7 +2673,7 @@ + + These settings differ from the ones above, in that they are considered + 'privileged'. Only users running C from their procmailrc's or +-forward files, or sysadmins editing a file in C, can ++forward files, or sysadmins editing a file in C, can + use them. C users cannot use them in their C files, for + security and efficiency reasons, unless C is enabled (and + then, they may only add rules from below). +diff -ur Mail-SpamAssassin-3.4.2.orig/lib/Mail/SpamAssassin/Plugin/Phishing.pm Mail-SpamAssassin-3.4.2/lib/Mail/SpamAssassin/Plugin/Phishing.pm +--- Mail-SpamAssassin-3.4.2.orig/lib/Mail/SpamAssassin/Plugin/Phishing.pm 2018-09-14 03:27:51.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/lib/Mail/SpamAssassin/Plugin/Phishing.pm 2019-01-26 00:08:01.418000000 +0100 +@@ -29,8 +29,8 @@ + loadplugin Mail::SpamAssassin::Plugin::Phishing + + ifplugin Mail::SpamAssassin::Plugin::Phishing +- phishing_openphish_feed /etc/mail/spamassassin/openphish-feed.txt +- phishing_phishtank_feed /etc/mail/spamassassin/phishtank-feed.csv ++ phishing_openphish_feed /etc/spamassassin/openphish-feed.txt ++ phishing_phishtank_feed /etc/spamassassin/phishtank-feed.csv + body URI_PHISHING eval:check_phishing() + describe URI_PHISHING Url match phishing in feed + endif +diff -ur Mail-SpamAssassin-3.4.2.orig/lib/Mail/SpamAssassin/Plugin/Test.pm Mail-SpamAssassin-3.4.2/lib/Mail/SpamAssassin/Plugin/Test.pm +--- Mail-SpamAssassin-3.4.2.orig/lib/Mail/SpamAssassin/Plugin/Test.pm 2018-09-14 03:27:51.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/lib/Mail/SpamAssassin/Plugin/Test.pm 2019-01-26 00:07:45.958000000 +0100 +@@ -27,7 +27,7 @@ + =head1 DESCRIPTION + + To try this plugin, write the above two lines in the synopsis to +-C. ++C. + + =cut + +diff -ur Mail-SpamAssassin-3.4.2.orig/lib/spamassassin-run.pod Mail-SpamAssassin-3.4.2/lib/spamassassin-run.pod +--- Mail-SpamAssassin-3.4.2.orig/lib/spamassassin-run.pod 2018-09-14 03:27:51.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/lib/spamassassin-run.pod 2019-01-26 00:07:45.958000000 +0100 +@@ -41,7 +41,7 @@ + -p prefs, --prefspath=file, --prefs-file=file + Set user preferences file + --siteconfigpath=path Path for site configs +- (def: /etc/mail/spamassassin) ++ (def: /etc/spamassassin) + --cf='config line' Additional line of configuration + -x, --nocreate-prefs Don't create user preferences file + -e, --exit-code Exit with a non-zero exit code if the +@@ -240,7 +240,7 @@ + =item B<--siteconfigpath>=I + + Use the specified path for locating site-specific configuration files. Ignore +-the default directories (usually C or similar). ++the default directories (usually C or similar). + + =item B<--cf='config line'> + +diff -ur Mail-SpamAssassin-3.4.2.orig/README Mail-SpamAssassin-3.4.2/README +--- Mail-SpamAssassin-3.4.2.orig/README 2018-09-14 03:27:52.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/README 2019-01-26 00:07:45.957000000 +0100 +@@ -114,13 +114,13 @@ + not modify these, as they are overwritten when you run + "sa-update". + +- - /etc/mail/spamassassin/*.cf: ++ - /etc/spamassassin/*.cf: + + Site config files, for system admins to create, modify, and + add local rules and scores to. Modifications here will be + appended to the config loaded from the above directory. + +- - /etc/mail/spamassassin/*.pre: ++ - /etc/spamassassin/*.pre: + + Plugin control files, installed from the distribution. These are + used to control what plugins are loaded. Modifications here will +@@ -129,7 +129,7 @@ + + You want to modify these files if you want to load additional + plugins, or inhibit loading a plugin that is enabled by default. +- If the files exist in /etc/mail/spamassassin, they will not ++ If the files exist in /etc/spamassassin, they will not + be overwritten during future installs. + + - /usr/share/spamassassin/user_prefs.template: +@@ -137,14 +137,14 @@ + Distributed default user preferences. Do not modify this, as it is + overwritten when you upgrade. + +- - /etc/mail/spamassassin/user_prefs.template: ++ - /etc/spamassassin/user_prefs.template: + + Default user preferences, for system admins to create, modify, and + set defaults for users' preferences files. Takes precedence over + the above prefs file, if it exists. + + Do not put system-wide settings in here; put them in a file in the +- "/etc/mail/spamassassin" directory ending in ".cf". This file is ++ "/etc/spamassassin" directory ending in ".cf". This file is + just a template, which will be copied to a user's home directory + for them to change. + +diff -ur Mail-SpamAssassin-3.4.2.orig/rules/init.pre Mail-SpamAssassin-3.4.2/rules/init.pre +--- Mail-SpamAssassin-3.4.2.orig/rules/init.pre 2017-03-18 14:05:04.000000000 +0100 ++++ Mail-SpamAssassin-3.4.2/rules/init.pre 2019-01-26 00:09:43.345000000 +0100 +@@ -8,7 +8,7 @@ + # already have a file in place called "init.pre". + # + # There are now multiple files read to enable plugins in the +-# /etc/mail/spamassassin directory; previously only one, "init.pre" was ++# /etc/spamassassin directory; previously only one, "init.pre" was + # read. Now both "init.pre", "v310.pre", and any other files ending in + # ".pre" will be read. As future releases are made, new plugins will be + # added to new files, named according to the release they're added in. +diff -ur Mail-SpamAssassin-3.4.2.orig/rules/user_prefs.template Mail-SpamAssassin-3.4.2/rules/user_prefs.template +--- Mail-SpamAssassin-3.4.2.orig/rules/user_prefs.template 2017-03-18 14:05:04.000000000 +0100 ++++ Mail-SpamAssassin-3.4.2/rules/user_prefs.template 2019-01-26 00:07:45.958000000 +0100 +@@ -5,7 +5,7 @@ + #* directory. At runtime, if a user has no preferences in their home directory + #* already, it will be copied for them, allowing them to perform personalised + #* customisation. If you want to make changes to the site-wide defaults, +-#* create a file in /etc/spamassassin or /etc/mail/spamassassin instead. ++#* create a file in /etc/spamassassin instead. + ########################################################################### + + # How many points before a mail is considered spam. +diff -ur Mail-SpamAssassin-3.4.2.orig/rules/v310.pre Mail-SpamAssassin-3.4.2/rules/v310.pre +--- Mail-SpamAssassin-3.4.2.orig/rules/v310.pre 2017-03-18 14:05:04.000000000 +0100 ++++ Mail-SpamAssassin-3.4.2/rules/v310.pre 2019-01-26 00:09:51.945000000 +0100 +@@ -10,7 +10,7 @@ + # if you so wish. + # + # There are now multiple files read to enable plugins in the +-# /etc/mail/spamassassin directory; previously only one, "init.pre" was ++# /etc/spamassassin directory; previously only one, "init.pre" was + # read. Now both "init.pre", "v310.pre", and any other files ending in + # ".pre" will be read. As future releases are made, new plugins will be + # added to new files, named according to the release they're added in. +diff -ur Mail-SpamAssassin-3.4.2.orig/rules/v312.pre Mail-SpamAssassin-3.4.2/rules/v312.pre +--- Mail-SpamAssassin-3.4.2.orig/rules/v312.pre 2017-03-18 14:05:04.000000000 +0100 ++++ Mail-SpamAssassin-3.4.2/rules/v312.pre 2019-01-26 00:09:47.217000000 +0100 +@@ -10,7 +10,7 @@ + # if you so wish. + # + # There are now multiple files read to enable plugins in the +-# /etc/mail/spamassassin directory; previously only one, "init.pre" was ++# /etc/spamassassin directory; previously only one, "init.pre" was + # read. Now both "init.pre", "v310.pre", and any other files ending in + # ".pre" will be read. As future releases are made, new plugins will be + # added to new files, named according to the release they're added in. +diff -ur Mail-SpamAssassin-3.4.2.orig/rules/v320.pre Mail-SpamAssassin-3.4.2/rules/v320.pre +--- Mail-SpamAssassin-3.4.2.orig/rules/v320.pre 2017-03-18 14:05:04.000000000 +0100 ++++ Mail-SpamAssassin-3.4.2/rules/v320.pre 2019-01-26 00:09:36.398000000 +0100 +@@ -10,7 +10,7 @@ + # if you so wish. + # + # There are now multiple files read to enable plugins in the +-# /etc/mail/spamassassin directory; previously only one, "init.pre" was ++# /etc/spamassassin directory; previously only one, "init.pre" was + # read. Now both "init.pre", "v310.pre", and any other files ending in + # ".pre" will be read. As future releases are made, new plugins will be + # added to new files, named according to the release they're added in. +diff -ur Mail-SpamAssassin-3.4.2.orig/rules/v330.pre Mail-SpamAssassin-3.4.2/rules/v330.pre +--- Mail-SpamAssassin-3.4.2.orig/rules/v330.pre 2017-03-18 14:05:04.000000000 +0100 ++++ Mail-SpamAssassin-3.4.2/rules/v330.pre 2019-01-26 00:09:49.197000000 +0100 +@@ -10,7 +10,7 @@ + # if you so wish. + # + # There are now multiple files read to enable plugins in the +-# /etc/mail/spamassassin directory; previously only one, "init.pre" was ++# /etc/spamassassin directory; previously only one, "init.pre" was + # read. Now both "init.pre", "v310.pre", and any other files ending in + # ".pre" will be read. As future releases are made, new plugins will be + # added to new files, named according to the release they're added in. +diff -ur Mail-SpamAssassin-3.4.2.orig/rules/v340.pre Mail-SpamAssassin-3.4.2/rules/v340.pre +--- Mail-SpamAssassin-3.4.2.orig/rules/v340.pre 2017-03-18 14:05:04.000000000 +0100 ++++ Mail-SpamAssassin-3.4.2/rules/v340.pre 2019-01-26 00:09:45.297000000 +0100 +@@ -10,7 +10,7 @@ + # if you so wish. + # + # There are now multiple files read to enable plugins in the +-# /etc/mail/spamassassin directory; previously only one, "init.pre" was ++# /etc/spamassassin directory; previously only one, "init.pre" was + # read. Now both "init.pre", "v310.pre", and any other files ending in + # ".pre" will be read. As future releases are made, new plugins will be + # added to new files, named according to the release they're added in. +diff -ur Mail-SpamAssassin-3.4.2.orig/rules/v341.pre Mail-SpamAssassin-3.4.2/rules/v341.pre +--- Mail-SpamAssassin-3.4.2.orig/rules/v341.pre 2017-03-18 14:05:04.000000000 +0100 ++++ Mail-SpamAssassin-3.4.2/rules/v341.pre 2019-01-26 00:09:34.297000000 +0100 +@@ -10,7 +10,7 @@ + # if you so wish. + # + # There are now multiple files read to enable plugins in the +-# /etc/mail/spamassassin directory; previously only one, "init.pre" was ++# /etc/spamassassin directory; previously only one, "init.pre" was + # read. Now both "init.pre", "v310.pre", and any other files ending in + # ".pre" will be read. As future releases are made, new plugins will be + # added to new files, named according to the release they're added in. +diff -ur Mail-SpamAssassin-3.4.2.orig/rules/v342.pre Mail-SpamAssassin-3.4.2/rules/v342.pre +--- Mail-SpamAssassin-3.4.2.orig/rules/v342.pre 2018-09-01 05:55:41.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/rules/v342.pre 2019-01-26 00:09:38.537000000 +0100 +@@ -10,7 +10,7 @@ + # if you so wish. + # + # There are now multiple files read to enable plugins in the +-# /etc/mail/spamassassin directory; previously only one, "init.pre" was ++# /etc/spamassassin directory; previously only one, "init.pre" was + # read. Now both "init.pre", "v310.pre", and any other files ending in + # ".pre" will be read. As future releases are made, new plugins will be + # added to new files, named according to the release they're added in. +diff -ur Mail-SpamAssassin-3.4.2.orig/sa-compile.raw Mail-SpamAssassin-3.4.2/sa-compile.raw +--- Mail-SpamAssassin-3.4.2.orig/sa-compile.raw 2018-09-14 03:27:51.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/sa-compile.raw 2019-01-26 00:07:45.959000000 +0100 +@@ -678,7 +678,7 @@ + -p prefs, --prefspath=file, --prefs-file=file + Set user preferences file + --siteconfigpath=path Path for site configs +- (default: @@PREFIX@@/etc/mail/spamassassin) ++ (default: @@PREFIX@@/etc/spamassassin) + --updatedir=path Directory to place updates + (default: @@LOCAL_STATE_DIR@@/compiled//@@VERSION@@) + --cf='config line' Additional line of configuration +@@ -743,7 +743,7 @@ + =item B<--siteconfigpath>=I + + Use the specified path for locating site-specific configuration files. Ignore +-the default directories (usually C or similar). ++the default directories (usually C or similar). + + =item B<--updatedir> + +diff -ur Mail-SpamAssassin-3.4.2.orig/sa-learn.raw Mail-SpamAssassin-3.4.2/sa-learn.raw +--- Mail-SpamAssassin-3.4.2.orig/sa-learn.raw 2018-09-14 03:27:56.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/sa-learn.raw 2019-01-26 00:07:45.959000000 +0100 +@@ -655,7 +655,7 @@ + -p prefs, --prefspath=file, --prefs-file=file + Set user preferences file + --siteconfigpath=path Path for site configs +- (default: @@PREFIX@@/etc/mail/spamassassin) ++ (default: @@PREFIX@@/etc/spamassassin) + --cf='config line' Additional line of configuration + -D, --debug [area=n,...] Print debugging messages + -V, --version Print version +@@ -815,7 +815,7 @@ + =item B<--siteconfigpath>=I + + Use the specified path for locating site-specific configuration files. Ignore +-the default directories (usually C or similar). ++the default directories (usually C or similar). + + =item B<--cf='config line'> + +diff -ur Mail-SpamAssassin-3.4.2.orig/spamc/spamc.pod Mail-SpamAssassin-3.4.2/spamc/spamc.pod +--- Mail-SpamAssassin-3.4.2.orig/spamc/spamc.pod 2018-09-14 03:27:52.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/spamc/spamc.pod 2019-01-26 00:07:45.959000000 +0100 +@@ -288,8 +288,8 @@ + + If the B<-F> switch is specified, that file will be used. Otherwise, + C will attempt to load spamc.conf in C (default: +-/etc/mail/spamassassin). If that file doesn't exist, and the B<-F> +-switch is not specified, no configuration file will be read. ++/etc/spamassassin). If that file doesn't exist, and the B<-F> switch ++is not specified, no configuration file will be read. + + Example: + +diff -ur Mail-SpamAssassin-3.4.2.orig/spamd/README Mail-SpamAssassin-3.4.2/spamd/README +--- Mail-SpamAssassin-3.4.2.orig/spamd/README 2018-09-14 03:27:54.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/spamd/README 2019-01-26 00:07:45.959000000 +0100 +@@ -105,7 +105,7 @@ + If you plan to use Bayesian classification (the BAYES rules) with spamd, + you will need to either + +- 1. modify /etc/mail/spamassassin/local.cf to use a shared database of ++ 1. modify /etc/spamassassin/local.cf to use a shared database of + tokens, by setting the 'bayes_path' setting to a path all users can read + and write to. You will also need to set the 'bayes_file_mode' setting + to 0666 so that created files are shared, too. +diff -ur Mail-SpamAssassin-3.4.2.orig/spamd/README.vpopmail Mail-SpamAssassin-3.4.2/spamd/README.vpopmail +--- Mail-SpamAssassin-3.4.2.orig/spamd/README.vpopmail 2018-09-14 03:27:54.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/spamd/README.vpopmail 2019-01-26 00:07:45.959000000 +0100 +@@ -43,7 +43,7 @@ + /home/vpopmail/domains/somedomain.net/4/userid/.spamassassin/user_prefs + + 5. One gotcha - cannot have personal AWL dbs - only a sitewide AWL will work. +-This is specified in your /etc/mail/spamassassin/local.cf file. Perhaps a ++This is specified in your /etc/spamassassin/local.cf file. Perhaps a + future enhancement would be to add the capability to have personal AWL db. + + 6. Of course vpopmail must have the seekable patch installed (see +diff -ur Mail-SpamAssassin-3.4.2.orig/spamd/spamd.raw Mail-SpamAssassin-3.4.2/spamd/spamd.raw +--- Mail-SpamAssassin-3.4.2.orig/spamd/spamd.raw 2018-09-14 03:27:54.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/spamd/spamd.raw 2019-01-26 00:07:45.959000000 +0100 +@@ -3352,7 +3352,7 @@ + =item B<--siteconfigpath>=I + + Use the specified path for locating site-specific configuration files. Ignore +-the default directories (usually C or similar). ++the default directories (usually C or similar). + + =item B<--cf='config line'> + +diff -ur Mail-SpamAssassin-3.4.2.orig/spamd-apache2/lib/Mail/SpamAssassin/Spamd/Apache2/Config.pm Mail-SpamAssassin-3.4.2/spamd-apache2/lib/Mail/SpamAssassin/Spamd/Apache2/Config.pm +--- Mail-SpamAssassin-3.4.2.orig/spamd-apache2/lib/Mail/SpamAssassin/Spamd/Apache2/Config.pm 2018-09-14 03:27:51.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/spamd-apache2/lib/Mail/SpamAssassin/Spamd/Apache2/Config.pm 2019-01-26 00:11:08.257000000 +0100 +@@ -519,7 +519,7 @@ + SAtimeout 25 + SAdebug info + SANew DEF_RULES_DIR "/usr/share/spamassassin" +- SANew LOCAL_RULES_DIR "/etc/mail/spamassassin" ++ SANew LOCAL_RULES_DIR "/etc/spamassassin" + SANew LOCAL_STATE_DIR "/var/lib" + SAUsers local sql + +@@ -533,7 +533,7 @@ + SAtimeout 25 + SAdebug info + SANew DEF_RULES_DIR "/usr/share/spamassassin" +- SANew LOCAL_RULES_DIR "/etc/mail/spamassassin" ++ SANew LOCAL_RULES_DIR "/etc/spamassassin" + SANew LOCAL_STATE_DIR "/var/lib" + + LoadModule ident_module /usr/lib/apache/mod_ident.so +diff -ur Mail-SpamAssassin-3.4.2.orig/spamd-apache2/lib/Mail/SpamAssassin/Spamd/Config.pm Mail-SpamAssassin-3.4.2/spamd-apache2/lib/Mail/SpamAssassin/Spamd/Config.pm +--- Mail-SpamAssassin-3.4.2.orig/spamd-apache2/lib/Mail/SpamAssassin/Spamd/Config.pm 2018-09-14 03:27:51.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/spamd-apache2/lib/Mail/SpamAssassin/Spamd/Config.pm 2019-01-26 00:11:02.357000000 +0100 +@@ -67,7 +67,7 @@ + # substituted at 'make' time + PREFIX => '/usr', + DEF_RULES_DIR => '/usr/share/spamassassin', +- LOCAL_RULES_DIR => '/etc/mail/spamassassin', ++ LOCAL_RULES_DIR => '/etc/spamassassin', + LOCAL_STATE_DIR => '/var/lib', + ); + +diff -ur Mail-SpamAssassin-3.4.2.orig/sql/README Mail-SpamAssassin-3.4.2/sql/README +--- Mail-SpamAssassin-3.4.2.orig/sql/README 2018-09-14 03:27:52.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/sql/README 2019-01-26 00:07:45.959000000 +0100 +@@ -18,7 +18,7 @@ + SQL preferences. + + SpamAssassin will check the global configuration file (ie. any file matching +-/etc/mail/spamassassin/*.cf) for the following settings: ++/etc/spamassassin/*.cf) for the following settings: + + user_scores_dsn DBI:driver:connection + user_scores_sql_username dbusername +diff -ur Mail-SpamAssassin-3.4.2.orig/sql/README.awl Mail-SpamAssassin-3.4.2/sql/README.awl +--- Mail-SpamAssassin-3.4.2.orig/sql/README.awl 2018-09-14 03:27:52.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/sql/README.awl 2019-01-26 00:07:45.960000000 +0100 +@@ -15,7 +15,7 @@ + auto_whitelist_factory Mail::SpamAssassin::SQLBasedAddrList + + SpamAssassin will check the global configuration file (ie. any file +-matching /etc/mail/spamassassin/*.cf) for the following settings: ++matching /etc/spamassassin/*.cf) for the following settings: + + user_awl_dsn DBI:driver:database:hostname[:port] + user_awl_sql_username dbusername +diff -ur Mail-SpamAssassin-3.4.2.orig/sql/README.txrep Mail-SpamAssassin-3.4.2/sql/README.txrep +--- Mail-SpamAssassin-3.4.2.orig/sql/README.txrep 2018-09-14 03:27:52.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/sql/README.txrep 2019-01-26 00:10:58.257000000 +0100 +@@ -16,7 +16,7 @@ + txrep_factory Mail::SpamAssassin::SQLBasedAddrList + + SpamAssassin will check the global configuration file (ie. any file +-matching /etc/mail/spamassassin/*.cf) for the following settings: ++matching /etc/spamassassin/*.cf) for the following settings: + + user_awl_dsn DBI:driver:database:hostname[:port] + user_awl_sql_username dbusername +diff -ur Mail-SpamAssassin-3.4.2.orig/t/data/taintcheckplugin.pm Mail-SpamAssassin-3.4.2/t/data/taintcheckplugin.pm +--- Mail-SpamAssassin-3.4.2.orig/t/data/taintcheckplugin.pm 2018-09-14 03:27:52.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/t/data/taintcheckplugin.pm 2019-01-26 00:10:49.817000000 +0100 +@@ -1,6 +1,6 @@ + =head1 taintcheckplugin.pm + +-To try this out, write these lines to /etc/mail/spamassassin/plugintest.cf: ++To try this out, write these lines to /etc/spamassassin/plugintest.cf: + + loadplugin myTestPlugin + header MY_TEST_PLUGIN eval:check_test_plugin() +diff -ur Mail-SpamAssassin-3.4.2.orig/t/data/testplugin2.pm Mail-SpamAssassin-3.4.2/t/data/testplugin2.pm +--- Mail-SpamAssassin-3.4.2.orig/t/data/testplugin2.pm 2018-09-14 03:27:52.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/t/data/testplugin2.pm 2019-01-26 00:10:52.297000000 +0100 +@@ -1,6 +1,6 @@ + =head1 testplugin2.pm + +-To try this out, write these lines to /etc/mail/spamassassin/plugintest.cf: ++To try this out, write these lines to /etc/spamassassin/plugintest.cf: + + loadplugin myTestPlugin + header MY_TEST_PLUGIN eval:check_test_plugin() +diff -ur Mail-SpamAssassin-3.4.2.orig/t/data/testplugin.pm Mail-SpamAssassin-3.4.2/t/data/testplugin.pm +--- Mail-SpamAssassin-3.4.2.orig/t/data/testplugin.pm 2018-09-14 03:27:52.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/t/data/testplugin.pm 2019-01-26 00:07:45.960000000 +0100 +@@ -1,6 +1,6 @@ + =head1 testplugin.pm + +-To try this out, write these lines to /etc/mail/spamassassin/plugintest.cf: ++To try this out, write these lines to /etc/spamassassin/plugintest.cf: + + loadplugin myTestPlugin + header MY_TEST_PLUGIN eval:check_test_plugin() +diff -ur Mail-SpamAssassin-3.4.2.orig/t/sa_compile.t Mail-SpamAssassin-3.4.2/t/sa_compile.t +--- Mail-SpamAssassin-3.4.2.orig/t/sa_compile.t 2018-09-14 03:27:53.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/t/sa_compile.t 2019-01-26 00:10:40.537000000 +0100 +@@ -46,7 +46,7 @@ + system_or_die "cd $builddir && mv Mail-SpamAssassin-* x"; + + &new_instdir("basic"); +-&run_makefile_pl ("PREFIX=$instdir SYSCONFDIR=$instdir/etc DATADIR=$instdir/share/spamassassin LOCALSTATEDIR=$instdir/var/spamassassin CONFDIR=$instdir/etc/mail/spamassassin"); ++&run_makefile_pl ("PREFIX=$instdir SYSCONFDIR=$instdir/etc DATADIR=$instdir/share/spamassassin LOCALSTATEDIR=$instdir/var/spamassassin CONFDIR=$instdir/etc/spamassassin"); + + # we now have an "installed" version we can run sa-compile with. Ensure + # sarun() will use it appropriately +@@ -147,7 +147,7 @@ + + #Create the dir for the pre file + +- $file = "$instdir/etc/mail/spamassassin/v330.pre"; ++ $file = "$instdir/etc/spamassassin/v330.pre"; + $dir = dirname($file); + mkpath($dir); + +diff -ur Mail-SpamAssassin-3.4.2.orig/UPGRADE Mail-SpamAssassin-3.4.2/UPGRADE +--- Mail-SpamAssassin-3.4.2.orig/UPGRADE 2018-09-14 03:27:56.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/UPGRADE 2019-01-26 00:07:45.957000000 +0100 +@@ -253,7 +253,7 @@ + perldoc Mail::SpamAssassin::Plugin::* (ie AWL, DCC, etc) + + - There are now multiple files read to enable plugins in the +- /etc/mail/spamassassin directory; previously only one, "init.pre" was ++ /etc/spamassassin directory; previously only one, "init.pre" was + read. Now both "init.pre", "v310.pre", and any other files ending + in ".pre" will be read. As future releases are made, new plugins + will be added to new files named according to the release they're +@@ -411,7 +411,7 @@ + - If you are using a UNIX machine with all database files on local disks, + and no sharing of those databases across NFS filesystems, you can use a + more efficient, but non-NFS-safe, locking mechanism. Do this by adding +- the line "lock_method flock" to the /etc/mail/spamassassin/local.cf ++ the line "lock_method flock" to the /etc/spamassassin/local.cf + file. This is strongly recommended if you're not using NFS, as it is + much faster than the NFS-safe locker. + +diff -ur Mail-SpamAssassin-3.4.2.orig/USAGE Mail-SpamAssassin-3.4.2/USAGE +--- Mail-SpamAssassin-3.4.2.orig/USAGE 2018-09-14 03:27:55.000000000 +0200 ++++ Mail-SpamAssassin-3.4.2/USAGE 2019-01-26 00:07:45.957000000 +0100 +@@ -117,7 +117,7 @@ + CPU-intensive task before they can send mail to you, so we give that + some bonus points. However, it requires that you list what addresses + you expect to receive mail for, by adding 'hashcash_accept' lines to +- your ~/.spamassassin/user_prefs or /etc/mail/spamassassin/local.cf ++ your ~/.spamassassin/user_prefs or /etc/spamassassin/local.cf + files. See the Mail::SpamAssassin::Plugin::Hashcash manual page for + details on how to specify these. + +@@ -129,14 +129,14 @@ + + + - You can create your own system-wide rules files in +- /etc/mail/spamassassin; their filenames should end in ".cf". Multiple ++ /etc/spamassassin; their filenames should end in ".cf". Multiple + files will be read, and SpamAssassin will not overwrite these files + when installing a new version. + + + - You should not modify the files in /usr/share/spamassassin; these + will be overwritten when you upgrade. Any changes you make in +- files in the /etc/mail/spamassassin directory, however, will ++ files in the /etc/spamassassin directory, however, will + override these files. + + diff --git a/sa-update.sh b/sa-update.sh index b221c04..0aa6bd8 100644 --- a/sa-update.sh +++ b/sa-update.sh @@ -4,15 +4,15 @@ umask 022 OPT="" # sa-update must create keyring -if [ ! -d /etc/mail/spamassassin/sa-update-keys ]; then +if [ ! -d /etc/spamassassin/sa-update-keys ]; then sa-update fi # Initialize Channels and Keys CHANNELLIST="" KEYLIST="" -# Process each channel defined in /etc/mail/spamassassin/channel.d/ -for file in /etc/mail/spamassassin/channel.d/*.conf; do +# Process each channel defined in /etc/spamassassin/channel.d/ +for file in /etc/spamassassin/channel.d/*.conf; do [ ! -f "$file" ] && continue # Validate config file PREFIXES="CHANNELURL KEYID BEGIN" @@ -31,7 +31,7 @@ for file in /etc/mail/spamassassin/channel.d/*.conf; do done # Using --channelfile breaks channel.d support :-/ Need better way but stays for now for backward compat -grep -q "^[a-zA-Z0-9]" /etc/mail/spamassassin/channels && OPT="$OPT --channelfile /etc/mail/spamassassin/channels" +grep -q "^[a-zA-Z0-9]" /etc/spamassassin/channels && OPT="$OPT --channelfile /etc/spamassassin/channels" # Run sa-update on each channel, restart spam daemon if success for channel in $CHANNELLIST; do diff --git a/spamassassin.spec b/spamassassin.spec index 246970a..b88367b 100644 --- a/spamassassin.spec +++ b/spamassassin.spec @@ -13,7 +13,7 @@ Summary: A spam filter for email which can be invoked from mail delivery agents Summary(pl.UTF-8): Filtr antyspamowy, przeznaczony dla programów dostarczających pocztę (MDA) Name: spamassassin Version: 3.4.2 -Release: 1 +Release: 2 License: Apache v2.0 Group: Applications/Mail Source0: http://ftp.man.poznan.pl/pub/apache//spamassassin/source/%{pdir}-%{pnam}-%{version}.tar.bz2 @@ -27,6 +27,7 @@ Source6: sa-update.cron Source7: spamassassin-official.conf Source8: sought.conf Patch0: bug_771408_perl_version +Patch1: config-dir.patch URL: http://spamassassin.apache.org/ BuildRequires: openssl-devel >= 0.9.7d BuildRequires: perl(ExtUtils::MakeMaker) >= 6.16 @@ -81,7 +82,7 @@ considerably speeds processing of mail. To enable spamassassin, if you are receiving mail locally, simply add this line to your ~/.procmailrc: -INCLUDERC=/etc/mail/spamassassin/spamassassin-default.rc +INCLUDERC=/etc/spamassassin/spamassassin-default.rc To filter spam for all users, add that line to /etc/procmailrc (creating if necessary). @@ -99,7 +100,7 @@ przyspieszy proces przetwarzania poczty. Aby uruchomić spamassassina dla lokalnie przychodzącej poczty, wystarczy dodać do własnego ~/.procmailrc linię: -INCLUDERC=/etc/mail/spamassassin/spamassassin-default.rc +INCLUDERC=/etc/spamassassin/spamassassin-default.rc Aby filtrować spam dla wszystkich użytkowników, należy dodać tę linię do pliku /etc/procmailrc (tworząc go w razie potrzeby). @@ -148,7 +149,7 @@ whole spamassassin program. To enable spamassassin, if you are receiving mail locally, simply add this line to your ~/.procmailrc: -INCLUDERC=/etc/mail/spamassassin/spamassassin-spamc.rc +INCLUDERC=/etc/spamassassin/spamassassin-spamc.rc To filter spam for all users, add that line to /etc/procmailrc (creating if necessary). @@ -162,7 +163,7 @@ dzięki czemu powinien działać szybciej niż sam spamassassin. Aby uruchomić spamassassina dla lokalnie przychodzącej poczty, wystarczy dodać do własnego ~/.procmailrc linię: -INCLUDERC=/etc/mail/spamassassin/spamassassin-spamc.rc +INCLUDERC=/etc/spamassassin/spamassassin-spamc.rc Aby filtrować spam dla wszystkich użytkowników, należy dodać tę linię do pliku /etc/procmailrc (tworząc go w razie potrzeby). @@ -262,6 +263,7 @@ aplikacji do czytania poczty. %prep %setup -q -n %{pdir}-%{pnam}-%{version} %patch0 -p1 +%patch1 -p1 # disable broken test %{__mv} t/sa_compile.t{,.disabled} @@ -280,6 +282,7 @@ export CFLAGS="%{rpmcflags}" INSTALLDIRS=vendor \ PREFIX=%{_prefix} \ SYSCONFDIR=%{_sysconfdir} \ + CONFDIR=%{_sysconfdir}/spamassassin \ DATADIR=%{_datadir}/spamassassin \ ENABLE_SSL=yes \ CONTACT_ADDRESS="postmaster@localhost" \ @@ -293,29 +296,29 @@ export CFLAGS="%{rpmcflags}" %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{/etc/{cron.d,sysconfig,rc.d/init.d},%{_sysconfdir}/mail/spamassassin/channel.d} +install -d $RPM_BUILD_ROOT{/etc/{cron.d,sysconfig,rc.d/init.d},%{_sysconfdir}/spamassassin/channel.d} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/spamd install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/spamd -install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin -install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin +install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/spamassassin +install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/spamassassin install %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/spamassassin/sa-update.cron install %{SOURCE6} $RPM_BUILD_ROOT/etc/cron.d/sa-update -install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/channel.d -install %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/channel.d +install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/spamassassin/channel.d +install %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/spamassassin/channel.d # sa-update, sa-compile install -d $RPM_BUILD_ROOT/var/lib/spamassassin/{%{sa_version},compiled/%{sa_version}} -install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/sa-update-keys -touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/sa-update-keys/{pubring,secring,trustdb}.gpg +install -d $RPM_BUILD_ROOT%{_sysconfdir}/spamassassin/sa-update-keys +touch $RPM_BUILD_ROOT%{_sysconfdir}/spamassassin/sa-update-keys/{pubring,secring,trustdb}.gpg rm -f $RPM_BUILD_ROOT{%{perl_archlib}/perllocal.pod,%{perl_vendorarch}/auto/Mail/SpamAssassin/.packlist,%{_mandir}/man3/spamassassin-run.*} -cat > $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/channels << 'EOF' -# Use %{_sysconfdir}/mail/spamassassin/channel.d/*.conf for new channels +cat > $RPM_BUILD_ROOT%{_sysconfdir}/spamassassin/channels << 'EOF' +# Use %{_sysconfdir}/spamassassin/channel.d/*.conf for new channels EOF %clean @@ -331,6 +334,41 @@ if [ "$1" = "0" ]; then /sbin/chkconfig --del spamd fi +%triggerun -n perl-Mail-SpamAssassin -- perl-Mail-SpamAssassin < 3.4.2-2 +if [ $1 -le 1 ]; then + exit 0 +fi +[ -d /etc/spamassassin ] || mkdir /etc/spamassassin 2>/dev/null || : +for f in /etc/mail/spamassassin/*.{cf,pre}; do + f=${f##*/} + [ -f "/etc/mail/spamassassin/$f" ] && mv "/etc/mail/spamassassin/$f" "/etc/spamassassin/$f" 2>/dev/null || : +done +[ -n "$(find /etc/mail/spamassassin -type d -empty 2>/dev/null)" ] && rmdir /etc/mail/spamassassin 2>/dev/null || : +[ -n "$(find /etc/mail -type d -empty 2>/dev/null)" ] && rmdir /etc/mail 2>/dev/null || : + +%triggerun -- %{name} < 3.4.2-2 +if [ $1 -le 1 ]; then + exit 0 +fi +[ -d /etc/spamassassin ] || mkdir /etc/spamassassin 2>/dev/null || : +[ -f /etc/mail/spamassassin/spamassassin-default.rc ] && mv /etc/mail/spamassassin/spamassassin-default.rc /etc/spamassassin 2>/dev/null || : +[ -n "$(find /etc/mail/spamassassin -type d -empty 2>/dev/null)" ] && rmdir /etc/mail/spamassassin 2>/dev/null || : +[ -n "$(find /etc/mail -type d -empty 2>/dev/null)" ] && rmdir /etc/mail 2>/dev/null || : + +%triggerun spamc -- spamassassin-spamc < 3.4.2-2 +if [ $1 -le 1 ]; then + exit 0 +fi +[ -d /etc/spamassassin ] || mkdir /etc/spamassassin 2>/dev/null || : +[ -f /etc/mail/spamassassin/spamassassin-spamc.rc ] && mv /etc/mail/spamassassin/spamassassin-spamc.rc /etc/spamassassin 2>/dev/null || : +[ -n "$(find /etc/mail/spamassassin -type d -empty 2>/dev/null)" ] && rmdir /etc/mail/spamassassin 2>/dev/null || : +[ -n "$(find /etc/mail -type d -empty 2>/dev/null)" ] && rmdir /etc/mail 2>/dev/null || : + +%triggerpostun -n perl-Mail-SpamAssassin -- perl-Mail-SpamAssassin < 3.4.2 +echo +echo "Warning! Configuration has been migrated to /etc/spamassassin." +echo + %triggerpostun spamd -- spamassassin-spamd < 3.1.0-5.3 # temp hack, should we care of the dead link? ln -s spamd /etc/rc.d/init.d/spamassassin @@ -344,7 +382,7 @@ fi %defattr(644,root,root,755) %doc CREDITS Changes INSTALL README TRADEMARK UPGRADE USAGE %doc procmailrc.example sql/ ldap/ -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/spamassassin/spamassassin-default.rc +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/spamassassin/spamassassin-default.rc %attr(755,root,root) %{_bindir}/sa-learn %attr(755,root,root) %{_bindir}/sa-awl %attr(755,root,root) %{_bindir}/spamassassin @@ -367,7 +405,7 @@ fi %files spamc %defattr(644,root,root,755) -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/spamassassin/spamassassin-spamc.rc +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/spamassassin/spamassassin-spamc.rc %attr(755,root,root) %{_bindir}/spamc %{_mandir}/man1/spamc.1* @@ -380,12 +418,12 @@ fi %files update %defattr(644,root,root,755) -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/spamassassin/channels -%dir %{_sysconfdir}/mail/spamassassin/channel.d -%{_sysconfdir}/mail/spamassassin/channel.d/spamassassin-official.conf -%{_sysconfdir}/mail/spamassassin/channel.d/sought.conf -%attr(700,root,root) %dir %{_sysconfdir}/mail/spamassassin/sa-update-keys -%attr(700,root,root) %ghost %{_sysconfdir}/mail/spamassassin/sa-update-keys/* +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/spamassassin/channels +%dir %{_sysconfdir}/spamassassin/channel.d +%{_sysconfdir}/spamassassin/channel.d/spamassassin-official.conf +%{_sysconfdir}/spamassassin/channel.d/sought.conf +%attr(700,root,root) %dir %{_sysconfdir}/spamassassin/sa-update-keys +%attr(700,root,root) %ghost %{_sysconfdir}/spamassassin/sa-update-keys/* %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/sa-update %attr(755,root,root) %{_bindir}/sa-update %attr(755,root,root) %{_datadir}/spamassassin/sa-update.cron @@ -396,10 +434,10 @@ fi %files -n perl-Mail-SpamAssassin %defattr(644,root,root,755) %doc sample-nonspam.txt sample-spam.txt -%dir %{_sysconfdir}/mail/spamassassin -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/spamassassin/*.pre -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/spamassassin/*.cf -%exclude %{_sysconfdir}/mail/spamassassin/sa-update-keys +%dir %{_sysconfdir}/spamassassin +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/spamassassin/*.pre +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/spamassassin/*.cf +%exclude %{_sysconfdir}/spamassassin/sa-update-keys %dir %{_datadir}/spamassassin %config(noreplace) %{_datadir}/spamassassin/languages %config(noreplace) %{_datadir}/spamassassin/user_prefs.template