I must be doing something wrong (spampd error)

Hi :blush:

I’m getting the following error, and would really appreciate any possible help.
I’m not sure what is going wrong.

Creating home directory `/var/lib/spamassassin’ …
SpamAssassin Mail Filter Daemon: disabled, see /etc/default/spamassassin
Setting up sa-compile (3.4.0-1ubuntu1) …
Running sa-compile (may take a long time)
SpamAssassin Mail Filter Daemon: disabled, see /etc/default/spamassassin
Setting up spampd (2.30-22.2) …

  • Starting spam checking proxy daemon spampd
    Syslog err [Bad file descriptor] at /usr/share/perl5/Net/Server/Log/Sys/Syslog.pm line 61.
    invoke-rc.d: initscript spampd, action “start” failed.
    dpkg: error processing package spampd (–configure):
    subprocess installed post-installation script returned error exit status 9
    Processing triggers for python-support (1.0.15) …
    Errors were encountered while processing:
    spampd
    E: Sub-process /usr/bin/dpkg returned an error code (1)

FAILED: service spampd restart


  • Starting spam checking proxy daemon spampd
    Syslog err [Bad file descriptor] at /usr/share/perl5/Net/Server/Log/Sys/Syslog.pm line 61.

When I go back into the log I notice this:

installing spampd razor pyzor dovecot-antispam …

FAILED: apt-get -y install spampd razor pyzor dovecot-antispam

I thought maybe it has to do with the ISO provided from my VPS provider.
So one thing I tried is removing Ubuntu 14.04.
Then installing Ubuntu 12… and then upgrading to Ubuntu 14.04.
I thought maybe that way I get a “fresh” install of Ubuntu 14.04.
That didn’t work… might have been a dumb idea to begin with, but I figured I would just try.

Could it be possible that it’s not fetching the required sources in sources.list?

Here are my sources: (I had to remove http from the urls to post on this forum)

deb Index of /ubuntu trusty main universe
deb-src Index of /ubuntu trusty main universe

deb Index of /ubuntu trusty-security main universe
deb Index of /ubuntu trusty-updates main universe
deb-src Index of /ubuntu trusty-security main universe

Not sure what else to try?

I cant access in browser, because after the above error, many things seems to go wrong.
Such as:

setup/start.sh: line 131: /var/lib/mailinabox/api.key: No such file or directory
setup/start.sh: line 132: /var/lib/mailinabox/api.key: No such file or directory

Thank you for your help!

That’s very strange. I would recommend starting over with a fresh 14.04 machine, and if that doesn’t work using a different VPS provider.

I’m getting the same. Running in a OpenVZ Ubuntu 14.04 installation.

Setting up spamassassin (3.4.0-1ubuntu1) ...
Adding system user `debian-spamd' (UID 110) ...
Adding new group `debian-spamd' (GID 115) ...
Adding new user `debian-spamd' (UID 110) with group `debian-spamd' ...
Creating home directory `/var/lib/spamassassin' ...
SpamAssassin Mail Filter Daemon: disabled, see /etc/default/spamassassin
Processing triggers for ureadahead (0.100.0-16) ...
Setting up sa-compile (3.4.0-1ubuntu1) ...
Running sa-compile (may take a long time)
SpamAssassin Mail Filter Daemon: disabled, see /etc/default/spamassassin
Setting up spampd (2.30-22.2) ...
 * Starting spam checking proxy daemon spampd
Syslog err [Bad file descriptor] at /usr/share/perl5/Net/Server/Log/Sys/Syslog.pm line 61.
invoke-rc.d: initscript spampd, action "start" failed.
dpkg: error processing package spampd (--configure):
 subprocess installed post-installation script returned error exit status 9
Processing triggers for python-support (1.0.15) ...
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 spampd
E: Sub-process /usr/bin/dpkg returned an error code (1)
-----------------------------------------

FAILED: service spampd restart
-----------------------------------------
 * Starting spam checking proxy daemon spampd
Syslog err [Bad file descriptor] at /usr/share/perl5/Net/Server/Log/Sys/Syslog.pm line 61.

And later (before the password setup), I’m getting the following errors:

-----------------------------------------
setup/start.sh: line 131: /var/lib/mailinabox/api.key: No such file or directory
setup/start.sh: line 132: /var/lib/mailinabox/api.key: No such file or directory
Traceback (most recent call last):
  File "tools/mail.py", line 70, in <module>
    users = mgmt("/mail/users?format=json", is_json=True)
  File "tools/mail.py", line 9, in mgmt
     setup_key_auth(mgmt_uri)
   File "tools/mail.py", line 40, in setup_key_auth
    key = open('/var/lib/mailinabox/api.key').read().strip()
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/mailinabox/api.key'

And after filling in the password:

Traceback (most recent call last):
File “tools/mail.py”, line 90, in
print(mgmt("/mail/users/add", { “email”: email, “password”: pw }))
File “tools/mail.py”, line 9, in mgmt
setup_key_auth(mgmt_uri)
File “tools/mail.py”, line 40, in setup_key_auth
key = open(’/var/lib/mailinabox/api.key’).read().strip()
FileNotFoundError: [Errno 2] No such file or directory: ‘/var/lib/mailinabox/api.key’

FAILED: tools/mail.py user make-admin admin@domain

Traceback (most recent call last):
File “tools/mail.py”, line 102, in
print(mgmt("/mail/users/privileges/" + action, { “email”: sys.argv[3], “privilege”: “admin” }))
File “tools/mail.py”, line 9, in mgmt
setup_key_auth(mgmt_uri)
File “tools/mail.py”, line 40, in setup_key_auth
key = open(’/var/lib/mailinabox/api.key’).read().strip()
FileNotFoundError: [Errno 2] No such file or directory: ‘/var/lib/mailinabox/api.key’

Traceback (most recent call last):
File “tools/mail.py”, line 116, in
print(mgmt("/mail/aliases/add", { “source”: sys.argv[3], “destination”: sys.argv[4] }))
File “tools/mail.py”, line 9, in mgmt
setup_key_auth(mgmt_uri)
File “tools/mail.py”, line 40, in setup_key_auth
key = open(’/var/lib/mailinabox/api.key’).read().strip()
FileNotFoundError: [Errno 2] No such file or directory: ‘/var/lib/mailinabox/api.key’


Try to reinstall rsyslog package