I need to push a message notification to external system when they receive
   new emails from their mailbox**so I used the push_notification_lua plugin.
   My dovecot configuration file is as follows**
   plugin {
       ....
       push_notification_driver = dlog
       push_notification_driver2 =
   lua:file=/etc/dovecot/custom-lua/push-notification.lua
       push_lua_url =
   http://localhost:10421/internal/dovecot/email-notification/receive
   }
   protocol lda {
       mail_plugins = $mail_plugins sieve last_login push_notification
   mail_lua push_notification_lua
       ....
   }
   =============
   I print the 'event' param's value log in function
   'dovecot_lua_notify_event_message_new' in my lua script:
   function dovecot_lua_notify_event_message_new(ctx, event)
     dovecot.i_info("lua-push: event=" .. cjson.encode(event))
   end
   However, when I send a mail with multiple recivers, the notification event
   info seems to work abnormally.
   Sender: [email protected]
   Receivers: [email protected] ,
   [email protected]
   I found the two event object's field 'to_address' and 'to_display_name'
   value are same in /var/log/dovecot/lda.log.
   Please help me confirm if this is a bug?
   The log in /var/log/dovecot/lda.log like bellow:
   2025-08-06T09:38:11.383536+08:00 hxtmailtest-server dovecot:
   lda([email protected])<548522><EkAeFgOykmiqXggAfhwsfQ>:
   lua-push:
   
event={"snippet":"test!!","date":1754444290,"keywords":{},"to_display_name":"Zhaoqb","uid":19,"subject":"test","from_display_name":"","to_address":"[email protected]","tz":480,"mailbox":"INBOX","to":"Zhaoqb
   <[email protected]>, Wangzx7110\n
   
<[email protected]>","from":"[email protected]","message_id":"<[email protected]>","uid_validity":1752827738,"flags":{},"from_address":"[email protected]","name":"MessageNew"}
   2025-08-06T09:38:11.423272+08:00 hxtmailtest-server dovecot:
   lda([email protected])<548524><znZfFwOykmisXggAfhwsfQ>:
   lua-push:
   
event={"subject":"test","mailbox":"INBOX","flags":{},"snippet":"test!!","from":"[email protected]","date":1754444290,"from_address":"[email protected]","keywords":{},"uid_validity":1752634929,"to_display_name":"Zhaoqb","to":"Zhaoqb
   <[email protected]>, Wangzx7110\n
   
<[email protected]>","name":"MessageNew","from_display_name":"","tz":480,"to_address":"[email protected]","uid":39,"message_id":"<[email protected]>"}
   Thanks!

   [1][IMG] [2][email protected]
            [email protected]

References

   Visible links
   1. 
https://wx.mail.qq.com/home/index?t=readmail_businesscard_midpage&nocheck=true&name=3825634%40qq.com&icon=http%3A%2F%2Fthirdqq.qlogo.cn%2Fek_qqapp%2FAQDQOwNj96RlCSibl0JVGeJaehhNP5tKZUKkSGGL8CNot7tED7DrSmpibIg8JLQe8cvbNLIpcC%2F0&mail=3825634%40qq.com&code=QsTc3G-KwMxzTz26xHIB7TOJs8-3YxlGA36ReaLCxiatmT6GYC8zIiZfWTAZ-fO4BJl_SmthBzRhD5B6zGfd9Q
   2. 
https://wx.mail.qq.com/home/index?t=readmail_businesscard_midpage&nocheck=true&name=3825634%40qq.com&icon=http%3A%2F%2Fthirdqq.qlogo.cn%2Fek_qqapp%2FAQDQOwNj96RlCSibl0JVGeJaehhNP5tKZUKkSGGL8CNot7tED7DrSmpibIg8JLQe8cvbNLIpcC%2F0&mail=3825634%40qq.com&code=QsTc3G-KwMxzTz26xHIB7TOJs8-3YxlGA36ReaLCxiatmT6GYC8zIiZfWTAZ-fO4BJl_SmthBzRhD5B6zGfd9Q
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to