SpamAssassin is a mail filter which attempts to identify spam using text
analysis and several internet-based realtime blacklists.
Using its rule base, it uses a wide range of heuristic tests on mail
headers and body text to identify "spam", also known as unsolicited
commercial email.
Once identified, the mail can then be optionally tagged as spam for later
filtering using the user's own mail user-agent application.
Additional drop-in rule sets are available at
https://cwiki.apache.org/confluence/display/spamassassin/CustomRulesets
===> The following configuration options are available for spamassassin-4.0.2_4:
AS_ROOT=on: Run spamd as root (recommended)
DOCS=on: Build and/or install documentation
SSL=on: SSL protocol support
====> Optional user-config/bayes database backends
MYSQL=off: MySQL database support
PGSQL=off: PostgreSQL database support
====> Optional SpamAssassin plugins
DCC=off: DCC digest list support (mail/dcc-dccd)
DKIM=on: Verify DKIM records (mail/p5-Mail-DKIM)
DMARC=off: Verify DMARC records (mail/p5-Mail-DMARC)
PYZOR=off: Pyzor digest list support (mail/pyzor)
RAZOR=off: Vipul's Razor digest list support (mail/razor-agents)
RELAY_COUNTRY=off: Location-based scoring (net/p5-GeoIP2)
RLIMIT=off: Resource limits (devel/p5-BSD-Resource)
SPF_QUERY=on: Verify SPF records (mail/p5-Mail-SPF)
====> GnuPG (for sa-update): you have to select exactly one of them
GNUPG_NONE=off: Do not use GnuPG
GNUPG=off: GnuPG 1 (security/gnupg1)
GNUPG2=on: GnuPG 2 (security/gnupg)
===> Use 'make config' to modify these settings
Reason:
As of spamassassin 4.0.0 (3fdfceb36029) the deprecated HashCash plug-in
was finally removed. Users using the HashCash plug-in will need to
remove references to it.
mail/spamassassin*: Remove the environment ENV from the environment
The Perl taint module flags the ENV environment variable as insecure
because it cannot assume the file it points to is safe.
PR: 297394
MFH: 2026Q3
mail/spamassassin*: Ensure process name is renamed even in debug mode
Some customers run spamassassin in debug mode. This breaks rc's ability
to manage the process because the process name is unexpectedly "perl".
When in debug mode, also set the process name to spamd.
Reported by: Dan Mahoney <danm@prime.gushi.org>
Upstream bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8384
mail/spamassassin*: Redundant and empty directories should be created
Make sure redunant ane empty directories are actually gone.
Discovered during spamassassin-devel make check-orphans.
Fixes: 96194a7a6e88
PR: 282317
MFH: 2024Q4
databases/p5-DBD-mysql: Fix for MariaDB users
Add a new variable DBD_MYSQL, use that in *_DEPENDS and add mysql to USES
where required. DBD_MYSQL will automatically set the correct DBD dependency.
In cd16748194e2 databases/p5-DBD-mysql was updated to 5.x, in 5.x the
support for MariaDB was removed and only MySQL >= 8.0 is supported.
In the 4.x releases MariaDB is still supported, according to upstream 4.x
will still be supported for a while [1], so use that for now when we detect
that MYSQL_FLAVOUR is set to mariadb. databases/p5-DBD-mysql4 was added in
d95f49cb3b54.
DBD:MariaDB would be another alternative, but migrating to it might need
more analysis than just staying with the 4.x releases of p5-DBD-mysql. This
(Only the first 15 lines of the commit message are shown above )
mail/spamassassin*: Keep sa-update-keys
sa-update-keys was removed in 2015 due to upstream bug #7208. The
requestor asks that they be retained after deinstall to facilite
updates.
Reported by: ler
mail/spamassassin*: Alter pkg-message to remind the user after upgrade
pkg-message states sa-update and sa-compile should be run after a
fresh install. It also tells the user to run these commands
periodically after install, implying that they should also be
run after update. Make the lanuage clearer so there is no confusion.
PR: 265316
MFH: 2024Q1
mail/spamassassin: Assume maintainership
ler@ suggested that as maintainer of mail/spamassassin-devel I should
assume maintainership of mail/spamassassin. This port will be updated
to spamassassin 4.0 in the New Year.
Reported by: ler
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
mail: remove 'Created by' lines
A big Thank You to the original contributors of these ports:
* <ashish@FreeBSD.org>
* Aaron Dalton <aaron@FreeBSD.org>
* Adam David <adam@FreeBSD.org>
* Adam McDougall <mcdouga9@egr.msu.edu>
* Adam Weinberger <adamw@FreeBSD.org>
* Ade Lovett <ade@FreeBSD.org>
* Akinori MUSHA aka knu <knu@idaemons.org>
* Alex Deiter <tiamat@komi.mts.ru>
* Alex Dupre <ale@FreeBSD.org>
* Alex Dupre <sysadmin@alexdupre.com>
* Alex Perel <veers@disturbed.net>
(Only the first 15 lines of the commit message are shown above )
*/*: Remove redundant '-[0-9]*' from CONFLICTS
The conflict checks compare the patterns first against the package
names without version (as reported by "pkg query "%n"), then - if
there was no match - agsinst the full package names including the
version (as reported by "pkg query "%n-%v").
Many CONFLICTS definitions used patterns like "bash-[0-9]*" to filter
for the bash package in any version. But that pattern is functionally
identical with just "bash".
Approved by: portmgr (blanket)
mail/spamassassin: Update MASTER_SITES
Use a direct URL to Apache's release archive site as it's not mirrored
by upstream mirror sites
Approved by: rene (portmgr blanket), arrowd (mentor)
Differential Revision: https://reviews.freebsd.org/D32428
mail/spamassassin: Update 3.4.4 --> 3.4.5, fixing CVE-2020-1946
According to https://s.apache.org/ng9u9, 3.4.5 fixes CVE-2020-1946.
The announce text:
Apache SpamAssassin 3.4.5 was recently released [1], and fixes an issue
of security note where malicious rule configuration (.cf) files can be
configured to run system commands.
In Apache SpamAssassin before 3.4.5, exploits can be injected in a number
of scenarios. In addition to upgrading to SA 3.4.5, users should only use
update channels or 3rd party .cf files from trusted places.
Apache SpamAssassin would like to thank Damian Lukowski at credativ for
ethically reporting this issue.
(Only the first 15 lines of the commit message are shown above )
mail/spamassassin: Update to 3.4.4
Update mail/spamassassin to 3.4.4. This fixes several security
vulnderabilities.
Changelog:
- Improvements to OLEVBMacro
- Fix for CRLF handling with SpamAssMilter & DKIM
- Small fix for a regexp to provide Perl 5.8.x compatability again
- Increased fns_extrachars default value to 50
- Fixed nosubject and maxhits tflags when sa-compile is used
- Limited the Bayes parsed token count
- Improvements to whitespace trimming
PR: 243744
Submitted by: cy
MFH: 2020Q1
Security: c86bfee3-4441-11ea-8be3-54e1ad3d6335
Update 3.4.2 --> 3.4.3
2019-12-11: Apache SpamAssassin 3.4.3 has been released! Apache
SpamAssassin 3.4.3 contains numerous tweaks and bug fixes as we prepare
to move to version 4.0.0 with better, native UTF-8 handling. There are a
number of functional patches, improvements as well as security reasons to
upgrade to 3.4.3. In this release, there is also one new plugin and there
are bug fixes for two CVEs:
CVE-2019-12420 for Multipart Denial of Service Vulnerability
CVE-2018-11805 for nefarious CF files can be configured to run system
commands without any output or errors.
PR: 242618
Submitted by: cy
Reported by: cy
Approved by: zeising (maintainer)
MFH: 2019Q4
Security: CVE-2019-12420, CVE-2018-11805
Remove comment to ensure the japanese/spamassassin verion number updated
and in sync. japanese/spamassassin was removed by r488786.
Approved by: zeising (maintainer, implicit)
MFH: 2019Q4
mail/spamassassin: Revert r484326
Revert r484326, switch to gpg2, silence gpg2 memory warnings.
I have gotten multiple reports of this causing issues when upgrading or
installing. Revert this until I can look at this in more detail.
mail/spamassassin: switch gpg version, silence gpg
Switch to use gpg2 instead of the old and mostly deprecated gpg as the
default gpg version.
Add a gpg.conf file to silence the warning about using insecure memory with
gpg2 [1].
Bump portrevision
Submitted by: Larry Rosenman (ler) [1]
Add missing dependency on p5-IP-Country when the nondefault option
RELAY_COUNTRY is enabled [0]
While here, carbage collect the UPDATE_AND_COMPILE option from
OPTIONS_DEFUALT, this was most likely missed in r425590
Don't bump portrevision, since this dependency is nut pulled in by default.
PR: 222649 [0]
Reported by: Max Kostikov <max@kostikov.co> [0]
Fix runtime on recent perl versions and change default options
Add a patch from upstream to fix runtime when using perl 5.26 or later. [0]
Change default options to include DKIM and SPF checking.
Bump portrevision.
PR: 220474 (based on) [0]
Reported by: Trond.Endrestol@ximalas.info [0]
- Remove redundant definitions of IPV6_DESC and [OPEN]SSL_DESC when closely
matching standard ones from `Mk/bsd.options.desc.mk'
- Rename couple of options to standard name or the one that better reflects
their usage
Follow up to r425497. sa-update isn't the problem, it's sa-update in
the plist. Remove the UPDATE_ON_INSTALL option entirely, and just add
a blurb to the pkg-message instructing people to run sa-update and
sa-compile manually.
Thanks to Matthew Fuller for prodding a better solution.
For quite a while now, the only update server for SpamAssassin hasn't
had a valid DNS entry. People have asked about it on the mailing list
as far back as August, but literally nobody has replied to any of those
posts, and no commits or wiki updates have been made regarding this,
making it reasonably appear that nobody on the SpamAssassin team has
noticed or cares that SpamAssassin no longer updates.
For now, just add a patch that turns sa-update(1) into a no-op.
While here, add a couple simple Makefile tweaks and bump PORTREVISION.
Disable SSLv3 and enable TLSv1.1 and TLSv1.2.
This is a patch make by Debian's own Noah Meyerhans that disables SSLv3,
fixes or removes the tests that choke without SSLv3, and lets
IO::Socket::SSL choose the best TLS level rather than forcing it at
TLSv1.
I can't think of a responsible reason to allow re-enabling it as an
OPTION, so add a note to UPDATING warning people of the change and
referencing the below PR.
PORTREVISION bump.
PR: 208225
Submitted by: Sascha Holzleiter
Obtained from: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7199
MFH: 2016Q2
Add two patches from upstream bug #7265, which fixes incompatibilities with
Net::DNS 1.03. The FreeBSD p5-Net-DNS port has been downgraded to 1.02 but
Net::DNS will be re-issued at some point soon. The changes in these patches
seem to work well with Net::DNS 1.02.
While here, add some TEST_DEPENDS so I can run the plugin-based tests as well.
Bump PORTREVISION for spamassassin and japanese/spamassassin.
PR: 204682
Submitted by: Mark.Martinec@ijs.si
Obtained from: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7265
Add upstream r1684653 from bug #7208, which fixes warnings stemming from
calling each/keys on a hashref.
While here, convert @unexec stuff into preunexec and postunexec.
Submitted by: Larry Rosenman
Obtained from: https://svn.apache.org/viewvc?view=revision&revision=1684653
Make it so that the default Perl is always called perl5.
- Move Perl's man1 files along with its man3 files.
- Move where Perl installs its modules man1 pages.
- Convert the ports installing man1 pages.
- Make different Perl versions installable at the same time.
Though you should note that only the default version can be used to
install Perl modules, and the non default Perl versions cannot use the
modules installed via ports if they contain .so as they are installed
in a version specific directory.
Reviewed by: bapt (the Mk bits)
Exp-run by: antoine
Sponsored by: Absolight
Differential Revision: https://reviews.freebsd.org/D3542
mail/spamassassin, japanese/spamassassin: fix bug with dns/p5-Net-DNS change
Now that a port dns/p5-Net-DNS has been upgraded to version 1.01,
this revealed an incompatibility with DNS resolving in SpamAssassin.
In short: Net::DNS::Packet->new no longer sets the RD (recursion
desired) bit in new packets, so essentially DNS queries no longer
work. Details at:
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7223
To bridge the time until SpamAssassin 3.4.2 gets released,
the attached patch is needed ( equivalent to
https://svn.apache.org/viewvc?view=rev&rev=1691992 ).
For earlier version of dns/p5-Net-DNS this patch is redundant,
but does no harm.
PR: 201741
Submitted by: Mark.Martinec@ijs.si
MASTER_SITES cleanup.
- Replace ${MASTER_SITE_FOO} with FOO.
- Merge MASTER_SITE_SUBDIR into MASTER_SITES when possible. (This means 99.9%
of the time.)
- Remove occurrences of MASTER_SITE_LOCAL when no subdirectory was present and
no hint of what it should be was present.
- Fix some logic.
- And generally, make things more simple and easy to understand.
While there, add magic values to the FESTIVAL, GENTOO, GIMP, GNUPG, QT and
SAMBA macros.
Also, replace some EXTRACT_SUFX occurences with USES=tar:*.
Checked by: make fetch-urlall-list
With hat: portmgr
Sponsored by: Absolight
Update spamassassin to 3.4.1.
Changes:
* improved automation to help combat spammers that are abusing new top level
domains;
* tweaks to the SPF support to block more spoofed emails;
* increased character set normalization to make rules easier to develop and
stop spammers from using alternate character sets to bypass tests;
* continued refinement to the native IPv6 support; and
* improved Bayesian classification with better debugging and attachment
hashing.
Full ChangeLog at https://metacpan.org/changes/distribution/Mail-SpamAssassin
The japanese/spamassassin port is broken until it's updated for 3.4.1.
mail/spamassassin: Revert command_interpreter fix for now
There is a report that defining command_interpreter actually causes
problem for spamd, athought it should not. While the reason is being
investigated, the previous change has been reverted per maintainer's
request.
PR 196517
mail/spamassassin: Add perl command_interpret to rc script
spamd is a perl script, so defining command_interpreter is required
for proper rc.d functioning.
Add a patch from SA bug #7107, to quiet warnings due to bad usage of $^V
that show up during sa-learn, sa-compile, etc.
Note that other warnings can still show up, ex.:
zoom: rule __FOR_SALE_PRC_100K will loop on SpamAssassin older than 3.3.2
running under Perl 5.12 or older, Bug 6558
While here, go with the @dir new world order. SA is not poudriere clean at this
time;
/var/spool/spamd is the homedir of user spamd, so I am pretty sure it shouldn't
be
listed with @dir. QA sees this as a leftover dir.
PR: 195524
Submitted by: Bernard Spil
Change the way Perl modules are installed, update the default Perl to 5.18.
Before, we had:
site_perl : lib/perl5/site_perl/5.18
site_perl/perl_arch : lib/perl5/site_perl/5.18/mach
perl_man3 : lib/perl5/5.18/man/man3
Now we have:
site_perl : lib/perl5/site_perl
site_arch : lib/perl5/site_perl/mach/5.18
perl_man3 : lib/perl5/site_perl/man/man3
Modules without any .so will be installed at the same place regardless of the
(Only the first 15 lines of the commit message are shown above )
Create /var/run/spamd manually in the rc(8) script, as pkg_tools does
not create the directory from the @dirrm /var/run/spamd in the plist.
So, we'll do it manually for the next 6 weeks.
PR: 190005
Submitted by: Trond.Endrestol@ximalas.info
Don't activate code that requires pre-compiled rules if the
UPDATE_AND_COMPILE option is off. It can still be activated
later for people who do it themselves.
Submitted by: Herbert J. Skuhra
* Add a patch from SA bug 7057 to fix compatibility with Net::DNS >= 0.76 [1]
* Verify that /var/run/spamd exists before starting [2]
* While here, reformat Makefile
PR: ports/191101 [1], ports/189912 [1], ports/190005 [2]
Submitted by: Daniel Austin <freebsd-ports@dan.me.uk> and pi [1a],
brian@behlendorf.com [1b], Trond.Endrestol@ximalas.info [2]
Improvements.
Let pkg-create handle ownership/mode better. Use @dirrmtry instead of
@unexec rmdir. Use COPYTREE_SHARE to ensure proper permissions.
Also, stop the spamd service on deinstall if it's running. It creates
zombie issues otherwise... I'm pretty sure this is the right thing to
do.
Partially revert r348415. There are many good scenarios where
preventing user-config file creation is a good thing. Recommend
one of those scenarios in the rc.d description.
PR: ports/187659
Submitted by: Lawrence "The Dreamer" Chen <beastie@tardisi.com>
- Switch to recommended dependencies
- Drop p5-libwww, as SA will use fetch(1)
- Use p5-IO-Socket-IP unconditionally
- Drop p5-IO-Socket-INET6
- Remove the IPV6 option
- Use p5-Geo-IP instead of p5-IP-Country
- Remove unnecessary p5-Mail-Tools dependency
- Remove RAZOR and DKIM from OPTIONS_DEFAULT. All
plugins now default to off.
- Make instructions clearer in pkg-message and rc.d script
The release notes for 3.4.0 were never included in the tarball from
upstream. We include the missing commit, and also the release notes
themselves for good measure.
PR: ports/187632
Submitted by: Spil <spil.oss@gmail.com>
Also, as long as we're here, pet portlint a little bit (though it
still complains loudly about other things).
Move {mail,japanese}/p5-Mail-SpamAssassin to &/spamassassin, in the name of
improving accessibility.
I think people who want to just find the port/package and install it are
more likely to look for "spamassassin the program" than "spamassassin the
perl module collection."