Hey folks! Since i did not find an introduction post i am doing an introduction here since this is my first post.
First of all thank you all for contributing to this amazing project. I am Irdi, i am a FLOSS hacktivist and a Linux sysadmin. I work mostly with Nextcloud, helping people move away from GAFAM. Lately i have been working with mailcow and it is amazing how easy the process of setting your mail server is with mailcow but maintenance and debugging is another thing which has taken me here, to the community.
I am not sure if i am in the right direction but im gonna try to explain and hopefully someone can point me into the right direction to solve the issue im encountering.
I use mailcow as mail server and Nextcloud Mail as a client and it works fine, but at least once a day i get an error that sync failed and as soon as i restart the mailcow server it all works again so i came to the conclusion that it must be something that has to be fixed on mailcow. I also realised that Dovecot is responsible for imap and sync (correct me if im wrong) but in the logs i can not find anything meaningful to help me solve the issue.
p.s i went through the posts but i could not find a similar issue reported before. If there was one please point me to it. Thanks a lot!
The error i get in Nextcloud (formated to make it easier to read).
{
"ExceptionType": "OCA\\Mail\\Exception\\ServiceException",
"Message": "Sync failed for 554:INBOX: Error connecting to mail server.",
"Code": 0,
"Trace": [
{
"file": "/var/www/html/custom_apps/mail/lib/Service/Sync/SyncService.php",
"line": 126,
"function": "sync",
"class": "OCA\\Mail\\Service\\Sync\\ImapToDbSynchronizer",
"type": "->",
"args": ["*** sensitive parameters replaced ***"]
},
{
"file": "/var/www/html/custom_apps/mail/lib/Controller/MailboxesController.php",
"line": 154,
"function": "syncMailbox",
"class": "OCA\\Mail\\Service\\Sync\\SyncService",
"type": "->",
"args": ["*** sensitive parameters replaced ***"]
},
{
"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
"line": 230,
"function": "sync",
"class": "OCA\\Mail\\Controller\\MailboxesController",
"type": "->",
"args": ["*** sensitive parameters replaced ***"]
},
{
"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
"line": 137,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [["OCA\\Mail\\Controller\\MailboxesController"],"sync"]
},
{
"file": "/var/www/html/lib/private/AppFramework/App.php",
"line": 183,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->",
"args": [["OCA\\Mail\\Controller\\MailboxesController"],"sync"]
},
{
"file": "/var/www/html/lib/private/Route/Router.php",
"line": 315,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::",
"args": ["OCA\\Mail\\Controller\\MailboxesController","sync",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["2660","mail.mailboxes.sync"]]
},
{
"file": "/var/www/html/lib/base.php",
"line": 1068,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->",
"args": ["/apps/mail/api/mailboxes/2660/sync"]
},
{
"file": "/var/www/html/index.php",
"line": 36,
"function": "handleRequest",
"class": "OC",
"type": "::",
"args": []
}
],
"File": "/var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php",
"Line": 263,
"Previous": {
"Exception": "Horde_Imap_Client_Exception",
"Message": "Error connecting to mail server.",
"Code": 11,
"Trace": [
{
"file": "/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
"line": 375,
"function": "_connect",
"class": "Horde_Imap_Client_Socket",
"type": "->",
"args": []
},
{
"file": "/var/www/html/custom_apps/mail/lib/IMAP/ImapClientRateLimitingDecorator.php",
"line": 73,
"function": "_login",
"class": "Horde_Imap_Client_Socket",
"type": "->",
"args": ["*** sensitive parameters replaced ***"]
},
// ... (more trace details)
{
"file": "/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php",
"line": 606
}
]
},
"Message": "Sync failed for 554:INBOX: Error connecting to mail server.",
"Exception": {},
"CustomMessage": "Sync failed for 554:INBOX: Error connecting to mail server."
}