I was unable to find any help anywhere on installing spamassassin on a modern Fedora system. All the advice out there is old and doesn't apply - so far as I found anyway. The official documentation does NOT pertain to Fedora — it's too generic and is missing important Fedora implementation details.

And, how it's done is not enough straight-forward that I know what to do! The most important missing link appears to be what I tell to Postfix on how to call spamassassin. However, it's also completely unclear where configuration options are to be defined.

There's a lot more that follows but MAYBE this all boils down to nobody bothering to give appropriate information on what the Postfix smtpd_milter entry should be. AND, the entry I've tried is based on the data found in '/usr/share/doc/spamass-milter-postfix' this file says the right value is unix:/run/spamass-milter/postfix/sock BUT while the directory exists, the socket entry is not there, and the error message cited below is returned.

...OK, the longer story:

I've installed these versions:


And again, this is Fedora 21. The installed Postfix is:


When I run 'man spamassassin' it points me to /var/lib/spammassassin/3.004000, which contains 'updates_spamassassin_org.cf and a subdirectory of the same name (minus the .cf) which in turn contains a large collection (65) of .cf files. The man page also points me to /usr/share/spamassassin which in turn contains a large collection (63) of similarly named .cf files which aren't quite identical.

I sure hope I don't have to learn everything about all of these to get spamassassin working! Thankfully - but insufficiently - the man page ALSO points me to /etc/mail/spamassassin which contains, among other things, a file called local.cf. In there I found a link to a page on how to install and integrate spamassassin with postfix - here (), but that advice wasn't sufficient AND appeared to not be so clueful. For example, among the first things it suggests is to create a group and user account called "spamfilter" when, of course, the stock yum install already created the account sa-milt, whose entry appears to be the right one:

sa-milt:x:982:477:SpamAssassin Milter:/var/lib/spamass-milter:/sbin/nologin 

I imagine that there needs to be an entry made in Postfix's main.cf to create or add an entry called smtpd_milters to include whatever link is needed to tell Postfix how to call spamassassin. PRESENTLY I have an entry for openDKIM:

# This is for openDKIM - missing are clamav and spamassassin:
smtpd_milters = inet:localhost:8891

So, it seems to me to be an error to create these user accounts. Also if these accounts ARE needed, why didn't the installation scripts already create the user and group? Additionally, it also talks about using "service" to start spamassassin, BUT, as any competent Fedora 21 System Administrator knows, you don't use "service", you use systemctl!

...Ignoring that...

The service DOES start - and stay up - using:

systemctl start spamassassin

BUT, it doesn't work.

In particular, it seems obvious to me there needs to have a hook into postfix, but it's also obvious that the non-Fedora 21 strategy of doing that fails. We are directed to update Postfix's main.cf smtpd_milters entry - here's what they suggest:

# First entry is for openDKIM 
smtpd_milters = inet:localhost:8891, unix:/run/spamass-milter/postfix/sock

The problem is, though, that this doesn't work. We get this in the log file:

postfix/smtpd[18151]: warning: connect to Milter service unix:/run/spamass-milter/postfix/sock: No such file or directory

Yet, I can't seem to find the CORRECT entry for smtpd_milters for this version combination!

CLEARLY there should be installation directions somewhere, but NONE of what I've found pertains to these versions. Please either tell me how this should be done or point me to where I can find a competent write-up that DOES apply! IN PARTICULAR, what's the appropriate smtpd_milters entry OR, how do I create a configuration combination (smtpd_milters / spamassassin configuration) that works?

  • @mattdm ...You are mistaken in your edit about Fedora Core. For evidence of this, on ANY younger version, simply type 'uname -a' and / or look at the installed software packages as returned by 'rpm -qa'. ...Ever wonder what the 'fc' stands for?! Yes, you got it, Fedora Core. I don't have time enough in my life to argue with WRONG pedants like you, however, I do respectfully request you please NEVER bother to update MY questions again - at least, certainly NOT for this particular point. – Richard T Apr 17 '15 at 22:58
  • 2
    I'm pretty sure this is an area where I know what I'm talking about. – mattdm Apr 17 '15 at 23:10
  • 2
    Sure. For #1, we decided that it wasn't worth the trouble of dropping the 'c', especially because doing so might have caused sorting glitches. For #2, see fedoraproject.org/wiki/History_of_Fedora_release_names – mattdm Apr 17 '15 at 23:29
  • 2
    This name change was a fundamental shift — search for "Fedora Core / Extras merger" to read some of the history, and so is fairly important to those inside the project itself (including, e.g. me). It's really not a matter of pedantry. – mattdm Apr 17 '15 at 23:33
  • 2
    Oh, also, we sometimes treat the post-merge 'fc' as meaning "Fedora Collection", but I don't think that's really official. On the other hand, FESCo was originally the Fedora Extras Steering Committee, and that officially changed to Fedora Engineering Steering Committee. – mattdm Apr 17 '15 at 23:52

It turns out that after much gnashing of teeth, I noticed that there's a package I had installed that NOBODY had referenced so far as I had ever seen. It's called spamass-milter-root.

So, after having checked EVERYTHING I could think of, I figured, why not? ... ("#" is the system root account's CLI prompt.)

# systemctl enable spamass-milter-root.service
Created symlink from /etc/systemd/system/multi-user.target.wants/spamass-milter-root.service to /usr/lib/systemd/system/spamass-milter-root.service.
# systemctl status spamass-milter-root.service  -;
● spamass-milter-root.service - Mail filter for SpamAssassin
   Loaded: loaded (/usr/lib/systemd/system/spamass-milter-root.service; disabled)
   Active: active (running) since Fri 2015-04-17 15:53:41 PDT; 1min 3s ago
  Process: 2353 ExecStartPre=/bin/chown -R root /run/spamass-milter (code=exited, status=0/SUCCESS)
 Main PID: 2356 (spamass-milter)
   CGroup: /system.slice/spamass-milter-root.service
           ├─2356 /usr/sbin/spamass-milter -g postfix -p /run/spamass-milter/...
           └─2370 /usr/bin/spamc

Apr 17 15:53:41 ms1 spamass-milter[2356]: spamass-milter 0.4.0 starting
Apr 17 15:54:00 ms1 spamass-milter[2356]: Could not retrieve sendmail mac...s

And, as I had a tail -f /var/log/maillog up in a window, I was shocked when SUDDENLY (!!) it all just started to work with hundreds of mails being processed by spamd before my very eyes! YAY!

Now there are other concerns, such as, what effect the analysis of these messages are having....

Just for clarity, here are the two commands that solved the problem... Keep in mind, this is with all the other configuration work done:

# systemctl enable spamass-milter-root.service
# systemctl start spamass-milter-root.service



You need to start spamass service as well.

systemctl start spamass-milter

And verified it working by

systemctl status spamass-milter


netstat -an | grep spamass-milter

By default, spamassassin only shipped with spamd and spamc binary. Do daemon included in the package. That's why you need use integrator like bash script, amavisd or spamass-milter (like this case)

  • Unfortunately, it wasn't nearly so simple. I apparently did not make it clear, but I had already tried starting the milter... See the real answer below. – Richard T Apr 17 '15 at 23:30
  • Glad it worked :) – masegaloeh Apr 18 '15 at 0:47

I would not use spamassassin through milter. I feel that amavisd is a much better option (eg: it give antivirus protection by the virtue of clamav).

Here you can find some integration step for RedHat/CentOS; for Fedora they should be relatively similar.

  • I would NEVER vote someone down for expressing a different opinion, however, your answer is unresponsive to the question. If In can get SpamAssassin to work, I'm not going with your suggestion. Thanks though. – Richard T Apr 17 '15 at 23:01
  • You forgot to mention that ClamAV (default AV in amavisd) requires almost 1GB of ram, not just while it's processing, but ALL the time. Your advice has lots of caveats that you neglect to mention. – oucil May 8 '20 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.