-
Notifications
You must be signed in to change notification settings - Fork 4
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
Adding the possibility to use a third party milter without activating #1
base: develop
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,12 +137,14 @@ def load(self, hostname): | |
if (self["zimbraMilterServerEnabled"] == "TRUE"): | ||
milter = "inet:%s:%s" % (self["zimbraMilterBindAddress"],self["zimbraMilterBindPort"]) | ||
else: | ||
self["zimbraMtaSmtpdMilters"] = "" | ||
milter = None | ||
|
||
if self["zimbraMtaSmtpdMilters"] is not None and milter is not None: | ||
self["zimbraMtaSmtpdMilters"] = "%s, %s" % (self["zimbraMtaSmtpdMilters"], milter) | ||
elif self["zimbraMtaSmtpdMilters"] is None and milter is not None: | ||
self["zimbraMtaSmtpdMilters"] = milter | ||
elif self["zimbraMtaSmtpdMilters"] is not None and milter is None: | ||
self["zimbraMtaSmtpdMilters"] = "%s, %s" % (self["zimbraMtaSmtpdMilters"]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The template string is incorrect here (line 147). The template string is set to accept two strings ("%s, %s"), but only one is provided. This also seems a bit redundant, since the value is already set and this logic would just simply reset the self["zimbraMtaSmtpdMilters"] value with the value it already has. What would the purpose of the logic on line 146/147 be? |
||
|
||
if self["zimbraMtaHeaderChecks"] is not None: | ||
v = self["zimbraMtaHeaderChecks"] | ||
|
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.
milter
is set to None on line 136. No need set that again. Why not just remove lines 139 and 140?