plesk / centos2alma

CentOS 7 to AlmaLinux 8 conversion tool
Apache License 2.0
38 stars 10 forks source link

Conversion fails in phase no. 1 when Courier-IMAP is used and system has never seen Dovecot #217

Closed Bitpalast closed 7 months ago

Bitpalast commented 7 months ago

Describe the bug In all patched versions since action #377 https://github.com/plesk/centos2alma/actions/runs/8137628831 the phase no. 1 fails in an early stage when the server has never before seen Dovecot, but is running with Courier-Imap:

2024-03-23 11:36:49,152 - ERROR - Failed: increase Dovecot DH parameters size to 2048 bits!. The reason: 'dhparams_size'
2024-03-23 11:36:50,482 - ERROR - centos2alma process has been failed. Error: Failed: increase Dovecot DH parameters size to 2048 bits!. The reason: 'dhparams_size'

The script will need to determine whether Dovecot or Courier is used and omit the update attempt of dhparams-size on Dovecot if Dovecot directories do not exist.

Workaround 1) Update key sizes manually by running

# plesk sbin sslmng --service courier-imap --strong-dh --dhparams-size=2048
# service courier-imapd restart

2) Then use an earlier version of the centos2alma script that does not include the update, restart the failed conversion with # ./centos2alma --start

Additional information The Dovecot DH parameters update was introduced, because in Alma 8, key sizes of 1024 are unsupported so that login attempts to mailboxes will fail on Alma 8 after conversion. The dhparams-size must be at least 2048 bits.

SandakovMM commented 7 months ago

The problem should be fixed in scope of #222