IMAP services not working

Operating system |Ubuntu Linux 20.04.6|
Webmin version |2.111|
Usermin version |2.010|
Virtualmin version |7.10.0|
Authentic theme version |21.10|
Kernel and CPU |Linux 5.4.0-192-generic on x86_64|
Processor information |AMD EPYC-Milan Processor, 2 cores
Package updates |[All installed packages are up to date]

I have not been able to connect to my mail server for some time since doing a large package update.

I started looking at the virtualmin config via the dashboard link and received several errors. each time I resolved one, another came up. I have had to reinstall several packages to resolve the situation. The config check is now coming up clean but I still cannot start the dovecot server.

When I try to install dovecot it tells me there is no installation candidate so how do I get my dovecot server installed and working again please?

Geoff

When I go to usermin I get this message:

*An error occurred listing mail in this folder : 0 failed to IPv6 connect to localhost :143 : *
Connection refused

Log in as root into your terminal and fire this: /etc/init.d/dovecot start

Forget about my previous response. I just read there’s no Dovecot installed. How do you try to install Dovecot? Try sudo apt install dovecot-imapd dovecot-pop3d

Based on your previous post, it sounds like you ran apt autoremove after removing the Virtualmin stack package, so the entirety of the stack was no longer depended on and no longer considered needed. That’s kind of a catastrophic thing to do.

You may be able to reinstall Dovecot and then run:

virtualmin config-system --include Dovecot

That makes a couple of config changes for use with Virtualmin and starts/enables the service.

I’d guess you’ve got other broken stuff. Again, kinda catastrophic to run autoremove after the stack package has been removed, if you’re not paying attention to what packages are being removed. An update alone would not have done this.

Thanks for the responses.

Honest Joe, I did nothing other than upgrade from the dashboard.

I think that

/etc/init.d/dovecot start

Is the link from the dashboard to restart the server and that is not working. It also does not work from command line. When I run

/etc/init.d/dovecot status

I get this error message:

*root@electra:~# /etc/init.d/dovecot status
● dovecot.service - Dovecot IMAP/POP3 email server

  • Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; vendor preset: enabled)*
    
  • Active: failed (Result: exit-code) since Fri 2024-08-16 06:04:23 UTC; 16s ago*
    
  •   Docs: man:dovecot(1)*
    
  •         http://wiki2.dovecot.org/*
    
  • Process: 107831 ExecStart=/usr/sbin/dovecot -F (code=exited, status=89)*
  • Main PID: 107831 (code=exited, status=89)*

Aug 16 06:04:23 electra systemd[1]: Started Dovecot IMAP/POP3 email server.
Aug 16 06:04:23 electra dovecot[107831]: doveconf: Fatal: Error in configuration file /etc/dovecot/do…ted ‘}’… ‘}’
Aug 16 06:04:23 electra systemd[1]: dovecot.service: Main process exited, c…/n/a
Aug 16 06:04:23 electra systemd[1]: dovecot.service: Failed with result ‘ex…de’.
Hint: Some lines were ellipsized, use -l to show in full.


However, there are no other messages to explain the error (that I can see).

I tried the

virtualmin config-system --include Dovecot

then restarted and read the status but it is the same so I am a bit stuck.

Geoff

Should I remove dovecot and then reinstall it?

whatever the expanded section of the above line is should point to the error, so from this dovecot is misconfigured there will be no need to reinstall dovecot just find out what the misconfiguration is and fix it but I would guess at an incorrect path to ( or missing) the ssl certificate

1 Like

Anything in the mail.log?

Might be a bad paste of the error should there be a line number where the error is happening, can you check.

It does not show it but that is the expanded result using the -l flag. I normally get a line number and that is how I find and resolve the issue but no line number has been given.

I am at work now but will look at the mail log tonight to see if there are any more clues.

Will also check the certificate links.

Thanks

Geoff

All I can find from the Apache error log is this

[Tue Aug 13 11:20:37.129427 2024] [ssl:error] [pid 321504:tid 140198050518784] [client 199.45.155.108:36400] AH02032: Hostname mail.xsxtc.uk provided via SNI and hostname 77.68.100.23 provided via HTTP have no compatible SSL setup
[Tue Aug 13 09:43:13.308862 2024] [core:error] [pid 321502:tid 140198176343808] [client 84.46.241.215:36398] AH00126: Invalid URI in request POST /cgi-bin/…/…/…/…/…/…/…/…/…/…/bin/sh HTTP/1.1

I have checked that the certificate is valid and it is.

I have removed it from all services then reinstated it but still the do vector server will not start.

I am not really sure what I should be looking for or where.

All sorted thank you.

I ran service dovecot status and this time it showed me the file and the line where the error was. Apparently it was a superfluous “}” on the line. I commented it out and the server started. All seems to be running fine again.

No idea what put it there but it has been sorted which is the main thing.

Thanks everyone for your help.

Geoff