-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Postfix dependency #964
base: master
Are you sure you want to change the base?
Conversation
@@ -1,5 +1,5 @@ | |||
line1=Server settings,11 | |||
mail_system=Mail server to configure,4,1-Sendmail,0-Postfix,2-Qmail,3-Detect automatically | |||
mail_system=Mail server to configure,4,0-Postfix,1-Sendmail,2-Qmail,3-Detect automatically,99-None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best to not re-order these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best to not re-order these
But I want to have it re-ordered — we have to re-order...
Best to put the "None" mode at the end of the list, because that way the code that merges in translation will work better.
I think it’s fine. Besides, my language manager script still doesn’t support translating module.info
files. I never got around to implementing that. If I had, the order wouldn’t matter though.
pro-tip-lib.pl
Outdated
@@ -301,7 +301,7 @@ sub menu_link_pro_tips | |||
'cat' => 'logs', | |||
'url' => "$virtualmin_docs_pro/#edit_maillog", | |||
'skip' => !($config{'mail'} && | |||
$mail_system <= 1 && | |||
&indexof($mail_system, 0, 1) != -1 && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use of indexof here is confusing! Instead just compare $mail_system to 0 or 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reverted this, and one more below, because it seems you prefer comparing it using the >
check instead...
virtual-server-lib.pl
Outdated
@@ -370,7 +370,7 @@ | |||
|
|||
$acme_providers_dir = "$module_config_directory/acme"; | |||
|
|||
$mail_system = $config{'mail_system'}; | |||
$mail_system = $config{'mail_system'} == 99 ? -1 : $config{'mail_system'}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just leave it at 99, it's cleaner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are more cases to fix, as there are places where >
is being used in comparisons...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really? I found and fixed one, but didn't see any others..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really?
Yeah, search for mail_system.*?>
in VIM across the project.
I found and fixed one, but didn't see any others..
Ah, then there’s one more left in ratelimit-lib.pl
. Also, previously the check was $mail_system > 1
, but now the latest patch has it checked as $mail_system == 0 || $mail_system == 1
— how can that be right?
As discussed here to replace #944
https://github.com/virtualmin/virtualmin-gpl/pull/944/files#r1849409264