st3fan/dovecot-xaps-plugin

Notification before sieve filtering

Closed this issue · 4 comments

Perhaps i have a misconfiguration, but i can't find it.
On my server i get notifications with xaps for mails sorted later by sieve filters.
Can anyone help me to get xaps after sieve?

Log-output:

Apr 13 14:06:32 mymailserver postfix/pickup[2129]: AD77E44DDA: uid=0 from=<csf@mymailserver.de>
Apr 13 14:06:32 mymailserver postfix/cleanup[3922]: AD77E44DDA: message-id=<20160413120632.AD77E44DDA@mymailserver.de>
Apr 13 14:06:32 mymailserver postfix/qmgr[31901]: AD77E44DDA: from=<csf@mymailserver.de>, size=600, nrcpt=1 (queue active)
Apr 13 14:06:48 mymailserver postfix/smtpd[3940]: connect from unknown[127.0.0.1]
Apr 13 14:06:48 mymailserver postfix/smtpd[3940]: 4E12136A29: client=unknown[127.0.0.1]
Apr 13 14:06:48 mymailserver postfix/cleanup[3922]: 4E12136A29: message-id=<20160413120632.AD77E44DDA@mymailserver.de>
Apr 13 14:06:48 mymailserver postfix/qmgr[31901]: 4E12136A29: from=<csf@mymailserver.de>, size=1304, nrcpt=1 (queue active)
Apr 13 14:06:48 mymailserver postfix/smtpd[3940]: disconnect from unknown[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Apr 13 14:06:48 mymailserver amavis[32217]: (32217-03) Passed CLEAN {RelayedInbound}, [127.0.0.1] <csf@mymailserver.de> -> <webmaster@mymailserver.de>, Message-ID: <20160413120632.AD77E44DDA@mymailserver.de>, mail_id: 7qyRJxAQHa1S, Hits: -1.901, size: 599, queued_as: 4E12136A29, 15513 ms
Apr 13 14:06:48 mymailserver postfix/lmtp[3928]: AD77E44DDA: to=<webmaster@mymailserver.de>, relay=127.0.0.1[127.0.0.1]:10024, delay=16, delays=0.14/0.02/0.02/16, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 4E12136A29)
Apr 13 14:06:48 mymailserver postfix/qmgr[31901]: AD77E44DDA: removed
Apr 13 14:06:48 mymailserver dovecot: lda(webmaster@mymailserver.de): Debug: xaps_plugin_init
Apr 13 14:06:48 mymailserver dovecot: lda(webmaster@mymailserver.de): Debug: xaps_transaction_begin
Apr 13 14:06:48 mymailserver dovecot: lda(webmaster@mymailserver.de): Debug: xaps_transaction_begin
Apr 13 14:06:48 mymailserver dovecot: lda(webmaster@mymailserver.de): Debug: xaps_save_finish
Apr 13 14:06:48 mymailserver dovecot: lda(webmaster@mymailserver.de): Debug: xaps_transaction_commit
Apr 13 14:06:48 mymailserver dovecot: lda(webmaster@mymailserver.de): sieve: msgid=<20160413120632.AD77E44DDA@mymailserver.de>: stored mail into mailbox 'INBOX'
Apr 13 14:06:48 mymailserver dovecot: lda: Debug: xaps_plugin_deinit
Apr 13 14:06:48 mymailserver postfix/pipe[3945]: 4E12136A29: to=<webmaster@mymailserver.de>, relay=dovecot, delay=0.13, delays=0.03/0.03/0/0.06, dsn=2.0.0, status=sent (delivered via dovecot service)
Apr 13 14:06:48 mymailserver postfix/qmgr[31901]: 4E12136A29: removed

dovecot config (snap):

protocols = imap lmtp sieve
protocol lmtp {
  mail_plugins = quota quota sieve xaps
  postmaster_address = postmaster@mymailserver.de
}
protocol lda {
  mail_plugins = sieve xaps
}
protocol imap {
  mail_max_userip_connections = 30
  mail_plugins = quota imap_quota antispam imap_xaps
}
protocol sieve {
  mail_max_userip_connections = 30
}

Hi,

I just checked on my Server. The postfix log looks exactly like yours:

Apr 13 14:48:13 mail dovecot: lda(me@myserver.com): Debug: xaps_plugin_init
Apr 13 14:48:13 mail dovecot: lda(me@myserver.com): Debug: xaps_transaction_begin
Apr 13 14:48:13 mail dovecot: lda(me@myserver.com): Debug: xaps_transaction_begin
Apr 13 14:48:13 mail dovecot: lda(me@myserver.com): Debug: xaps_save_finish
Apr 13 14:48:13 mail dovecot: lda(me@myserver.com): Debug: xaps_transaction_commit
Apr 13 14:48:13 mail dovecot: lda(me@myserver.com): sieve: msgid=<foobar@mail.sender.com>: stored mail into mailbox 'INBOX.foo.bar'
Apr 13 14:48:13 mail dovecot: lda(me@myserver.com): Debug: xaps_plugin_deinit
Apr 13 14:48:13 mail postfix/pipe[7892]: 5D3004380175: to=<me@myserver.com>, relay=dovecot, delay=0.2, delays=0.05/0.01/0/0.15, dsn=2.0.0, status=sent (delivered via dovecot service)
Apr 13 14:48:13 mail postfix/qmgr[786]: 5D3004380175: removed

But the deamons output looks like this:

2016/04/13 14:48:13 [DEBUG] Accepted a connection
2016/04/13 14:48:13 [DEBUG] Received request: NOTIFY dovecot-username="me@myserver.com"  dovecot-mailbox="INBOX.foo.bar"
2016/04/13 14:48:13 [DEBUG] Sending notification to 12345678-E668-4436-B9AC-EDEAE59BABABA / 56E361AC338FF0ABCDEF912345CB090CB4781538C5F318369F64BABF9AFF0AB456
2016/04/13 14:48:13 [DEBUG] Returning success:

So it correctly get's the folder of the moved message. How is the output of your deamon looking?

Thank you for your quick response heinemml!

My problem is that i get false notifications, because i get a notification for a mail that is sorted to trash for example. my iphone plays the notification sound, but i don't get the nofification icon on my startscreen, because trash isn't configured for push.

It would be great to only get a notification for mails really in folders i requested in mail push settings and not these "ghosts".

that should be the case. For example I don't get pushes when mails are sorted into Junk.

Have you checked in your daemon logs that it is really sending the Push? And what is the mentioned folder there?

Cannot reproduce. Please reopen if this issue still exists.
Thanks