My problem is similar to the one exposed on these threads but they do not give a solution:
I am trying to install Mailman3 on a Debian12/Virtualmin server.
The full installation is OK, I have access to Postorius and I can create a list, etc…
But, when sending a mail to a mailing list, I always get a message “Recipient address rejected: User unknown in virtual alias table;”.
As in the Mailman3 documentation, I added the following lines to the “main.cf” file, but if I understand correctly, they are not compatible with a Postfix configured with virtual hosts (and with Dovecot?).
Reflecting back I know I used dpkg-reconfigure on postifx and I think mailman. This WILL mess up your Virtualmin a bit. Specifically the procmail command.
If I were to do this again I think I’d set up a clean server with mailman first and get that working and then install Virtualmin.
Sorry I didn’t keep better (read ANY) notes.
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
delay_warning_time = 4h
readme_directory = no
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem
smtpd_tls_key_file = /etc/postfix/postfix.key.pem
smtpd_tls_security_level = may
smtp_tls_CApath=/etc/ssl/certs
smtp_tls_security_level = dane
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = cisnetadmin.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = main.cisnetadmin.com, localhost.$mydomain
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
sender_dependent_default_transport_maps = hash:/etc/postfix/dependent
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_unauth_destination
reject_invalid_hostname
reject_non_fqdn_sender
reject_unknown_sender_domain
reject_unknown_recipient_domain
# check_policy_service unix:private/policyd-spf
#policyd-spf_time_limit = 3600
smtp_dns_support_level = dnssec
smtp_host_lookup = dns
allow_percent_hack = no
resolve_dequoted_address = no
tls_server_sni_maps = hash:/etc/postfix/sni_map
# Support the default VERP delimiter.
#recipient_delimiter = +
unknown_local_recipient_reject_code = 550
owner_request_special = no
transport_maps = hash:/var/lib/mailman3/data/postfix_lmtp
local_recipient_maps =
hash:/var/lib/mailman3/data/postfix_lmtp
relay_domains =
hash:/var/lib/mailman3/data/postfix_domains
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
milter_default_action = accept
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891
smtpd_tls_CAfile = /etc/postfix/postfix.ca.pem
Thanks for your answer @ID10T,
“Unfortunately” I have exactly the same main.cf as you so the solution is not here. I think the explanation of why it works for you is in the dpkg-reconfigure that you did on postfix. For my part, I am on a production server with virtual hosts and I need to find a way to make Mailman3 work without changing the postfix configuration made by Virtualmin.
If anyone has already managed to do this, I’m very interested
There is a Virtualmin plugin for Mailman (unsupported, but provided by the Virtualmin team), but I keep getting database errors trying to convince Mailman to install, so I haven’t even gotten that far yet…
When I get some free time maybe I’ll do a virtual machine install of Debian 12 and see if I can remember what I did. Won’t be anytime soon though.
Is your /var/lib/mailman3/data/postfix_lmtp file being created?
# AUTOMATICALLY GENERATED BY MAILMAN ON 2024-08-15 17:03:41
#
# This file is generated by Mailman, and is kept in sync with the binary hash
# file. YOU SHOULD NOT MANUALLY EDIT THIS FILE unless you know what you're
# doing, and can keep the two files properly in sync. If you screw it up,
# you're on your own.
# Aliases which are visible only in the @xxxxxxnetadmin.com domain.
xxxxxxnet@xxxxxxnetadmin.com lmtp:[127.0.0.1]:8024
xxxxxxnet-bounces@xxxxxxnetadmin.com lmtp:[127.0.0.1]:8024
xxxxxxnet-confirm@xxxxxxnetadmin.com lmtp:[127.0.0.1]:8024
xxxxxxnet-join@xxxxxxnetadmin.com lmtp:[127.0.0.1]:8024
xxxxxxnet-leave@xxxxxxnetadmin.com lmtp:[127.0.0.1]:8024
xxxxxxnet-owner@xxxxxxnetadmin.com lmtp:[127.0.0.1]:8024
xxxxxxnet-request@xxxxxxnetadmin.com lmtp:[127.0.0.1]:8024
xxxxxxnet-subscribe@xxxxxxnetadmin.com lmtp:[127.0.0.1]:8024
xxxxxxnet-unsubscribe@xxxxxxnetadmin.com lmtp:[127.0.0.1]:8024
# ps aux |grep lmtp
list 2323915 0.0 0.1 174548 93240 ? Sl oct.14 0:12 /usr/bin/python3 /usr/lib/mailman3/bin/runner -C /etc/mailman3/mailman.cfg --runner=lmtp:0:1
The fact that Postfix responds “Recipient address rejected: User unknown in virtual alias table;” seems to indicate it is not reading the file /var/lib/mailman3/data/postfix_lmtp
“grep -ir lmtp /etc/postfix/” returns the same as you (except your backup files)
For the master.cf file, the lines that refer to mailman are already present by default with Virtualmin installed but seem to only concern the old Mailman (the path is not correct for Mailman3)
So, if you have another idea
If I can find the time, I will also try to set up a virtual machine with a stock Postfix