Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

iliajie
Copy link
Collaborator

@iliajie iliajie commented Nov 20, 2024

@@ -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
Copy link
Collaborator

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

Copy link
Collaborator Author

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 &&
Copy link
Collaborator

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

Copy link
Collaborator Author

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...

@@ -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'};
Copy link
Collaborator

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

Copy link
Collaborator Author

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...

Copy link
Collaborator

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..

Copy link
Collaborator Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants