Can one try fetching mail in a terminal? (Debian. To debug WTH doesn't work)

Hello,

- The context of my enquiry:
Mail delivery is a dreadful foe on my new Debian 10 dedi. I am having again, for a new virtual server and its website, this weird issue in which thunderbird manages to get the mail in IMAP, no issues, while it won’t work on android apps (Gmail, Outlook), with the report the certificate doesn’t match the website. Gmail last shows mails that inbox received last May, over a month ago, so it still used to work at that time. Terminal commands like service dovecot status, and restart, display no problems, all good.
Having made sure letsencrypt was renewed manually recently, not having had to add an exception in thunderbird and using exactly the same server/settings/username/passwords information, I’m fairly confident it shouldn’t bug like that.

- My actual enquiry:
Please, would you know if there is a way to replicate in a terminal (a shell, I use SuperPutty at home) what a mail client does, when it fetches email by IMAP?
It’s a Debian 10 server, Virtualmin open source latest stable, Dovecot + Postfix.
This way, hopefully, I would obtain a usable error report, instead of the vague messages given by the Gmail and Outlook apps.
And with a usable error report, who knows, let’s be crazy, it’s possible I may finally manage to fix that issue, sigh.

Well, this is it. I suspect it simply won’t work with terminal commands, but I have little to lose in asking here.
Thank you very much if you can tell me!

Kind regards from France

Bonjour M. @OliverF and namaste from India.

You might be able to get the info you want by looking at the logs via Webmin -> System -> System Logs.

You could increase (temporarily) the verbosity of a log file till you get the level of info that you need to diagnose the issue.

I have found the android gmail app to be really problematic and most of the time wont sync imap for me.
Outlook on android works ok though.

I use debian 9, however i have had the same peoblems as you with shared ipaddress client domain emails. Pain in the backside and i never had this problem with cpanel but i dont really know why.

… no issues, while it won’t work on android apps (Gmail, Outlook), with the report the certificate doesn’t match the website.

This issue is being addressed at the moment, and be fixed for the next Virtualmin release.

Meanwhile, you can manually edit your /etc/dovecot/dovecot.conf file and change ssl.cert to ssl.combined to make sure that CA certificate is also presented.

And, to be thorough and answer the testing question…you can’t test encrypted IMAP/POP directly with a terminal, because the SSL connection has to be setup first. You can test that, however. The dovecot docs cover how: https://wiki.dovecot.org/SSL/DovecotConfiguration#Testing

I suspect you could also setup a tunnel and use the usual POP/IMAP interactions…but, I usually find the answers to my questions in the server mail log for those kinds of questions. The server side knows a lot more about why an interaction failed, usually.

1 Like

Thank you for the replies, everyone, I’m grateful! :slight_smile:

  • the error logs: I should have thought of that. Though, as I host plenty of sites for plenty of people (friends, family, work relations, myself), the total traffic isn’t low and well-filled logs are hard to browse when you don’t know exactly what to seek. I should have searched, instead, what error reports for that particular problem would have looked like…

  • Duly noting about terminal usage for dovecot and ssl, thank you

  • so it was actually a virtualmin bug?!? YES! YES! YESSSSS! Then it’s not my problem! Peace of mind!!
    Apologies to find mirth in that being a problem affecting other people, but it means it’s one burden off my shoulders, and it’s not my server’s fault :smiley:
    Searching the issues tracker, I found no recent relevant mention of gmail or android, so I imagined that was just me and my server. I’m glad I have been wrong.
    I’ll also apply the recommended patch, one less nagger in my inbox after this, so thank you Ilia for this too

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.