On Mon, Jan 30, 2023 at 8:35 PM Mark Sapiro <mark@msapiro.net> wrote:
On 1/30/23 02:44, Odhiambo Washington wrote:
The documentation < https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/mta.ht...
says that I need to create /path/to/postfix-mailman.cfg containing: [postfix] transport_file_type: regex
Then append the path to the [mta] section of mailman.cfg, viz:
[mta] ... configuration: /path/to/postfix-mailman.cfg
That is exactly what I have done on my test platform, but I get the error below when creating a list. Perhaps I overlooked something? ... "/opt/mailman/venv/lib/python3.9/site-packages/mailman/mta/postfix.py", line 87, in __init__ self.postmap_command = mta_config.get('postfix', 'postmap_command') File "/usr/local/lib/python3.9/configparser.py", line 792, in get raise NoOptionError(option, section) configparser.NoOptionError: No option 'postmap_command' in section: 'postfix'
This is a bug. Whether it is a bug in documention or code is not completely clear. Current code requires there be a `postmap_command:` setting in the [postfix] configuration even though it isn't used if `transport_file_type:` is set to regex.
You can fix this in one of two ways. Either apply this patch ``` --- a/src/mailman/mta/postfix.py +++ b/src/mailman/mta/postfix.py @@ -84,9 +84,10 @@ class LMTP: def __init__(self): # Locate and read the Postfix specific configuration file. mta_config = external_configuration(config.mta.configuration) - self.postmap_command = mta_config.get('postfix', 'postmap_command') self.transport_file_type = mta_config.get( 'postfix', 'transport_file_type') + if self.transport_file_type == 'hash': + self.postmap_command = mta_config.get('postfix', 'postmap_command')
def create(self, mlist): """See `IMailTransportAgentLifecycle`.""" ``` (watch for possible wrapped lines in above) or add
postmap_command: unused
to /path/to/postfix-mailman.cfg.
Note however that hash tables for Postfix are more efficient than regex tables and the only reason we support regex tables is for a Docker container that doesn't have Postfix installed in the Mailman container.
So, if I understand this correctly, there is no need for the addition of this parameter: ``` configuration: /path/to/postfix-mailman.cfg ``` to the mta config block in mailman.cfg in a non-docker environment, or when only using hash tables?? -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)