rodcorsi / mattermail

Email Integration for Mattermost
BSD 3-Clause "New" or "Revised" License
147 stars 29 forks source link

(reopen) receive two message in small period of the time #82 #83

Open lfalkenburg opened 6 years ago

lfalkenburg commented 6 years ago

Still Problems. No I get random:

EROR Status irrsinn.de  18:36:29 Logout error err: <nil>imap/client: 2018/07/01 18:41:42 response has not been handled: &{jW7XuA NO  [] Error in IMAP command received by server.}                                                                 
imap/client: 2018/07/01 20:24:43 response has not been handled: &{tYBYxA NO  [] Error in IMAP command received by server.}
EROR Veeam Berolina 20:31:54 MailProviderImap.WaitNewMessage: Error on terminate idle Error in IMAP command received by server.
EROR Veeam Berolina 20:31:54 MatterMail.InitMatterMail Error on wait new message: terminate idle: Error in IMAP command received by server.
EROR Veeam Berolina 20:31:54 MailProviderImap.Terminate Error: short write imap/client: 2018/07/01 20:34:54 error reading response: read tcp 134.97.4.197:60628->134.97.4.220 imap/client: 2018/07/01 20:41:53 response has not been handled: &{7I3B3w NO  [] Error in IMAP command received by server.} imap/client: 2018/07/01 21:05:59 response has not been handled: &{PRPucg NO  [] Error in IMAP command received by server.}
Sorry for the mess, but this was printed right on the console.

Ah! And the filters not working correctly.

Here is the profile:

                {
                        "Name": "Status irrsinn.de",
                        "Channels": ["#status1"],

                        "Email": {
                            "ImapServer": "mail.irrsinn.de:143",
                            "Username": "status@irrsinn.de",
                            "Password": "XXX"
                        },

                        "Mattermost": {
                                "Server": "https://mm.irrsinn.de",
                                "Team": "irrsinnde",
                                "User": "XXX@irrsinn.de",
                                "Password": "XXX",
                                "UseAPIv3": false
                        },

                        "Filter": [
                                {"From": "support@CUSTOMER1.com", "Channels": ["#support-CUSTOMER1"]},
                                {"From": "@CUSTOMER2.eu", "Channels": ["#status-CUSTOMER2"]},
                                {"From": "vau-CUSTOMER3@irrsinn.de", "Channels": ["#status-vau-CUSTOMER3"]},
                                {"From": "veeam.CUSTOMER4@irrsinn.de", "Channels": ["#status-CUSTOMER4"]}
                        ]
                },

mattermail.log says:

DEBG Status irrsinn.de  21:30:57 MailProviderImap.WaitNewMessage
DEBG Status irrsinn.de  21:30:57 MailProviderImap.CheckConnection: Client state 6
DEBG Status irrsinn.de  21:30:57 MailProviderImap.WaitNewMessage: idle mode: true
DEBG Status irrsinn.de  21:30:57 xPNrEg CLOSE

DEBG Status irrsinn.de  21:30:57 xPNrEg OK mailbox closed.

DEBG Status irrsinn.de  21:30:57 MailProviderImap.selectMailBox: Select mailbox: INBOX
DEBG Status irrsinn.de  21:30:57 LRKRJA EXAMINE INBOX

DEBG Status irrsinn.de  21:30:57 * FLAGS ($NotJunk \Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS ()] No permanent flags permitted
* 340 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 485297284] Ok
* OK [MYRIGHTS "acdilrsw"] ACL
LRKRJA OK [READ-ONLY] Ok

DEBG Status irrsinn.de  21:30:57 QJOWSg IDLE

DEBG Status irrsinn.de  21:30:57 + entering idle mode

But thats wrong. Since the last time I deleted the contents in /data and restarted mattermail 19 new messages arrived at 'status(at)irrsinn.de'

rodcorsi commented 6 years ago

Observing at your first log I see the message short write this issue is open in #69