freescout-help-desk / freescout

FreeScout — Free self-hosted help desk & shared mailbox (Zendesk / Help Scout alternative)
https://freescout.net
GNU Affero General Public License v3.0
3.05k stars 502 forks source link

Setup of fetching emails and sending emails. #1849

Closed shangong closed 2 years ago

shangong commented 2 years ago

Dear Freescout,

I am facing an issue with setup of fetching emails and sending emails.

I am able to send e-mails through the system, however could not receive any, although, the status of the mailbox shows "active" and "the connection is successful". In the system > status, the app is up to date, all the php extensions and functions and permissions are "OK". The queue:work is running in cron commands. I am using the browser version. using pop3 protocol with SSL encryption in fetching emails.

freescout-helpdesk commented 2 years ago

See https://github.com/freescout-helpdesk/freescout/wiki/Fetching-Emails#troubleshooting-fetching-issues

shang-ong-rp commented 2 years ago

Thank you for your fast reply FreeScout team!

freescout:fetch-emails | Last successful run: Mar 30, 2022 03:02 queue:work | Running

Alternatively cron job can be executed by requesting the following URL every minute (this method is not recommended as some features may not work as expected, use it at your own risk):
http://dsadsasad/system/cron/e2a5410a29feb231e5d978f7bc96f4e4

I noticed in other tickets, log files are requested to be attached. So I'm sending it here. [fetch-emails.log](https://github.com/freescout-helpdesk/freescout/files/8376708/fetch-emails.log) [laravel-2022-03-24.log](https://github.com/freescout-helpdesk/freescout/files/8376709/laravel-2022-03-24.log)
phonkala commented 2 years ago

I am having kinda same issues myself, suddenly fetching emails has stopped working. I have had it working before (checked last time like a month ago) and now after updating FreeScout it won't fetch mails anymore. I'm using POP3 with TLS and same settings have worked before, also exactly same settings work when added to Gmail accounts etc.

Though, for me testing the connection for fetching mails returns error: imap_open(): Couldn't open stream. POP3 connection broken in response. Sending mails works fine. Last time I checked fetching did also work and nothing has changed on my mail server, and pretty much nothing has changed with the FreeScout install except that I did upgrade it to latest just while ago.

For testing purposes, I did install another FreeScout (fresh) to another location and same problem. Has there been some changes during last month or so that could have broken this?

shang-ong-rp commented 2 years ago

@freescout-helpdesk please help if possible.

phonkala commented 2 years ago

A little update on this:

I managed to get the Fetching Emails > Check Connection to work by setting protocol to IMAP, port 993, encryption SSL and validate cert on. However I can not be using IMAP and for some reason no POP3 connection with any combination of settings work (even though I have not changed these settings from what they were when it used to work AND same settings that I am testing do work in email clients, gmail etc).

Weirdly, setting up connection with POP3, port 110, encryption none and cert validation off, returns error "imap_open(): Couldn't open stream {mail.myserver.com:110/pop3/novalidate-cert}. TLS/SSL failure for mail.myserver.com: SSL negotiation failed". Not sure if this is just error message issue, but sounds weird to get error about SSL negotiation when it's completely turned off.

freescout-helpdesk commented 2 years ago

You may need to find a developer to debug the issue on your end.

mywebhero commented 2 years ago

I've had this problem before: imap open(): Stream could not be opened. This has nothing to do with Freescout; the connection is being blocked by your server.

Check to see if your firewall is blocking the incoming connection from the FreeScout server.

phonkala commented 2 years ago

Thanks for the reply but it's 100% sure server isn't blocking it. I'm using same settings in all my other email clients and same settings even worked with FreeScout before.

I'll just stick to using IMAP for a while until I find the time to debug this. Could be something mail server related sure, but I don't think there has been any changes since it last worked fine, I just happened to notice at some point the notifications from FreeScout stopped coming even though the mail box had new content.

I've had this problem before: imap open(): Stream could not be opened. This has nothing to do with Freescout; the connection is being blocked by your server.

Check to see if your firewall is blocking the incoming connection from the FreeScout server.

phonkala commented 2 years ago

I managed to get POP3 finally working for fetching mails, and boy what a journey :) No settings were changed on the mail server.

So, what was the situation:

What was required:

  1. I had to clear the whole mailbox, nothing made sense before this, always errors.
  2. After that, using "Check connection" returned error about empty mailbox.
  3. Sent test mail to the mailbox using the test mail option from "Sending Email" settings page.
  4. Then needed to connect with the working IMAP settings and click Get folders -link. This did not work with anything but IMAP settings, with POP3 always got some error about "explode(); empty delimiter".
  5. After fetching the IMAP folders, saved the desired POP3 settings.
  6. Now it works.
freescout-helpdesk commented 2 years ago

Good to know.