cannot bind to lmtp host address through lmtp port(OSError: [Errno 99] error while attempting to bind on address: cannot assign requested address)
i have successfully set up mailman3 instance by following the guide at https://gitlab.com/mailman/mailman-suite-doc/blob/master/source/install/virt... and from this mailing list. my setup uses an alias domain i.e the mail server is different from the lists server. I have successfully created an alias domain and mailing list through Postorius but I keep getting this error in syslog. OSError: [Errno 99] error while attempting to bind on address ('xxx.xx.xx.xx', 8024): cannot assign requested address. Even when I change the port number, I still get the same error Kindly assist.
here is my mailman.cfg config [paths.here] var_dir: /opt/mailman/mm/var
[mailman] layout: here site_owner: postmaster@mail.example.com
[database] class: mailman.database.postgresql.PostgreSQLDatabase url: postgres://mailman:#passwd@localhost/mailman
[archiver.prototype] enable: yes
# For the HyperKitty archiver. [archiver.hyperkitty] class: mailman_hyperkitty.Archiver enable: yes configuration: /opt/mailman/mm/mailman-hyperkitty.cfg
[shell] history_file: $var_dir/history.py
[mta] verp_confirmations: yes verp_personalized_deliveries: yes verp_delivery_interval: 1 incoming: mailman.mta.postfix.LMTP outgoing: mailman.mta.deliver.deliver lmtp_host: mail.example.com lmtp_port: 8024 smtp_host: mail.example.com smtp_port: 25 configuration: python:mailman.config.postfix recipient_delimiter = + unknown_local_recipient_reject_code = 550 owner_request_special = no
POSTFIX_STYLE_VIRTUAL_DOMAINS= ['example.com']
/etc/mailman3/settings.py file is as follows from mailman_web.settings.base import * from mailman_web.settings.mailman import * ADMINS = ( ('Mailman Suite Admin', 'root@localhost'), ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'mailmanweb', 'USER': 'mailman', # TODO: Replace this with the password. 'PASSWORD': 'passwd', 'HOST': 'localhost', 'PORT': '5432', } } STATIC_ROOT = '/opt/mailman/web/static' LOGGING['handlers']['file']['filename'] = '/opt/mailman/web/logs/mailmanweb.log' ALLOWED_HOSTS = [ 'localhost', 'lists.example.com', 'mail.example.com', # Archiving API from Mailman, keep it. ] SITE_ID = 1 SECRET_KEY = 'key MAILMAN_ARCHIVER_KEY = 'key DEFAULT_FROM_EMAIL = 'postmaster@example.com' SERVER_EMAIL = 'postmaster@example.com' HAYSTACK_CONNECTIONS = { 'default': { 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', 'PATH': os.path.join(BASE_DIR, "fulltext_index"), }, }
/etc/postfix/main.cf is as follows smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no append_dot_mydomain = no readme_directory = no compatibility_level = 2 smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydomain = example.com myhostname = lists.example.com mydestination = $myhostname, localhost.$mydomain, localhost relayhost = mail.example.com myorigin = $mydomain mynetworks = 127.0.0.0/8, 10.0.0.0, 192.0.0.1, [::ffff:127.0.0.0]/104 [::1]/128 mynetworks_style = subnet mailbox_size_limit = 4096000000 #message_size_limit = 2048000000 recipient_delimiter = + inet_interfaces = all #inet_protocols = all inet_protocols = ipv4 unknown_local_recipient_reject_code = 550 owner_request_special = no virtual_mailbox_domains = example.com virtual_mailbox_base = /var/vmail virtual_uid_maps = static:20000 virtual_gid_maps = static:20000 transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp local_recipient_maps = proxy:unix:passwd.byname $alias_maps hash:/opt/mailman/mm/var/data/postfix_lmtp relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains virtual_alias_maps = hash:/opt/mailman/mm/var/data/postfix_vmap
postfix domains as follows: lists.example.com example.com
postfix lmtp as follows: testlist@lists.example.com lmtp:[mail.example.com]:8024 testlist-bounces@lists.example.com lmtp:[mail.example.com]:8024 testlist-confirm@lists.example.com lmtp:[mail.example.com]:8024
postfix vmap as follows: testlist@example.com nmutest@lists.example.com testlist-bounces@example.com nmutest-bounces@lists.example.com testlist-confirm@example.com nmutest-confirm@lists.example.com
On 10/18/22 11:28, Paul Ssekamatte via Mailman-users wrote:
i have successfully set up mailman3 instance by following the guide at https://gitlab.com/mailman/mailman-suite-doc/blob/master/source/install/virt... and from this mailing list. my setup uses an alias domain i.e the mail server is different from the lists server.
That is not what alias domains are for. You do not want an alias domain.
I have successfully created an alias domain and mailing list through Postorius but I keep getting this error in syslog. OSError: [Errno 99] error while attempting to bind on address ('xxx.xx.xx.xx', 8024): cannot assign requested address. Even when I change the port number, I still get the same error Kindly assist.
First, remove the Alias Domain from your domains.
here is my mailman.cfg config [paths.here] var_dir: /opt/mailman/mm/var
[mailman] layout: here site_owner: postmaster@mail.example.com
[database] class: mailman.database.postgresql.PostgreSQLDatabase url: postgres://mailman:#passwd@localhost/mailman
[archiver.prototype] enable: yes
# For the HyperKitty archiver. [archiver.hyperkitty] class: mailman_hyperkitty.Archiver enable: yes configuration: /opt/mailman/mm/mailman-hyperkitty.cfg
[shell] history_file: $var_dir/history.py
[mta] verp_confirmations: yes verp_personalized_deliveries: yes verp_delivery_interval: 1 incoming: mailman.mta.postfix.LMTP outgoing: mailman.mta.deliver.deliver lmtp_host: mail.example.com
The above is wrong. You want the default lmtp_host: 127.0.0.1
lmtp_port: 8024 smtp_host: mail.example.com
smtp_host should be the mail server, not the list host. Is it?
smtp_port: 25 configuration: python:mailman.config.postfix
These next 3 do not belong in mailman.cfg. They are Postfix main.cf settings:
recipient_delimiter = + unknown_local_recipient_reject_code = 550 owner_request_special = no
and this next one is a Mailman 2.1 mm_cfg.py directive and is not for Mailman 3.
POSTFIX_STYLE_VIRTUAL_DOMAINS= ['example.com']
/etc/mailman3/settings.py file is as follows
not relevant for this issue.
/etc/postfix/main.cf is as follows smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no append_dot_mydomain = no readme_directory = no compatibility_level = 2 smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydomain = example.com myhostname = lists.example.com mydestination = $myhostname, localhost.$mydomain, localhost relayhost = mail.example.com myorigin = $mydomain mynetworks = 127.0.0.0/8, 10.0.0.0, 192.0.0.1, [::ffff:127.0.0.0]/104 [::1]/128 mynetworks_style = subnet mailbox_size_limit = 4096000000 #message_size_limit = 2048000000 recipient_delimiter = + inet_interfaces = all #inet_protocols = all inet_protocols = ipv4 unknown_local_recipient_reject_code = 550 owner_request_special = no virtual_mailbox_domains = example.com
You probably don't want this, at least not if the mailman server is example.com
virtual_mailbox_base = /var/vmail virtual_uid_maps = static:20000 virtual_gid_maps = static:20000 transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp local_recipient_maps = proxy:unix:passwd.byname $alias_maps hash:/opt/mailman/mm/var/data/postfix_lmtp relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains virtual_alias_maps = hash:/opt/mailman/mm/var/data/postfix_vmap
and you don't want this virtual_alias_maps.
postfix domains as follows: lists.example.com example.com
postfix lmtp as follows: testlist@lists.example.com lmtp:[mail.example.com]:8024 testlist-bounces@lists.example.com lmtp:[mail.example.com]:8024 testlist-confirm@lists.example.com lmtp:[mail.example.com]:8024
The host in lmtp: is the Mailman server.
postfix vmap as follows: testlist@example.com nmutest@lists.example.com testlist-bounces@example.com nmutest-bounces@lists.example.com testlist-confirm@example.com nmutest-confirm@lists.example.com
You don't want that at all.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
thank you for your guidance. i managed to get it to work. alias domain was taking me in a wrong direction
participants (2)
-
Mark Sapiro
-
Paul Ssekamatte