lindegroup / autopkgr

AutoPkgr is a free Mac app that makes it easy to install and configure AutoPkg.
http://www.lindegroup.com/autopkgr
Apache License 2.0
532 stars 51 forks source link

Email alerts stopped working after upgrade to 1.3 #425

Closed amandaw33 closed 9 years ago

amandaw33 commented 9 years ago

Our email alerts worked ok until upgrading to 1.3. We use exchange and our admin whitelists server IP that Autopkgr resides on which allows smtp to work without auth.

Here's output with verbose on when I search console for autopkgr when I open the app. There is no additional errors in console when I try to send a test message, it just spins and spins in the app.

8/12/15 9:00:02.207 AM com.lindegroup.AutoPkgr.helper[2297]: securityd_message_with_reply_sync Failed to talk to secd after 4 attempts. 8/12/15 9:00:02.211 AM com.lindegroup.AutoPkgr.helper[2297]: SecOSStatusWith error:[-25291] The operation couldn’t be completed. (com.apple.security.xpc error 3 - <connection: 0x7fbfaa92ff30> { name = com.apple.securityd.xpc, listener = false, pid = 0, euid = 4294967295, egid = 4294967295, asid = 4294967295 }: Connection invalid) 8/12/15 9:00:02.266 AM secd[406]: securityd_xpc_dictionary_handler AutoPkgr[2296] copy_matching The operation couldn’t be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements) 8/12/15 9:00:02.267 AM AutoPkgr[2296]: SecOSStatusWith error:[-34018] The operation couldn’t be completed. (OSStatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements)) 8/12/15 9:00:02.269 AM AutoPkgr[2296]: Error getting password for (null) [-25300]: The specified item could not be found in the keychain.

eahrold commented 9 years ago

So the fact that you're seeing this Error getting password for (null) [-25300] points to an issue reading the defaults, and particularly the auth username. What do you get when you do

 defaults read com.lindegroup.AutoPkgr SMTPUsername
amandaw33 commented 9 years ago

2015-08-12 10:03:36.440 defaults[2986:28620] The domain/default pair of (com.lindegroup.Autopkgr, SMTPUsername) does not exist

eahrold commented 9 years ago

That's exactly the issue. It's hard to say why that's not getting saved correctly. Try re-entering that in AutoPkgr and see if it takes. If not try writing setting that value via the CLI, then see if emailing starts to work.

amandaw33 commented 9 years ago

there is no username though because there's no auth, or am I misunderstanding?

eahrold commented 9 years ago

I guess I'm misunderstanding. I thought you needed auth unless your server was white listed.

So you're intended setup is that you don't ever need auth?

amandaw33 commented 9 years ago

exactly. the server is whitelisted, so no auth is needed, just IP address and port - and a from and to address

eahrold commented 9 years ago

Any chance the Use Authentication check box is checked?

amandaw33 commented 9 years ago

it's not.

eahrold commented 9 years ago

I think I found it. Try

defaults read com.lindegroup.AutoPkgr SMTPAuthenticationEnabled 

I'm guessing it'll return 1

Then do

defaults write com.lindegroup.AutoPkgr SMTPAuthenticationEnabled -bool False

It and see if that fixes the issue.

amandaw33 commented 9 years ago

When I run the read I get The domain/default pair of (/Users/jssadmin/Library/Preferences/com.lindegroup.AutoPkgr, SMTPAuthenticationEnabled) does not exist

Assume you still want me to run the write command to make it exist?

eahrold commented 9 years ago

Check and un-check the check box for that. Then see what that returns.

amandaw33 commented 9 years ago

Checked and unchecked, now the read returns 0. Test email fails still. Let me know if you want new logs

eahrold commented 9 years ago

Are you still seeing this?

Error getting password for (null) 
amandaw33 commented 9 years ago

yup

8/12/15 10:55:48.100 AM AutoPkgr[3574]: Error getting password for (null) [-25300]: The specified item could not be found in the keychain.

eahrold commented 9 years ago

OK give this build a try... https://www.dropbox.com/s/12cjpgvpsceo9i8/AutoPkgr-Non-Auth-Email-Fix.zip?dl=0

amandaw33 commented 9 years ago

No more (null) error but test email doesn't go through. Verbose logging shows "test email button clicked" though which I didn't notice before.

eahrold commented 9 years ago

Ok, I found one more conditional that may be causing the issue. Here's another build. https://www.dropbox.com/s/jsx1hute95y4mwh/AutoPkgr-Non-Auth-Email-Fix2.zip?dl=0

amandaw33 commented 9 years ago

That did it, working! Thank you so much for taking the time!

eahrold commented 9 years ago

Thank you for spending the time working this out with me. I'm glad that solved it.