zypper addlock and dependencies

If I do:

zypper rm -u kmail
zypper al kmail

Does this also prevent associated packages like ktnef from being reinstalled on zypper dup?
Or do I also need to zypper al ktnef?

I see ktnef is a “recommended” package.

Packages that are required or recommended by kmail will of course only be installed if you install kmail.
So yes, locking kmail should also avoid automatically installing ktnef (unless you have something else installed that recommends it, but I think kmail is the only package).

You’d need to lock ktnef only to prevent it from being installed if kmail is installed.

I suspected that, but wanted to make sure before uninstalling other applications.
Thank you!