Hi Mark,

Thanks for your reply.

After adding

virtual_alias_domains = pgsql:/etc/postfix/pgsql_virtual_domains_maps.cf

I received the following bouce back :

User unknown in virtual alias table

and the following warning in the log file :

warning: do not list domain XXX.com in BOTH virtual_alias_domains and virtual_mailbox_domains

Virtual mailboxes are working, just not the forwarding to mailman. Here is the output for postconf -n

alias_database = hash:/etc/mail/aliases, hash:/var/lib/mailman/data/aliases
alias_maps = hash:/etc/mail/aliases, hash:/var/lib/mailman/data/aliases
biff = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
compatibility_level = 2
content_filter = smtp-amavis:[localhost]:10024
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
default_destination_concurrency_limit = 20
header_checks = regexp:/etc/postfix/header_checks
header_size_limit = 26214400
home_mailbox = .maildir/
html_directory = no
inet_protocols = ipv4
local_destination_concurrency_limit = 5
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message_size_limit = 26214400
meta_directory = /etc/postfix
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = XXX.com
myhostname = XXX.XXX.com
mynetworks = 192.168.0.0/24, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
owner_request_special = no
permissive = permit
queue_directory = /var/spool/postfix
readme_directory = no
recipient_delimiter = +
restrictive = check_sender_access hash:/etc/postfix/restrictions
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
shlib_directory = /usr/lib64/postfix/${mail_version}
smtp_host_lookup = dns,native
smtp_tls_loglevel = 1
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_scache
smtpd_helo_required = yes
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipient_blacklist, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_restriction_classes = restrictive, permissive
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/ssl/SSL_ROOT/External/chain.pem
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/SSL_ROOT/Cert_www.XXX.com/certificate.pem
smtpd_tls_exclude_ciphers = aNULL, MD5 , DES, ADH, RC4, PSD, SRP, 3DES, eNULL
smtpd_tls_key_file = /etc/ssl/SSL_ROOT/Cert_www.XXX.com/private_key.pem
smtpd_tls_loglevel = 3
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_exclude_ciphers = aNULL, MD5 , DES, ADH, RC4, PSD, SRP, 3DES, eNULL
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_preempt_cipherlist = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, pgsql:/etc/postfix/pgsql_virtual_alias_maps.cf
virtual_gid_maps = static:1001
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = pgsql:/etc/postfix/pgsql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = pgsql:/etc/postfix/pgsql_virtual_mailbox_maps.cf
virtual_transport = virtual
virtual_uid_maps = static:1001


On 18/02/2018 02:35, Mark Sapiro wrote:
On 02/17/2018 06:09 AM, Alexander wrote:
I am trying to setup mailman on my linux server running postfix and
virtual host integration. So far I have updated main.cf to include:

alias_database = hash:/etc/mail/aliases, hash:/var/lib/mailman/data/aliases
It isn't necessary to include hash:/var/lib/mailman/data/aliases in
alias_database. It only says that /var/lib/mailman/data/aliases.db will
be updated if you issue a "newaliases" or "sendmail -bi" command which
isn't needed as Mailman issues the appropriate "postalias" command
whenever it updates /var/lib/mailman/data/aliases.


alias_maps = hash:/etc/mail/aliases, hash:/var/lib/mailman/data/aliases
Good.


virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman,
pgsql:/etc/postfix/pgsql_virtual_alias_maps.cf,
hash:/var/lib/mailman/data/virtual-mailman

You have hash:/var/lib/mailman/data/virtual-mailman listed twice.

Do you have "XXX.com" in virtual_alias_domains? You probably need this
unless "XXX.com" is in virtual_mailbox_domains.


Ran genaliases to create /var/lib/mailman/data/aliases and
/var/lib/mailman/data/virtual-mailman which seem to contain the correct
settings

However emails to mailmain@domain and list-staff@domain are bounced with
unknown user:

Feb 17 22:01:32 tinyturtle postfix/virtual[1404]: 5F4DE460402:
to=<mail...@xxx.com>, relay=virtual, delay=0.12, delays=0.04/0/0/0.09,
dsn=5.1.1, status=bounced (unknown user: "mail...@xxx.com")
Feb 17 22:06:18 tinyturtle postfix/virtual[1731]: 3D12D460402:
to=<list-st...@xxx.com>, relay=virtual, delay=0.08,
delays=0.03/0.01/0/0.04, dsn=5.1.1, status=bounced (unknown user:
"list-st...@xxx.com")

Since postfix/virtual is doing the bouncing I am suspected that the
mapping (virtual-mailman) was picked up, and that i cannot find the
mapping in aliases, but I could be wrong here.

Postfix virtual is the delivery agent for virtual_mailbox_domains, not
virtual_alias_domains.

It is possible to use virtual_alias_maps to map addresses that are in a
virtual_mailbox_domain, see
<http://www.postfix.org/VIRTUAL_README.html#virtual_mailbox>, so I'm not
sure why this isn't working, but if you still have issues after reading
the above link, post the output from 'postconf -n'.


------------------------------------------------------
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to