froxlor / Froxlor

The server administration software for your needs - The official Froxlor development Git repository
http://www.froxlor.org
GNU General Public License v2.0
1.62k stars 455 forks source link

Rename dovecot config file generated be renew hook to ensure it gets after default froxlor config file #1233

Closed z-e-r-0-t closed 6 months ago

z-e-r-0-t commented 6 months ago

Description

Currently generated file names by Froxlor for Dovecot using Debian Bookworm:

Dovecot includes all conf.d/*.conf files like this dovecot.conf:

The filenames are first sorted by their ASCII value and parsed in that order.

. == 0x2e - == 0x2d

Thats why 99-froxlor-ssl.conf gets parsed before 99-froxlor.conf and the TLS values from renew hook might get overwritten.

Solution

Choose filename for file generated by rename hook that gets parsed after default Froxlor config file.

Type of change

Test Configuration:

Checklist:

d00p commented 6 months ago

Thanks for the contribution, although as stated in the code, it's not even final this way, as this might to be a setting (at least for the path). Just to be totally sure - would using 999-froxlor... ensure it's read in last?

z-e-r-0-t commented 6 months ago

Yes you are right, using 999-froxlor... works. Just verified this. Just depends if we want to break the 2 digit style that is used until now.

d00p commented 6 months ago

We could also use 99-zzz-froxlor but I think that's looks crappy :p

z-e-r-0-t commented 6 months ago

Yeah whatever ^^. I just tripped over this while testing and this PR is a quick (and dirty) workaround. As long as it is fixed in the final release (maybe with a setting for path), feel free to drop this PR.

d00p commented 6 months ago

na i'll take it for now as it fixes the correct include order, thanks again :)