Closed diver2567 closed 1 month ago
Which port and encryption method do you use for the imap connection?
Which port and encryption method do you use for the imap connection?
Hi Antedebaas, thank you for the response on this.
I had this set to IMAP 993 SSL, I also tried 143 non SSL but that did not work either.
IMAP is working correctly, I've been testing parsemarc's docker version however it's a big docker for a small operation and ideally would like to use your one as it contains the login page for security.
Let me know if there's anything else I can add.
Could you try 993 using starttls?
Could you try 993 using starttls?
I've spun up parsecmarc dockerized which seems to be working okay.
How do you state starttls within the software? Originally I thought it would be a IMAP issue but given the parsec one is working it would seem it something on the software?
Thanks again and apologises for the delay.
I think there is something wrong with the way I connect to the mailserver. But since it works on my server I don’t see what’s wrong. I need to investigate this further
@tobsowo could you let me know what your authentication security was in #51 ? (or your desired level as i remember) i want to take that along with this issue
Note to self. Try encoding
This is what I see on my mail server log
2024-06-25T00:42:55.281118Z INFO session{instance="smtp" protocol=Smtp remote.ip="178.xxx.xxx.xx" remote.port=59033}: smtp::inbound::ehlo: context="ehlo" event="reject" reason="invalid" domain="User"
@tobsowo what port are you using with what encryption that does not work with this project
587 & 993
@tobsowo @diver2567
And with what encryption/ssl/tls settings?
and what is the value of MAILBOX_CONNECTION in the .env.local file?
I just checked and I do not have any MAILBOX_CONNECTION value. WHat value do I add?
/var/www/html/.env.local will always contain that line. It can’t work without it and is auto generated on container startup
@antedebaas another thing is this, before now I uses WildDuck for mail server but since I switched to Stalwart I have not been able to connect my mailbox.
Maybe you could install and try in your environment.
I had the same issue for Exchange 2016, resulting in an error message like the one reported. In my case it was some hidden charset issue. I've fixed that by patching the getreportsfrommailbox-command, function "open_mailbox" and adding a charset switch to it. Don't know if this helps here or maybe should be implemented in the app itself, kinda hacky but it works here.
try {
retry:
$mail_ids = $mailbox->searchMailbox('UNSEEN');
} catch (\Exception $e) {
if (strpos($e, " [BADCHARSET (US-ASCII)]")) {
$oldEncoding = $mailbox->getServerEncoding();
$mailbox->setServerEncoding('US-ASCII');
$newEncoding = $mailbox->getServerEncoding();
$log = new Logs;
$log->setTime(new \DateTime);
$log->setMessage("Encoding changed dynamically from {$oldEncoding} to {$newEncoding}");
$this->em->persist($log);
$this->em->flush();
goto retry;
} else {
error_log($e);
throw $e;
}
}
Produces encoding messages in log like
Encoding changed dynamically from UTF-8 to US-ASCII
Since exchange 2016 is out of support by next year I’m not gonna put any effort into this.
Are you using the Docker image?
Database used
Error Messages 2024/06/07 09:41:29 [error] 19#19: *3 FastCGI sent in stderr: "PHP message: [critical] Error thrown while running command "app:getreportsfrommailbox". Message: "Could not search mailbox!"" while reading response header from upstream, client: 10.132.34.57, server: _, request: "GET /reports/checkmailnow HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:",
Steps to Reproduce Please provide detailed steps to reproduce the problem: Start Docker Image with docker-compose.yml file modified for IMAP and MYSQL. Open panel interface and create admin account. Login to admin account and click Check Mailbox (then the above error is shown within the output when performing docker compose up (rather then -d).
Expected behavior Reads mailbox and provides output into the panel.
Environment (please complete the following information):