[Mailman-Users] postfix + mailman + mailboxes on the same domain and server

Christian info at ckol.de
Mon Nov 7 20:51:34 EST 2016


It works!

-> It should be possible for a mailbox user 'user at domain.tld' to send at
the mailing list 'list at domain.tld'.

Deboian 8 jessie, postfix, dovecot, mailman

For all who want to do the same as me :)

_Summary:_

You only need to change/add these lines in main.cf:
*************************************************************
alias_maps = ... hash:/private/var/mailman/data/aliases
virtual_alias_maps = ... hash:/var/lib/mailman/data/virtual-mailman
transport_maps = ... hash:/var/lib/mailman/data/transport-mailman
mailman_destination_recipient_limit = 1
recipient_delimiter = +
unknown_local_recipient_reject_code = 550
*************************************************************

nothing to add in master.cf


_Ignore the postfix-to-mailman.py script!_


simple and clean /etc/mailman/mm_cfg.py:
*************************************************************
from Defaults import *
MAILMAN_SITE_LIST = 'mailman'
DEFAULT_URL_PATTERN = 'http://%s/cgi-bin/mailman/'
IMAGE_LOGOS  = '/images/mailman/'
DEFAULT_EMAIL_HOST = 'domain.tld'
DEFAULT_URL_HOST   = 'www.domain.tld'
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
DEFAULT_SERVER_LANGUAGE = 'de'
USE_ENVELOPE_SENDER    = 0              # Still used?
DEFAULT_SEND_REMINDERS = 0
MTA='Postfix'
DEB_LISTMASTER = 'postmaster at domain.tld'
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['domain.tld']
POSTFIX_MAP_CMD = '/var/lib/mailman/data/virtual_to_transport'
*************************************************************

All three _maps_ must have a .db! (with the same timecode)

_Finally these:_
/usr/lib/mailman/bin/genaliases

postmap /var/lib/mailman/data/virtual-mailman <- these line has to be
added to the file virtual_to_transport
If POSTFIX_MAP_CMD is used the database of virtual-mailman doesn't get
updated anymore.

The FAQ at http://wiki.list.org/x/ZoCj may help.


Thank you all very much for the help!

I hope that I have all above correct.

Christian


Am 08.11.2016 um 02:02 schrieb Matthias Schmidt:
> 
>> Am 07.11.2016 um 01:06 schrieb Christian <info at ckol.de>:
>>
>> Hello,
>>
>> I'm trying to get the mailing list to work with postfix and I read a lot
>> of information about the difficult usage of it.
>>
>> -> It should be possible for a mailbox user 'user at domain.tld' to send at
>> the mailing list 'list at domain.tld'.
>>
>> The only one I found in the archives that addresses my problem:
>> https://mail.python.org/pipermail/mailman-users/2012-February/072967.html
>>
>> Actually I always get the same error message:
>> /var/log/mail.log
>> *************************************************************
>> Nov  6 15:50:42 mail postfix/smtpd[757]: connect from IP
>> Nov  6 15:50:43 mail postfix/smtpd[757]: Anonymous TLS connection
>> established from IP: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256
>> (128/128 bits)
>> Nov  6 15:50:43 mail postfix/smtpd[757]: NOQUEUE: reject: RCPT from IP:
>> 550 5.1.1 <list at domain.tld>: Recipient address rejected: User unknown in
>> virtual mailbox table; from=<user at domain.tld> to=<list at domain.tld>
>> proto=ESMTP helo=<[local-IP]>
>> Nov  6 15:50:48 mail postfix/smtpd[757]: disconnect from IP
>> *************************************************************
>>
>> I hope that my posted configs help you to address the issure.
> 
> Postfix doesn’t know about the maiman users so imho your main.cf is missing this here:
> alias_maps = hash:/private/var/mailman/data/aliases
> as well as this:
> virtual_alias_maps = hash:/private/var/mailman/data/virtual-mailman
> 
> imho the postfix-to-mailman.py script is outdated and not needed anymore.
> Therefore you don’t need to modify master.cf.
> 
> http://www.list.org/mailman-install/node12.html
> 
> cheers
> Matthias
> 
> 
>>
>> The usual comments has been removed.
>>
>>
>> /etc/mailman/mm_cfg.py
>> *************************************************************
>> from Defaults import *
>> MAILMAN_SITE_LIST = 'mailman'
>> DEFAULT_URL_PATTERN = 'http://%s/cgi-bin/mailman/'
>> IMAGE_LOGOS  = '/images/mailman/'
>> DEFAULT_EMAIL_HOST = 'domain.tld'
>> DEFAULT_URL_HOST   = 'www.domain.tld'
>> add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
>> DEFAULT_SERVER_LANGUAGE = 'de'
>> USE_ENVELOPE_SENDER    = 0              # Still used?
>> DEFAULT_SEND_REMINDERS = 0
>> MTA = None # So that mailman skips aliases generation
>> DEB_LISTMASTER = 'postmaster at domain.tld'
>> POSTFIX_STYLE_VIRTUAL_DOMAINS = ['domain.tld']
>> POSTFIX_MAP_CMD = '/var/lib/mailman/data/virtual_to_transport'
>> *************************************************************
>>
>> root at mail:/var/lib/mailman/data# ls -l
>> insgesamt 64
>> -rw-rw-r-- 1 list list  1843 Nov  6 15:07 aliases
>> -rw-rw-r-- 1 list list 12288 Nov  6 15:07 aliases.db
>> -rw-rw-r-- 1 root list    10 Okt 20 11:48 last_mailman_version
>> -rw-r--r-- 1 root list 14100 Sep 15 08:04 sitelist.cfg
>> -rw-rw-r-- 1 list list  1606 Nov  6 15:07 transport-mailman
>> -rw-r--r-- 1 list list 12288 Nov  6 15:07 transport-mailman.db
>> -rw-rw---- 1 root list  1698 Nov  6 15:07 virtual-mailman
>> -rwxr-x--- 1 root list   149 Nov  6 15:07 virtual_to_transport
>>
>> /var/lib/mailman/data/transport-mailman
>> *************************************************************
>> mailman-loop at domain.tld mailman:
>>
>> mailman at domain.tld              mailman:
>> mailman-admin at domain.tld        mailman:
>> mailman-bounces at domain.tld      mailman:
>> mailman-confirm at domain.tld      mailman:
>> mailman-join at domain.tld         mailman:
>> mailman-leave at domain.tld        mailman:
>> mailman-owner at domain.tld        mailman:
>> mailman-request at domain.tld      mailman:
>> mailman-subscribe at domain.tld    mailman:
>> mailman-unsubscribe at domain.tld  mailman:
>>
>> list at domain.tld              mailman:
>> list-admin at domain.tld        mailman:
>> list-bounces at domain.tld      mailman:
>> list-confirm at domain.tld      mailman:
>> list-join at domain.tld        mailman:
>> list-leave at domain.tld        mailman:
>> list-owner at domain.tld        mailman:
>> list-request at domain.tld      mailman:
>> list-subscribe at domain.tld    mailman:
>> list-unsubscribe at domain.tld  mailman:
>> *************************************************************
>>
>> /etc/postfix/master.cf
>> *************************************************************
>> mailman unix  -       n       n       -       -       pipe
>>  flags=FR user=list
>>  argv=/var/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}
>> *************************************************************
>>
>> /etc/postfix/main.cf
>> *************************************************************
>> smtpd_banner = $myhostname
>> biff = no
>> append_dot_mydomain = no
>> readme_directory = /usr/share/doc/postfix
>> html_directory = /usr/share/doc/postfix/html
>>
>> myhostname = mail.domain.tld
>> alias_maps = hash:/etc/aliases
>> alias_database = hash:/etc/aliases
>> myorigin = mail.domain.tld
>> mydestination = mail.domain.tld, localhost
>> relayhost =
>> mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
>> mailbox_size_limit = 0
>> virtual_mailbox_limit = 0
>> recipient_delimiter = +
>> inet_interfaces = all
>> inet_protocols = ipv4
>> disable_vrfy_command = yes
>>
>> smtpd_helo_required = yes
>> smtpd_sasl_type=dovecot
>> smtpd_sasl_path=private/auth_dovecot
>> smtpd_sasl_auth_enable = yes
>> smtpd_sasl_authenticated_header = yes
>> broken_sasl_auth_clients = yes
>>
>> proxy_read_maps = $local_recipient_maps $mydestination
>> $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps
>> $virtual_mailbox_domains $relay_recipient_maps $relay_domains
>> $canonical_maps $sender_canonical_maps $recipient_canonical_maps
>> $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps
>> virtual_mailbox_base = /
>> virtual_mailbox_domains =
>> proxy:mysql:/etc/postfix/mysql/postfix-mysql-virtual_domains_maps.cf
>> virtual_alias_maps =
>> proxy:mysql:/etc/postfix/mysql/postfix-mysql-virtual_alias_maps.cf
>> virtual_mailbox_maps =
>> proxy:mysql:/etc/postfix/mysql/postfix-mysql-virtual_mailbox_maps.cf
>> virtual_minimum_uid = 5000
>> virtual_uid_maps = static:5000
>> virtual_gid_maps = static:5000
>> virtual_transport = lmtps:unix:private/dovecot-lmtp
>> transport_maps = hash:/var/lib/mailman/data/transport-mailman,
>> mysql:/etc/postfix/mysql/postfix-mysql-virtual_transport_maps.cf
>>
>> maximal_queue_lifetime = 1d
>> bounce_queue_lifetime = 1d
>> queue_run_delay = 300s
>> maximal_backoff_time = 1800s
>> minimal_backoff_time = 300s
>> message_size_limit = 524288000
>> smtpd_soft_error_limit = 3
>> smtpd_error_sleep_time = 10s
>> smtpd_hard_error_limit = ${stress?1}${stress:5}
>>
>> mailman_destination_recipient_limit = 1
>> relay_recipient_maps = hash:/var/lib/mailman/data/transport-mailman
>> *************************************************************
>> The only edit here was in transport_maps and the last both lines.
>>
>> I don't know which steps in the manuals are important for me and which not.
>> Please help me to correct that.
>>
>> Greetings Christian
>>
>>
>> ------------------------------------------------------
>> Mailman-Users mailing list Mailman-Users at 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/beta%40admilon.net
> 


More information about the Mailman-Users mailing list