Kmail - identity configured for 2 of 5 accounts not respected?

I have five accounts configured in KMail. Each has a separate matching identity and separate sending server - i.e. 1:1:1 each:

  • Every account has its matching identity selected in settings → configure KMail… → Accounts → Receiving → Modify → Advanced Tab.
  • Every identity has its matching outgoing account set in … → Accounts → Identities → Modify → Advanced Tab.

Their setups are otherwise identical (I believe/unless I’ve missed something).

For 3 of the 5 accounts, selecting their top-level folder on the left of the main window, then creating a new email results in the matching identity (and thus matching sending address) being correctly pre-populated. For these it seems the default is set by the identity setting in accounts-> receiving → modify → advanced tab).

For 2 of the 5 accounts it doesn’t - the identity setting (receiving → modify → advanced tab) isn’t respected for those two accounts and the default identity is used when creating a new email. Can anyone think of a reason why the different behaviour?

All 5 have the ‘use default identity’ setting at the folder root for each account so obviously, more than this is at play (otherwise they would all be wrong, or all right, together).

You can specify (overwrite) sender identity separate for each mailbox/folder. Just select for example INBOX, right click and then “Folder properties”. You can decide if you want to use default identity (a defined in account settings) or other one.

I’m aware of the feature - you’re referring to the setting I describe in my final para, I believe,

But that doesn’t really address my question: why the different behaviour (despite those - and other - settings all being the same)?

Theoretically, I could work around the two accounts not behaving like the other three by using that feature, but in my case it’s not practicable. I have too many subfolders.

But why do I need to work around anything:

  • why don’t those two accounts behave the same way as the other three?
  • why do those two accounts ignore their identity setting (whereas the other three respect it)?

This seems like a bug to me, but I’m not quite sure which part of this is the bit that isn’t expected. Hence hoping for some thoughts from those more familiar with KMail than me before I take a punt and raise a bug anyway.

I was not sure what you mean with “at the folder root for each account”, because the “use default identity” option can be set for the mail account node and any mail folder node for an account. Did you check both places ?

Sorry for slow reply.

I was referring to the settings “at the folder root for each account” because selecting between these is how I was selecting between identities (subfolders are not involved). Sorry for not making that context explicit.

To address your question: all folders and subfolders (I have hundreds of them in total) are set the same way - all the default - but this is moot x3: It’s my understanding that (1) subfolders inherit the root folder behaviour unless specifically overridden, but even if I’m wrong on that, it’s (2) irrelevant anyway because I’m only selecting between the root folders before creating a new email, and this is all moot because (3) my question is about different behaviours between folders with the same settings.

Do you have any insight on the latter?

I use a similar setup as you - 1:1:1 and everything’s works as expected.

The reason why i mentioned the settings for a folder(s) is, you can overwrite the identity defined for account (in Settings → Accounts → Receiving) even in folder properties for the node for an IMAP account (not only for mailbox folders, line INBOX, Trash, …). You call this node “account root folder”. But anyway … You checked all folders/nodes and each has in its folder properties the setting “Use default identity” activated.

Other thing I would check is, if the settings you made in the ui/dialogs are saved properly into config files. Find the config file for your IMAP account (~/.config/akonadi_imap_resource_*) and check the entries/values for:

  • AccountIdentity: has the id of the identity
  • UseDefaultIdentity: should be false. True means use the identity defined as default in Settings → Accounts → Identities.

The defined identities are stored in ~/.config/emailidentities. For identity id look at entries with key “uoid”.