With Ubuntu 16.10 you should be using systemd. you can enable dependencies (after directive) which can make sure that all the services you need are started prior to (in the case of SA) the service you want.
Check your systemD service configuration file: /usr/lib/systemd/system/spamassassin.service (or wherever your systemD config files are stored on Ubuntu. The content should be something like: [Unit] Description=Spamassassin daemon After=syslog.target network.target Wants=sa-update.timer [Service] EnvironmentFile=-/etc/sysconfig/spamassassin ExecStart=/usr/bin/spamd $SPAMDOPTIONS StandardOutput=null StandardError=null Restart=always [Install] WantedBy=multi-user.target Notice that systemd waits for syslog and network to complete before it launches spamassassin. Checkout this document if you have not and are still using upstart. https://wiki.ubuntu.com/SystemdForUpstartUsers On Dec 6, 2016, at 9:40 AM, sha...@shanew.net<mailto:sha...@shanew.net> wrote: I recently set up an email server on Ubuntu 14.10 and kept being frustrated that on boot various filter software and related milters were regularly starting after sendmail, sometimes by as much as five minutes. We don't reboot that server very often, so it took a while to test various fixes, but in the end I added the following lines to the INIT INFO section of various milters (it's really only the first one that matters for startup): # X-Start-Before: sendmail # X-Stop-After: sendmail If postfix uses an /etc/init.d script like sendmail does on 14.10, check to see what the "Provides:" part of the INIT INFO is (probably postfix), and add an X-Start-Before line with tha value to the spamassassin init script. Or, if you just want to make sure that SA starts before monit, use whatever the "Provides:" is set to in the monit init script. If you have a mixture of SysV (regular) and upstart script, things get more complicated (unless 16.10 introduces functionality to make dependencies interoperable that doesn't exist in 14.10). On Tue, 6 Dec 2016, Michael Heuberger wrote: Hi David I dont know. Not sure how I can find this out whether it does some DNS/network stuff. In my other response to John you can see that it takes about 5.69 sec to start spamassassin. And no idea how to configure a SA startup dependency on the network being up. And shouldn't that come along with the package when installed via apt-get? - Michael On 6/12/16 11:47, David B Funk wrote: Could it be some kind if interaction with other system services startup? (in particular this feels like a network timeout issue). One of the things SA does during its startup process is check to see if DNS/network stuff is available. If the system hasn't yet brought up the network stack when SA starts, it may hang waiting for the network to stabilize. On a running system, if you stop/restart SA do you see the same delay or is it only on a cold start of the system? Is it possible to configure a SA starup dependency on the network being up? -- Public key #7BBC68D9 at | Shane Williams http://pgp.mit.edu/ | System Admin - UT CompSci =----------------------------------+------------------------------- All syllogisms contain three lines | sha...@shanew.net<mailto:sha...@shanew.net> Therefore this is not a syllogism | www.ischool.utexas.edu/~shanew<http://www.ischool.utexas.edu/~shanew>