3 ms·
A particularly fun combination is Fail2Ban on a mail server and Apple's Mail desktop email client when you need to change your password. We've got to change pas
by tzs 3y ago
A particularly fun combination is Fail2Ban on a mail server and Apple's Mail desktop email client when you need to change your password. We've got to change passwords every 90 days at work, and probably 90% of the times I try to do this I end up getting banned by Fail2Ban.
The problem apparently is that Apple Mail is pretty aggressive at retrying if a login fails, and so if it tries to connect before you have finished changing the password in the client it can try enough times in quick succession to trigger Fail2Ban.
There are at least 3 places you can change your password(s) for Apple Mail.
• Invoke "Mail/Settings..." in Mail to open the settings dialog. Select the "Accounts" tab. Then for the account you want to change go to the "Server Settings" pane. That has password fields for your incoming mail server and your outgoing mail server.
• Invoke "/System Settings...", then go to the "Internet Accounts" settings. (You can also get there from "Mail/Account..." in Mail). Select you mail account, click the "Detail..." button, and you'll get a dialog that has a password field.
Note it only has one password field. I'm not sure what you are supposed to do if you have different passwords for you incoming and outgoing mail servers.
• Open "Keychain Access", and search for your incoming mail server. Look for an entry whose kind is "application password" named com.apple.account.IMAP.password. (I assume that IMAP would be POP3 if you use a POP3 server). Open it, verify that the Account field is you@that_server. Then you can click "Show password" to reveal the current password. Change that to the new password and save.
Do the same for your outgoing mail server, looking for com.apple.account.SMTP.password.
My current procedure is to first disable my work mail account in "Mail/Settings...", then change the password on the server, then update the client side passwords via Keychain access, and then via "Mail/Settings...", then enable my work mail account. That seems to usually work, although once it didn't until I also changed it in "Internet Accounts" in the system settings. I also had a time where I just could not get the new password to take until I rebooted.
Apple Calendar is also a pain with password changes, but we don't have Fail2Ban on our calendar server (it is not on a public facing network so there would be no point) so it is not as annoying as Mail.
For Calendar what I've found to mostly work is:
1. In "Calendar/Settings..." in the settings for my work account in the Accounts tab turn off all delegates. Then disable my work account. The quit Calendar.
On MacOS prior to 13 find and kill the CalendarAgent and CalNCService processes. On 13 they went away.
2. Change the password on the server.
3. Change the password in "Keychain Access". I find the entry by searching for name@calendar_server. The right entry is the "application password" named "com.apple.account.CalDAV.password".
4. Then change the password in "Internet Accounts". As with Mail, Calendar provides convenient access to this via "Calendar/Accounts...".
5. Open Calendar, reenable the account, and turn back on delegates.
All of the above comes from trial and error and I have no idea how much of it is actually necessary. I haven't had the patience to do the time consuming experimentation it would take to figure out the actual simplest way to change these passwords reliably and without hitting the server with the old password during the changing.
- pepa65 3y agoAdjust ban counts when dealing with aggressive Apple apps.