summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--recipes/spamassassin/files/10_change_config_paths330
-rw-r--r--recipes/spamassassin/files/20_edit_spamc_pod13
-rw-r--r--recipes/spamassassin/files/30_edit_README16
-rw-r--r--recipes/spamassassin/files/50_sa-learn_fix_empty_list_handling13
-rw-r--r--recipes/spamassassin/files/60_fix-pod22
-rw-r--r--recipes/spamassassin/files/70_fix-whatis68
-rw-r--r--recipes/spamassassin/files/80_fix_man_warnings26
-rw-r--r--recipes/spamassassin/files/spamassassin-spamc-configure.patch11
-rw-r--r--recipes/spamassassin/files/spamassassin.default31
-rw-r--r--recipes/spamassassin/files/spamassassin.init87
-rw-r--r--recipes/spamassassin/spamassassin_3.3.1.bb132
11 files changed, 749 insertions, 0 deletions
diff --git a/recipes/spamassassin/files/10_change_config_paths b/recipes/spamassassin/files/10_change_config_paths
new file mode 100644
index 0000000000..b8aca3d034
--- /dev/null
+++ b/recipes/spamassassin/files/10_change_config_paths
@@ -0,0 +1,330 @@
+Index: spamassassin-3.3.1/INSTALL
+===================================================================
+--- spamassassin-3.3.1.orig/INSTALL 2010-03-21 23:13:02.000000000 -0700
++++ spamassassin-3.3.1/INSTALL 2010-03-21 23:14:12.000000000 -0700
+@@ -455,7 +455,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?
+Index: spamassassin-3.3.1/README
+===================================================================
+--- spamassassin-3.3.1.orig/README 2010-03-21 23:13:01.000000000 -0700
++++ spamassassin-3.3.1/README 2010-03-21 23:14:12.000000000 -0700
+@@ -111,13 +111,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
+@@ -126,7 +126,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:
+@@ -134,14 +134,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.
+
+Index: spamassassin-3.3.1/UPGRADE
+===================================================================
+--- spamassassin-3.3.1.orig/UPGRADE 2010-03-21 23:13:01.000000000 -0700
++++ spamassassin-3.3.1/UPGRADE 2010-03-21 23:14:12.000000000 -0700
+@@ -49,7 +49,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
+@@ -207,7 +207,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.
+
+Index: spamassassin-3.3.1/USAGE
+===================================================================
+--- spamassassin-3.3.1.orig/USAGE 2010-03-21 23:13:02.000000000 -0700
++++ spamassassin-3.3.1/USAGE 2010-03-21 23:14:12.000000000 -0700
+@@ -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.
+
+
+Index: spamassassin-3.3.1/ldap/README
+===================================================================
+--- spamassassin-3.3.1.orig/ldap/README 2010-03-21 23:13:02.000000000 -0700
++++ spamassassin-3.3.1/ldap/README 2010-03-21 23:14:12.000000000 -0700
+@@ -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
+Index: spamassassin-3.3.1/lib/Mail/SpamAssassin/Conf.pm
+===================================================================
+--- spamassassin-3.3.1.orig/lib/Mail/SpamAssassin/Conf.pm 2010-03-21 23:13:02.000000000 -0700
++++ spamassassin-3.3.1/lib/Mail/SpamAssassin/Conf.pm 2010-03-21 23:14:12.000000000 -0700
+@@ -40,7 +40,7 @@
+ =head1 DESCRIPTION
+
+ SpamAssassin is configured using traditional UNIX-style configuration files,
+-loaded from the C</usr/share/spamassassin> and C</etc/mail/spamassassin>
++loaded from the C</usr/share/spamassassin> and C</etc/spamassassin>
+ directories.
+
+ The following web page lists the most important configuration settings
+@@ -1951,7 +1951,7 @@
+
+ These settings differ from the ones above, in that they are considered
+ 'privileged'. Only users running C<spamassassin> from their procmailrc's or
+-forward files, or sysadmins editing a file in C</etc/mail/spamassassin>, can
++forward files, or sysadmins editing a file in C</etc/spamassassin>, can
+ use them. C<spamd> users cannot use them in their C<user_prefs> files, for
+ security and efficiency reasons, unless C<allow_user_rules> is enabled (and
+ then, they may only add rules from below).
+Index: spamassassin-3.3.1/lib/Mail/SpamAssassin/Plugin/Test.pm
+===================================================================
+--- spamassassin-3.3.1.orig/lib/Mail/SpamAssassin/Plugin/Test.pm 2010-03-21 23:13:02.000000000 -0700
++++ spamassassin-3.3.1/lib/Mail/SpamAssassin/Plugin/Test.pm 2010-03-21 23:14:12.000000000 -0700
+@@ -27,7 +27,7 @@
+ =head1 DESCRIPTION
+
+ To try this plugin, write the above two lines in the synopsis to
+-C</etc/mail/spamassassin/plugintest.cf>.
++C</etc/spamassassin/plugintest.cf>.
+
+ =cut
+
+Index: spamassassin-3.3.1/lib/spamassassin-run.pod
+===================================================================
+--- spamassassin-3.3.1.orig/lib/spamassassin-run.pod 2010-03-21 23:13:02.000000000 -0700
++++ spamassassin-3.3.1/lib/spamassassin-run.pod 2010-03-21 23:14:12.000000000 -0700
+@@ -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
+@@ -239,7 +239,7 @@
+ =item B<--siteconfigpath>=I<path>
+
+ Use the specified path for locating site-specific configuration files. Ignore
+-the default directories (usually C</etc/mail/spamassassin> or similar).
++the default directories (usually C</etc/spamassassin> or similar).
+
+ =item B<--cf='config line'>
+
+Index: spamassassin-3.3.1/rules/user_prefs.template
+===================================================================
+--- spamassassin-3.3.1.orig/rules/user_prefs.template 2010-03-21 23:13:02.000000000 -0700
++++ spamassassin-3.3.1/rules/user_prefs.template 2010-03-21 23:14:12.000000000 -0700
+@@ -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.
+Index: spamassassin-3.3.1/sa-compile.raw
+===================================================================
+--- spamassassin-3.3.1.orig/sa-compile.raw 2010-03-21 23:13:02.000000000 -0700
++++ spamassassin-3.3.1/sa-compile.raw 2010-03-21 23:14:12.000000000 -0700
+@@ -674,7 +674,7 @@
+ -p prefs, --prefspath=file, --prefs-file=file
+ Set user preferences file
+ --siteconfigpath=path Path for site configs
+- (default: /etc/mail/spamassassin)
++ (default: /etc/spamassassin)
+ --updatedir=path Directory to place updates
+ (default: @@LOCAL_STATE_DIR@@/compiled/<perlversion>/@@VERSION@@)
+ --cf='config line' Additional line of configuration
+@@ -736,7 +736,7 @@
+ =item B<--siteconfigpath>=I<path>
+
+ Use the specified path for locating site-specific configuration files. Ignore
+-the default directories (usually C</etc/mail/spamassassin> or similar).
++the default directories (usually C</etc/spamassassin> or similar).
+
+ =item B<--updatedir>
+
+Index: spamassassin-3.3.1/sa-learn.raw
+===================================================================
+--- spamassassin-3.3.1.orig/sa-learn.raw 2010-03-21 23:13:02.000000000 -0700
++++ spamassassin-3.3.1/sa-learn.raw 2010-03-21 23:14:12.000000000 -0700
+@@ -643,7 +643,7 @@
+ -p prefs, --prefspath=file, --prefs-file=file
+ Set user preferences file
+ --siteconfigpath=path Path for site configs
+- (default: /etc/mail/spamassassin)
++ (default: /etc/spamassassin)
+ --cf='config line' Additional line of configuration
+ -D, --debug [area=n,...] Print debugging messages
+ -V, --version Print version
+@@ -800,7 +800,7 @@
+ =item B<--siteconfigpath>=I<path>
+
+ Use the specified path for locating site-specific configuration files. Ignore
+-the default directories (usually C</etc/mail/spamassassin> or similar).
++the default directories (usually C</etc/spamassassin> or similar).
+
+ =item B<--cf='config line'>
+
+Index: spamassassin-3.3.1/spamc/spamc.pod
+===================================================================
+--- spamassassin-3.3.1.orig/spamc/spamc.pod 2010-03-21 23:13:01.000000000 -0700
++++ spamassassin-3.3.1/spamc/spamc.pod 2010-03-21 23:14:12.000000000 -0700
+@@ -273,8 +273,8 @@
+
+ If the B<-F> switch is specified, that file will be used. Otherwise,
+ C<spamc> will attempt to load spamc.conf in C<SYSCONFDIR> (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:
+
+Index: spamassassin-3.3.1/spamd/README
+===================================================================
+--- spamassassin-3.3.1.orig/spamd/README 2010-03-21 23:13:02.000000000 -0700
++++ spamassassin-3.3.1/spamd/README 2010-03-21 23:14:12.000000000 -0700
+@@ -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.
+Index: spamassassin-3.3.1/spamd/README.vpopmail
+===================================================================
+--- spamassassin-3.3.1.orig/spamd/README.vpopmail 2010-03-21 23:13:02.000000000 -0700
++++ spamassassin-3.3.1/spamd/README.vpopmail 2010-03-21 23:14:12.000000000 -0700
+@@ -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
+Index: spamassassin-3.3.1/spamd/spamd.raw
+===================================================================
+--- spamassassin-3.3.1.orig/spamd/spamd.raw 2010-03-21 23:13:02.000000000 -0700
++++ spamassassin-3.3.1/spamd/spamd.raw 2010-03-21 23:14:12.000000000 -0700
+@@ -2895,7 +2895,7 @@
+ =item B<--siteconfigpath>=I<path>
+
+ Use the specified path for locating site-specific configuration files. Ignore
+-the default directories (usually C</etc/mail/spamassassin> or similar).
++the default directories (usually C</etc/spamassassin> or similar).
+
+ =item B<--cf='config line'>
+
+Index: spamassassin-3.3.1/sql/README
+===================================================================
+--- spamassassin-3.3.1.orig/sql/README 2010-03-21 23:13:02.000000000 -0700
++++ spamassassin-3.3.1/sql/README 2010-03-21 23:14:12.000000000 -0700
+@@ -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
+Index: spamassassin-3.3.1/sql/README.awl
+===================================================================
+--- spamassassin-3.3.1.orig/sql/README.awl 2010-03-21 23:13:02.000000000 -0700
++++ spamassassin-3.3.1/sql/README.awl 2010-03-21 23:14:12.000000000 -0700
+@@ -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
+Index: spamassassin-3.3.1/t/data/testplugin.pm
+===================================================================
+--- spamassassin-3.3.1.orig/t/data/testplugin.pm 2010-03-21 23:13:02.000000000 -0700
++++ spamassassin-3.3.1/t/data/testplugin.pm 2010-03-21 23:14:12.000000000 -0700
+@@ -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 --git a/recipes/spamassassin/files/20_edit_spamc_pod b/recipes/spamassassin/files/20_edit_spamc_pod
new file mode 100644
index 0000000000..3902c32994
--- /dev/null
+++ b/recipes/spamassassin/files/20_edit_spamc_pod
@@ -0,0 +1,13 @@
+Index: spamassassin-3.3.1/spamc/spamc.pod
+===================================================================
+--- spamassassin-3.3.1.orig/spamc/spamc.pod 2010-03-21 23:14:12.000000000 -0700
++++ spamassassin-3.3.1/spamc/spamc.pod 2010-03-21 23:14:28.000000000 -0700
+@@ -321,7 +321,7 @@
+
+ =head1 SEE ALSO
+
+-spamd(1)
++spamd(8)
+ spamassassin(1)
+ Mail::SpamAssassin(3)
+
diff --git a/recipes/spamassassin/files/30_edit_README b/recipes/spamassassin/files/30_edit_README
new file mode 100644
index 0000000000..e447a4ed5b
--- /dev/null
+++ b/recipes/spamassassin/files/30_edit_README
@@ -0,0 +1,16 @@
+Index: b/README
+===================================================================
+--- a/README 2010-01-26 23:16:56.000000000 -0500
++++ b/README 2010-01-26 23:16:57.000000000 -0500
+@@ -129,11 +129,6 @@
+ If the files exist in /etc/spamassassin, they will not
+ be overwritten during future installs.
+
+- - /usr/share/spamassassin/user_prefs.template:
+-
+- Distributed default user preferences. Do not modify this, as it is
+- overwritten when you upgrade.
+-
+ - /etc/spamassassin/user_prefs.template:
+
+ Default user preferences, for system admins to create, modify, and
diff --git a/recipes/spamassassin/files/50_sa-learn_fix_empty_list_handling b/recipes/spamassassin/files/50_sa-learn_fix_empty_list_handling
new file mode 100644
index 0000000000..3dee82917c
--- /dev/null
+++ b/recipes/spamassassin/files/50_sa-learn_fix_empty_list_handling
@@ -0,0 +1,13 @@
+Index: b/sa-learn.raw
+===================================================================
+--- a/sa-learn.raw 2010-01-26 23:16:56.000000000 -0500
++++ b/sa-learn.raw 2010-01-26 23:16:57.000000000 -0500
+@@ -412,7 +412,7 @@
+
+ my $tempfile; # will be defined if stdin -> tempfile
+ push(@targets, @ARGV);
+- @targets = ('-') unless @targets;
++ @targets = ('-') unless @targets || $opt{folders};
+
+ for(my $elem = 0; $elem <= $#targets; $elem++) {
+ # ArchiveIterator doesn't really like STDIN, so if "-" is specified
diff --git a/recipes/spamassassin/files/60_fix-pod b/recipes/spamassassin/files/60_fix-pod
new file mode 100644
index 0000000000..0de7c02dcf
--- /dev/null
+++ b/recipes/spamassassin/files/60_fix-pod
@@ -0,0 +1,22 @@
+Index: spamassassin-3.3.1/lib/Mail/SpamAssassin/Bayes.pm
+===================================================================
+--- spamassassin-3.3.1.orig/lib/Mail/SpamAssassin/Bayes.pm 2010-03-24 20:50:05.000000000 -0700
++++ spamassassin-3.3.1/lib/Mail/SpamAssassin/Bayes.pm 2010-03-24 20:50:33.000000000 -0700
+@@ -164,4 +164,3 @@
+
+ 1;
+
+-=cut
+Index: spamassassin-3.3.1/spamassassin.raw
+===================================================================
+--- spamassassin-3.3.1.orig/spamassassin.raw 2010-03-24 20:49:04.000000000 -0700
++++ spamassassin-3.3.1/spamassassin.raw 2010-03-24 20:49:16.000000000 -0700
+@@ -564,6 +564,8 @@
+
+ # ---------------------------------------------------------------------------
+
++=pod
++
+ =cut
+
+ =head1 NAME
diff --git a/recipes/spamassassin/files/70_fix-whatis b/recipes/spamassassin/files/70_fix-whatis
new file mode 100644
index 0000000000..69d650cce1
--- /dev/null
+++ b/recipes/spamassassin/files/70_fix-whatis
@@ -0,0 +1,68 @@
+Index: b/lib/Mail/SpamAssassin/Plugin/OneLineBodyRuleType.pm
+===================================================================
+--- a/lib/Mail/SpamAssassin/Plugin/OneLineBodyRuleType.pm 2010-01-26 23:12:17.000000000 -0500
++++ b/lib/Mail/SpamAssassin/Plugin/OneLineBodyRuleType.pm 2010-01-26 23:16:57.000000000 -0500
+@@ -1,6 +1,6 @@
+ =head1 NAME
+
+-Mail::SpamAssassin::Plugin::OneLineBodyRuleType
++Mail::SpamAssassin::Plugin::OneLineBodyRuleType - spamassassin body test plugin
+
+ =cut
+
+Index: b/lib/Mail/SpamAssassin/Util/DependencyInfo.pm
+===================================================================
+--- a/lib/Mail/SpamAssassin/Util/DependencyInfo.pm 2010-01-26 23:16:57.000000000 -0500
++++ b/lib/Mail/SpamAssassin/Util/DependencyInfo.pm 2010-01-26 23:16:57.000000000 -0500
+@@ -17,6 +17,16 @@
+ # limitations under the License.
+ # </@LICENSE>
+
++=head1 NAME
++
++Mail::SpamAssassin::Util::DependencyInfo - spamassassin debugging helpers
++
++=head1 SYNOPSIS
++
++ loadplugin Mail::SpamAssassin::Util::DependencyInfo
++
++=cut
++
+ package Mail::SpamAssassin::Util::DependencyInfo;
+
+ use strict;
+@@ -218,6 +228,8 @@
+
+ ###########################################################################
+
++=head1 METHODS
++
+ =over 4
+
+ =item $f->debug_diagnostics ()
+Index: b/lib/Mail/SpamAssassin/Util/RegistrarBoundaries.pm
+===================================================================
+--- a/lib/Mail/SpamAssassin/Util/RegistrarBoundaries.pm 2010-01-26 23:16:57.000000000 -0500
++++ b/lib/Mail/SpamAssassin/Util/RegistrarBoundaries.pm 2010-01-26 23:16:57.000000000 -0500
+@@ -18,6 +18,12 @@
+ # limitations under the License.
+ # </@LICENSE>
+
++=head1 NAME
++
++Mail::SpamAssassin::Util::RegistrarBoundaries - domain delegation rules
++
++=cut
++
+ package Mail::SpamAssassin::Util::RegistrarBoundaries;
+
+ use strict;
+@@ -268,6 +274,8 @@
+
+ ###########################################################################
+
++=head1 METHODS
++
+ =over 4
+
+ =item ($hostname, $domain) = split_domain ($fqdn)
diff --git a/recipes/spamassassin/files/80_fix_man_warnings b/recipes/spamassassin/files/80_fix_man_warnings
new file mode 100644
index 0000000000..062ee12af2
--- /dev/null
+++ b/recipes/spamassassin/files/80_fix_man_warnings
@@ -0,0 +1,26 @@
+Index: spamassassin-3.3.1/lib/Mail/SpamAssassin/Conf.pm
+===================================================================
+--- spamassassin-3.3.1.orig/lib/Mail/SpamAssassin/Conf.pm 2010-03-21 23:14:12.000000000 -0700
++++ spamassassin-3.3.1/lib/Mail/SpamAssassin/Conf.pm 2010-03-21 23:17:37.000000000 -0700
+@@ -2958,7 +2958,7 @@
+ sprintf statement with the username as the only parameter, thus is can hold a
+ single __USERNAME__ expression. This will be replaced with the username.
+
+-Example: C<ldap://localhost:389/dc=koehntopp,dc=de?spamassassinconfig?uid=__USERNAME__>
++Example: C<ldap://localhost:389/dc=koehntopp,dc=de?saconfig?uid=__USERNAME__>
+
+ =cut
+
+Index: spamassassin-3.3.1/sa-learn.raw
+===================================================================
+--- spamassassin-3.3.1.orig/sa-learn.raw 2010-03-21 23:14:38.000000000 -0700
++++ spamassassin-3.3.1/sa-learn.raw 2010-03-21 23:17:37.000000000 -0700
+@@ -1326,7 +1326,7 @@
+ E<lt>http://www.paulgraham.com/E<gt>
+ Paul Graham's "A Plan For Spam" paper
+
+-E<lt>http://radio.weblogs.com/0101454/stories/2002/09/16/spamDetection.htmlE<gt>
++E<lt>http://www.linuxjournal.com/article/6467E<gt>
+ Gary Robinson's f(x) and combining algorithms, as used in SpamAssassin
+
+ E<lt>http://www.bgl.nu/~glouis/bogofilter/E<gt>
diff --git a/recipes/spamassassin/files/spamassassin-spamc-configure.patch b/recipes/spamassassin/files/spamassassin-spamc-configure.patch
new file mode 100644
index 0000000000..6bd2447bd8
--- /dev/null
+++ b/recipes/spamassassin/files/spamassassin-spamc-configure.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.PL 2009-03-15 09:05:03.000000000 +0300
++++ b/Makefile.PL 2009-03-15 09:07:45.000000000 +0300
+@@ -1158,7 +1158,7 @@
+ LIBSPAMC_SRC = spamc/libspamc.c spamc/utils.c
+
+ $(SPAMC_MAKEFILE): $(SPAMC_MAKEFILE).in $(SPAMC_MAKEFILE).win spamc/spamc.h.in
+- $(CONFIGURE) --prefix="$(I_PREFIX)" --sysconfdir="$(I_CONFDIR)" --datadir="$(I_DATADIR)" --enable-ssl="$(ENABLE_SSL)"
++ $(CONFIGURE) --build="$(BUILD_SYS)" --host="$(HOST_SYS)" --target="$(TARGET_SYS)" --prefix="$(I_PREFIX)" --sysconfdir="$(I_CONFDIR)" --datadir="$(I_DATADIR)" --enable-ssl="$(ENABLE_SSL)"
+
+ spamc_has_moved:
+ $(NOECHO) echo "***"
diff --git a/recipes/spamassassin/files/spamassassin.default b/recipes/spamassassin/files/spamassassin.default
new file mode 100644
index 0000000000..09fd09597f
--- /dev/null
+++ b/recipes/spamassassin/files/spamassassin.default
@@ -0,0 +1,31 @@
+# /etc/default/spamassassin
+# Duncan Findlay
+
+# WARNING: please read README.spamd before using.
+# There may be security risks.
+
+# Change to one to enable spamd
+ENABLED=0
+
+# Options
+# See man spamd for possible options. The -d option is automatically added.
+
+# SpamAssassin uses a preforking model, so be careful! You need to
+# make sure --max-children is not set to anything higher than 5,
+# unless you know what you're doing.
+
+OPTIONS="--create-prefs --max-children 5 --helper-home-dir"
+
+# Pid file
+# Where should spamd write its PID to file? If you use the -u or
+# --username option above, this needs to be writable by that user.
+# Otherwise, the init script will not be able to shut spamd down.
+PIDFILE="/var/run/spamd.pid"
+
+# Set nice level of spamd
+#NICE="--nicelevel 15"
+
+# Cronjob
+# Set to anything but 0 to enable the cron job to automatically update
+# spamassassin's rules on a nightly basis
+CRON=0
diff --git a/recipes/spamassassin/files/spamassassin.init b/recipes/spamassassin/files/spamassassin.init
new file mode 100644
index 0000000000..9104f2ced4
--- /dev/null
+++ b/recipes/spamassassin/files/spamassassin.init
@@ -0,0 +1,87 @@
+#! /bin/sh
+
+### BEGIN INIT INFO
+# Provides: spamassassin
+# Required-Start: $remote_fs
+# Required-Stop: $remote_fs
+# Should-Start: $network $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+### END INIT INFO
+
+# Spamd init script
+# June 2002
+# Duncan Findlay
+
+# Based on skeleton by Miquel van Smoorenburg and Ian Murdock
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/spamd
+NAME=spamd
+SNAME=spamassassin
+DESC="SpamAssassin Mail Filter Daemon"
+PIDFILE="/var/run/$NAME.pid"
+
+export TMPDIR=/tmp
+# Apparently people have trouble if this isn't explicitly set...
+
+# Defaults - don't touch, edit /etc/default/spamassassin
+ENABLED=0
+OPTIONS=""
+NICE=
+
+. /lib/lsb/init-functions
+
+test -f /etc/default/spamassassin && . /etc/default/spamassassin
+
+DOPTIONS="-d --pidfile=$PIDFILE"
+
+if [ "$ENABLED" = "0" ]; then
+ echo "$DESC: disabled, see /etc/default/spamassassin"
+ exit 0
+fi
+
+test -f $DAEMON || exit 0
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ start-stop-daemon --start --pidfile $PIDFILE \
+ $NICE --oknodo --exec $DAEMON -- $OPTIONS $DOPTIONS
+ echo "$NAME."
+ ;;
+
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon --stop --pidfile $PIDFILE --oknodo
+ echo "$NAME."
+ ;;
+
+ reload|force-reload)
+ echo -n "Reloading $DESC: "
+ start-stop-daemon --stop --pidfile $PIDFILE --signal HUP
+ echo "$NAME."
+ ;;
+
+ restart)
+ echo -n "Restarting $DESC: "
+ start-stop-daemon --stop --pidfile $PIDFILE \
+ --retry 5 --oknodo
+ start-stop-daemon --start --pidfile $PIDFILE \
+ $NICE --oknodo --exec $DAEMON -- $OPTIONS $DOPTIONS
+
+ echo "$NAME."
+ ;;
+ status)
+ status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
+ ;;
+ *)
+ N=/etc/init.d/$SNAME
+ echo "Usage: $N {start|stop|restart|reload|force-reload|status}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/recipes/spamassassin/spamassassin_3.3.1.bb b/recipes/spamassassin/spamassassin_3.3.1.bb
new file mode 100644
index 0000000000..057891de98
--- /dev/null
+++ b/recipes/spamassassin/spamassassin_3.3.1.bb
@@ -0,0 +1,132 @@
+DESCRIPTION = "The Powerful #1 Open-Source Spam Filter"
+HOMEPAGE = "http://spamassassin.apache.org/"
+SECTION = "network"
+LICENSE = "GPL"
+PR = "r0"
+
+inherit cpan
+
+DEPENDS += " \
+ libarchive-tar-perl-native \
+ libdb-file-perl-native \
+ libdbi-perl-native \
+ libdigest-sha1-perl-native \
+ libencode-detect-perl-native \
+ libhtml-parser-perl-native \
+ libio-socket-inet6-perl-native \
+ libio-socket-ssl-perl-native \
+ libio-zlib-perl-native \
+ libip-country-perl-native \
+ libmail-dkim-perl-native \
+ libmail-spf-perl-native \
+ libnetaddr-ip-perl-native \
+ libnet-dns-perl-native \
+ libnet-ident-perl-native \
+ libwww-perl-native \
+ openssl \
+ zlib \
+ "
+RDEPENDS += " \
+ libarchive-tar-perl \
+ libdb-file-perl \
+ libdbi-perl \
+ libdigest-sha1-perl \
+ libencode-detect-perl \
+ libhtml-parser-perl \
+ libio-socket-inet6-perl \
+ libio-socket-ssl-perl \
+ libio-zlib-perl \
+ libip-country-perl \
+ libmail-dkim-perl \
+ libmail-spf-perl \
+ libnetaddr-ip-perl \
+ libnet-dns-perl \
+ libnet-ident-perl \
+ liburi-perl \
+ libwww-perl \
+ perl-module-base \
+ perl-module-bytes \
+ perl-module-carp \
+ perl-module-config \
+ perl-module-config-heavy \
+ perl-module-constant \
+ perl-module-cwd \
+ perl-module-data-dumper \
+ perl-module-errno \
+ perl-module-exporter \
+ perl-module-fcntl \
+ perl-module-file-basename \
+ perl-module-file-copy \
+ perl-module-file-find \
+ perl-module-file-glob \
+ perl-module-file-path \
+ perl-module-file-spec \
+ perl-module-file-spec-unix \
+ perl-module-io-file \
+ perl-module-io-select \
+ perl-module-io-socket \
+ perl-module-io-socket-inet \
+ perl-module-lib \
+ perl-module-pod-text \
+ perl-module-pod-usage \
+ perl-module-posix \
+ perl-module-socket \
+ perl-module-strict \
+ perl-module-sys-hostname \
+ perl-module-sys-syslog \
+ perl-module-time-hires \
+ perl-module-time-local \
+ perl-module-vars \
+ perl-module-warnings \
+ "
+
+# Most of the patches are from Debian
+SRC_URI = " \
+ ${APACHE_MIRROR}/spamassassin/source/Mail-SpamAssassin-${PV}.tar.bz2;name=spamassassin-${PV} \
+ file://spamassassin.default \
+ file://spamassassin.init \
+ file://10_change_config_paths;patch=1 \
+ file://20_edit_spamc_pod;patch=1 \
+ file://30_edit_README;patch=1 \
+ file://50_sa-learn_fix_empty_list_handling;patch=1 \
+ file://60_fix-pod;patch=1 \
+ file://70_fix-whatis;patch=1 \
+ file://80_fix_man_warnings;patch=1 \
+ file://spamassassin-spamc-configure.patch;patch=1 \
+ "
+SRC_URI[spamassassin-3.3.1.md5sum] = "bb977900c3b2627db13e9f44f9b5bfc8"
+SRC_URI[spamassassin-3.3.1.sha256sum] = "4c348cd951fc2c5688e9713fcbc6ba453df51d32a1ab332a63800d20ff18bdb4"
+
+S = "${WORKDIR}/Mail-SpamAssassin-${PV}"
+
+do_compile_prepend() {
+ export BUILD_SYS=${BUILD_SYS}
+ export HOST_SYS=${HOST_SYS}
+ export TARGET_SYS=${TARGET_SYS}
+}
+
+EXTRA_CPANFLAGS = " \
+ DESTDIR="${D}" \
+ PREFIX="${prefix}" \
+ INSTALLDIRS=vendor \
+ INSTALLVENDORMAN1DIR="${mandir}/man1" \
+ INSTALLVENDORMAN3DIR="${mandir}/man3" \
+ CONFDIR=${sysconfdir}/spamassassin \
+ ENABLE_SSL=yes \
+ "
+
+do_install_append() {
+ install -d ${D}/${sysconfdir}/init.d
+ install -d ${D}/${sysconfdir}/default
+ install -d ${D}/${sbindir}
+ install -m 0755 ${WORKDIR}/spamassassin.init ${D}/${sysconfdir}/init.d/spamassassin
+ install -m 0644 ${WORKDIR}/spamassassin.default ${D}/${sysconfdir}/default/spamassassin
+ mv ${D}/${bindir}/spamd ${D}/${sbindir}/spamd
+ sed -ri "s,${D},," ${D}/${bindir}/sa-learn \
+ ${D}/${bindir}/sa-awl \
+ ${D}/${bindir}/sa-update \
+ ${D}/${bindir}/sa-check_spamd \
+ ${D}/${bindir}/sa-compile \
+ ${D}/${bindir}/spamassassin \
+ ${D}/${sbindir}/spamd
+}