On starting, SpamSieve opens, closes, then re-opens, but misses the first spam

System:
Mac Pro running 10.11.3
Apple Mail 9.2
Spamsieve 2.9.24
No plug-ins, other than Spamsieve

Problem:
On starting up, Spamsieve bounces in the dock. It appears to open, but then quits. Emails arrive, and all go into the Inbox, including obvious spam. Spamsieve then re-opens and works correctly for the rest of the day, until I shut down the Mac.

This has been happening for a while - maybe since Spamsieve 2.9.24, but I’m not certain.

This identical issue happens on three other Macs (MacBook Air, MacBook Pro and Mac Mini), all running the same OS, Mail and Spamsieve.

Any ideas, please?

Extra information - startup procedure
I should have added that Mail (and, consequently, Spamsieve) is one of the Startup items.

If Mail is not a Startup item, and opened separately, Spamsieve works correctly.

It seems that Spamsieve does not now like to be part of the Startup procedure, but it did for many years beforehand.

Please check in Console to see if there are any messages logged about why it is quitting.

Thank you - My log.log attached

I hope this is what you are asking for.

It is, but I don’t see anything there related to SpamSieve. That may be because the log is full of so many errors (every 10 seconds) from Prey:

03/04/2016 12:39:51.812	com.apple.xpc.launchd[1]	(com.prey.agent) Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
03/04/2016 12:40:01.821	com.apple.xpc.launchd[1]	(com.prey.agent[14850]) Service could not initialize: Unable to set current working directory. error = 2: No such file or directory, path = /usr/lib/prey/current: 15D21: xpcproxy + 12028 [1353][13E77DA5-3602-31BF-B074-49D4EE27E9D8]: 0x2

I think you’ll need to fix that somehow.

If you manually launch SpamSieve, does it stay in the Dock? If not, are any errors reported in Console?

I’ve just re-started the Mac Pro, without Mail being a Startup item. I then started Spamseive independently from the Applications folder. It started correctly and stayed in the dock. I then started Mail from the Applications folder, and that also performed correctly. I’ve attached a new Console log, in case you can see anything there.

I can see that Prey is casuing a lot of errors. I’ll certainly have to fix that (maybe uninstall and re-install).

Thanks for your help, so far.

I do not see an attachment. In any case, it sounds like you have a workaround (not using the startup item). I am most interested in seeing the recent part of the log, right after the problem occurs.

Oh, I’m sorry - the second log obviously didn’t get sent, although I thought I did send it.

I’ll re-set my Mac to include Mail as a Startup item, and then leave it until tomorrow, so that (hopefully) some spam will appear overnight. I’ll then attempt to send a new log to you containing the error.

(In the meantime, I’ve been trying to uninstall Prey, but without any luck at all.)

A new day, with new results:
Prey has been sorted out with an update, and now appears to be working correctly.
Spamsieve continues to work as before - it opens, closes, and re-opens, but has let spam through into the Inbox.
Spamsieve has continued to work correctly since opening a second time.

I’ve attached a log, with just today’s messages - about 2 hours’ worth. These appear to show that Spamsieve did fail.

Any further ideas, please?

It looks like SpamSieve is hanging at launch. Please see this page.

Thanks for your reply, and I’m sorry about my delayed response.
It’s very difficult to get the same problem, when there isn’t any spam arriving! Also, when Spamsieve suddenly closes, it also stops being shown in Activity Monitor. However, I have managed to catch one such episode, when Spamsieve re-opened (after closing on launch).

Since yesterday, I’ve upgraded the MacBook Air and MacBook Pro to OS X 10.11.4 To start with, the problem still exited on both machines, but later in the day, it got better (all on startup).
I’ve attached Console logs for each of these, which may be interesting. The MacBook Pro log is stating 'Extra preferences file should probably be deleted, etc…" Consequently I’ve attached a screenshot of the Mail preferences on the MacBook Pro.

I hope this isn’t overloading you, but also hope this will throw some light on the issue.

My MBP_MailPreferences.jpg

Unfortunately, the sample did not actually record any data from SpamSieve. The logs make it look like SpamSieve did finish launching normally, though. Does it take a long time to launch if you do so manually when Mail is not running?

This is probably not related to the problem, but you could delete the file in question if you want to silence the error.

I will certainly delete the extra Mail preference file. It’s not on the other two Macs (or probably three Macs).

It’s a shame Activity Monitor didn’t catch anything abnormal with Spamsieve, but not surprising, as it’s impossible for Ativity Monitor to catch it whilst the Mac is booting up.

In the short term, I can manually launch Mail after booting up, although it seems a shame not to have it working automatically - as it has for many years.

I will upgrade the Mac Pro to 10.11.4 to see if that helps. The other two Macs appear to be working correctly today, but no more spam has arrived, so it’s difficult to tell - but Spamsieve hasn’t crashed in its usual way. In fact, all we’ve done to help has been to move up to 10.11.4! I’ve been trying to resist this, as it apears that there are some potential issues.

I have a vague suspicion that Spamsieve developed this crashing error when I upgraded al four Macs to Spamsieve 2.9.24, but I can’t be certain, or point the finger of blame!
Leave this with me for a day or two, and I’ll let you know how it pans out.

Is that OK with you?

I did not see anything in the logs about it crashing. Are you seeing the crash reporter window or getting crash log files generated?

OK.

Ah, when I said ‘crashing’, I was meaning that it closed unexpectedly and by itself, without any intervention from me. Maybe this is incorrect terminology - sorry. I didn’t get a crash report window, and I haven’t looked at any crash log files, as I didn’t realise there are any. Now I’ve looked in my ‘DiagnosticReports’ folder, there are three crash reports, but none of them is for Spamsieve or Mail (they are for Adobe Acrobat Pro, Parallels Desktop and Trusteer Rapport).

Leave this with me, and I’ll upgrade the Mac Pro to 10.11.4, and do some more testing to see where it now happens - if it does. I’ll report back to you.

I’ve done some further testing on this. I’ve upgraded the Mac Pro, MacBook Pro and MacBook Air to El Capitan 10.11.4 (with associated Mail 9.3). The Mac Mini is still on 10.11.3 (and Mail 9.2).

On the Mac Pro and the Mac Mini, Spamsieve still has the original issue of opening, closing and then re-opening during booting up (and letting spam into the Inbox during its short closed-down time) - if it is in the Startup items. It is ‘cured’ by starting Spamsieve manually after booting up, and continues to work perfectly thereafter.

On the MacBook Pro and MacBook Air, Spamsieve works perfectly all the time, and is included in the startup items.

The main difference between these two sets of Macs is that the MacBook Pro and MacBook Air both have SSDs, and the other two have old-fashioned mechanical hard drives - and are slower at booting up.

I wonder if this gives you some hint about what is happening? It’s such a shame that this has only recently gone wrong, when it has been working excellently for years.

I think ‘TinkerTool’ used to have a feature of being to decide on the order of the Startup items, but apparently it doesn’t now make any difference about the order. Another open source application ‘DelayedLauncher’ might work, but I have no experience of this.

Do you actually mean the StartupItems folder? Or are you talking about the Login Items in System Preferences?

It’s not clear to me why SpamSieve is closing during launch. You said that there are no crash logs. And, so far, I have not seen any log entries related to this. SpamSieve does have a new feature, to work around a problem with Mac OS X 10.11 that could cause it to get stuck in a partially launched state. If SpamSieve has taken more than 10 seconds to launch, the helper process quits it so that it can try again. However, you should get a Console log entry that says:

Asked partially launched SpamSieve to quit

if this is what’s happening, and I did not see that in your logs. Nevertheless, you can try clicking this link to tell the helper process not to quit SpamSieve.

Sorry - I did mean the ‘Login Items’ in the System Preferences. (I wasn’t aware of a ‘StartupItems’ folder.)

Yes, there were no crash logs. I wasn’t aware that there was the new feature in Spamsieve which would close it and then try again - that’s exactly what was happening. I’ve gone back through some Console logs and found the one attached from two days ago. It does have a line at 8:00:37:004am stating, “SpamSieveLaunchAgent[598] Asked partially launched SpamSieve to quit”.

Thank you for the link to tell the helper process not to quit SpamSieve. I have clicked on this, and it has certainly stopped Spamsieve from quitting (having re-booted.) I don’t yet know if it will cure the issue of letting spam into the Inbox, until there is some spam, and that will probably happen tomorrow.

As a matter of interest, was this new feature added into Spamsieve 2.9.24?

As I mentioned before, I think the issue started about the time I installed 2.9.24, but I couldn’t be sure. Is it safe to have used your link (and also use it on all four Macs), and will this now cause more problems elsewhere?

Thanks for your coninued help with this.

Yep, I see it in the new log. I wonder why it wasn’t in the previous ones.

It was added in 2.9.23.

It should be fine, and 2.9.24 made some changes so that stuck partial launches are less likely to happen in the first place.

Great - thank you for that bit of reassurance. Assuming all is still good on booting up tomorrow, I’ll install the link on all four Macs.

I haven’t kept track of all the attachments/logs I’ve sent to you, so I can’t explain why you didn’t get that one with the vital line of report.

Let’s assume that it’s all going to be fine now (on all four Macs), and I’ll just get back to you if something isn’t quite right.

Thank you for all your time on this.