Koozali.org: home of the SME Server

Obsolete Releases => SME Server 9.x => Topic started by: p-jones on October 28, 2017, 07:32:57 AM

Title: IMAP and IMAPS Setting not surviving reboot
Post by: p-jones on October 28, 2017, 07:32:57 AM
Hi

I have an issue with IMAPS not holding its settings after reboot. Have set IMAPS from the email tab in server manager but after a reboot or reconfigure / reboot it reverts back to IMAP. It is a new build of V9.2, fully updated.

If I set IMAPS without rebooting, all seems to function as expected until rebooting

I dont think this is a bug because it is not happening on others systems I have tried loading and I can find no other references to this when searching the forums or the bug tracker.

I am not sure where to go or how to resolve this and at this point, doing a clean install is not really a possibility. Any assistance would be gratefully appreciated.

Peter
Title: Re: IMAP and IMAPS Setting not surviving reboot
Post by: mmccarn on October 28, 2017, 12:37:28 PM
What setting are you trying to implement, and what isn't working?

It looks like some of the IMAP settings have not been completely migrated to support dovecot - possibly because dovecot includes enhanced security by default.

If you want to see "connection refused" when you telnet to port 143 from the LAN, this seems to work:
Code: [Select]
config setprop imap access localhost
signal-event email-update

You can add a setting to /etc/dovecot.conf for "disable_plaintext_auth = yes" using a db variable, but that may cause other problems:
Code: [Select]
config setprop imap AllowPlainText disabled
signal-event email-update

(You can un-do the mods shown above using the commands below)
Code: [Select]
#restore default for imap 'access'
config setprop imap access private
#
# restore default dovecot config for plain text auth
config delprop imap AllowPlainText
#
# activate changes
signal-event email-update

There's a setting in /etc/dovecot/conf.d/10-ssl.conf to require ssl, but that setting does not seem to be templated.  Change it by editing the file directly and restarting dovecot:
Code: [Select]
sed -i s/\#ssl\ \=\ yes/ssl\ \=\ required/ /etc/dovecot/conf.d/10-ssl.conf
sv t dovecot

(Undo...)
Code: [Select]
sed -i s/ssl\ \=\ required/\#ssl\ \=\ yes/  /etc/dovecot/conf.d/10-ssl.conf
sv t dovecot
Title: Re: IMAP and IMAPS Setting not surviving reboot
Post by: p-jones on October 28, 2017, 06:26:57 PM
Thanks for the reply.

The setting I am trying to make stick is IMAP Server access: Allow Public and Private
Title: Re: IMAP and IMAPS Setting not surviving reboot
Post by: Jean-Philippe Pialasse on October 29, 2017, 04:32:53 AM
What says the log when you set it?

Code: [Select]
tail /var/log/messages
Is there any template custom ?

Code: [Select]
/sbin/e-smith/audittools/templates
Title: Re: IMAP and IMAPS Setting not surviving reboot
Post by: p-jones on October 29, 2017, 09:20:56 AM
To mmcarn

manually editing as you described did NOT resolve the issue and the settings reverted after reconfiguration / reboot but not after restarting the dovecot service


To Jean-Philippe Pialasse

Log shows
Oct 29 21:13:00 server /etc/e-smith/web/panels/manager/cgi-bin/emailsettings[3623]: /home/e-smith/db/configuration: OLD imaps=service|TCPPort|993|access|private|status|enabled
Oct 29 21:13:00 server /etc/e-smith/web/panels/manager/cgi-bin/emailsettings[3623]: /home/e-smith/db/configuration: NEW imaps=service|TCPPort|993|access|public|status|enabled
Oct 29 21:13:00 server esmith::event[3624]: Processing event: email-update


And there are no custom templates


Title: Re: IMAP and IMAPS Setting not surviving reboot
Post by: Jean-Philippe Pialasse on October 31, 2017, 04:15:00 AM
thank you
also, can you give us the result of

Code: [Select]
# config get SystemMode
my guess would be

Code: [Select]
servergateway-private
Title: Re: IMAP and IMAPS Setting not surviving reboot
Post by: p-jones on October 31, 2017, 06:28:07 AM
Jean-Philippe Pialasse

Your guess was absolutely correct.

Based on your guess, it also tells me what I need to do to resolve the issue. I will action and report back.

Thank You.  merci beaucoup
Title: Re: IMAP and IMAPS Setting not surviving reboot
Post by: Jean-Philippe Pialasse on October 31, 2017, 06:46:23 AM
P-jones,

Happy  to help !

As you guessed this is not a bug, and you are part of the numerous people who makes me feel that this "servergateway-private" mode is not a good idea ;)
Title: Re: IMAP and IMAPS Setting not surviving reboot
Post by: p-jones on October 31, 2017, 06:49:35 AM
It is a "fat-finger" problem and despite many checks, I missed my own mistake. My bad.

Will reconfigure and mark as resolved tomorrow.

Peter
Title: [RESOLVED] IMAP and IMAPS Setting not surviving reboot
Post by: p-jones on October 31, 2017, 09:14:39 AM
Administrator Stupidity.

Problem as identified by Jean-Philippe Pialasse