~sghctoma


#290 New email trigger not working 5 years ago

Comment by ~sghctoma on ~sircmpwn/aerc2

I've also run into this problem, and did some digging. There are two conditions for executing the new mail trigger (lib/msgstore.go@193):

  • the \Seen flag must no be set
  • the \Recent flag must be set

From what I've seen, GMail does not set the \Recent flag on any messages. I've logged out of all my clients (so that they don't unset the flag), sent myself a mail, and sent SELECT commands via socat; the RECENT count was always zero. I don't know if this is a bug in Gmail, or their IMAP implementation still does not support the \Recent flag, but this explains the lack of trigger execution.

I also have a question regarding new mail triggers: Was that a design decision that new mail triggers are only executed on messages arriving to the currently selected folder, or does it work this way because of some technical difficulty, performance reasons, etc.? I think this might be confusing and can be perceived as "not working".