"the problem is that often they go away very very quickly or they don't show up at all!" -- Is that about the lock screen or the status bar?
You just stated "status bar works fine all the times", but talk about disappearance in the same sentence.
Thus, explicitly:
The Aquamail message notifications in the status bar: do they stay until you clear them (as expected), or do they also disappear too quickly?
it's about the lock screen, it's always about the lock screen,
I have no problem whatsoever with the status bar,
they stay in the status bar until I clear them
OK. Thanks for confirming this. (And thank you for your patience.)
Then, it means that Aquamail does not remove those notifications. If it did, the notifications in the status bar would have disappeared as well.
In this case Aquamail has no knowledge (nor it should) about your apps: LLAL, HU, or whatsoever.
Let me try to explain this via an analogy:
Aquamail brings a cat to the room (Android notifications system). You see the cat in the room with your own eyes through the video (via the status bar). Then, there is a surveillance system with cameras that watches the room and displays images of things in the room to the TV screen. (That's your LLAL or LLAL+HU.)
Your surveillance system may decide not to show some objects by switching off some cameras either completely (when you exclude certain app's notifications from LLAL) or shortly after showing those objects for a few seconds and switching to a different camera (for whatever internal reasons...) But even if your surveillance system doesn't show the cat on TV, as long as you can see the cat in the room (aka status bar), you cannot blame Aquamail for removing the cat from the room, because it didn't.
Aquamail has no control over or knowledge about the "surveillance system" of LLAL/HU.
And that's why I reiterate this statement:
I don't think Aquamail's log will show anything: Aquamail handed off the notifications to the system. What other apps might do (or not do) with those, - that's about those apps.
I am not the developer, and I don't know Aquamail code, but I think that this statement also stands:
In any case, what you are observing should not be related to Aquamail: the notifications are posted and stay as expected in the notifications bar. It is your notification app(s) and its interaction with the lockscreen.
There is a very
slim chance about Aquamail's
indirect involvement in that the type of notifications from Aquamail could be somehow different from those posted by other apps, and LLAL is not handling those notifications the same way.
While Kostya, Aquamail developer, might have some insights about that, the best course of resolving your problem would be to contact LLAL. Ask them why their app would remove a notification (some notifications, not all) from the screen lock
while the notification remains in the status bar (this is important to stress to them).
Please report here what their response would be.
PS. In that analogy above, there is also a possibility of your surveillance system being sabotaged by someone interrupting the cables between the system and the TV display. That would be your other apps (battery, memory, performance, ... optimizers). You are confident that you don't have any of those, so, we are not digging that way.
PPS. When you compare the notifications that disappear from the screenlock prematurely vs. those that do not disappear from there, is there any correlation with whether those notifications are
(a) for a single message or for multiple messages. (e.g. it stays for a single message but disappears for multiple messages, or vice versa)
And if you have Push enabled:
(b) from PUSH or from the scheduled sync (i.e. from the folders for which Push is not enabled, e.g. "Sent")
PPPS. I remember Kostya mentioning that in case if you had a pin-based security enabled in Aquamail, the notifications would not show on the lock screen (or something like that). But that is not the case, - because some of the notifications from Aquamail do appear in the LLAL screenlock and stay as expected.