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

2016-11-08 Thread Gérald Niel
Hi,

Le 07/11/2016 à 23:01, Christian a écrit :
> Thanks I changed it back to Postfix. 'transport-mailman' get's created
> correctly again.
> The error message is still the same.

I've this about mailman on my config (main.cf):

virtual_alias_maps = hash:/usr/local/etc/postfix/virtual_alias, 
hash:/usr/local/mailman/data/virtual-mailman


alias_maps = hash:/etc/mail/aliases, hash:/usr/local/mailman/data/aliases
 

alias_database = hash:/etc/mail/aliases, hash:/usr/local/mailman/data/aliases
 

Nothing else. Nothing in transport sections.

And in mm_cfg.py (I've three domains) :

MTA = 'Postfix'

DEFAULT_URL_HOST="listes.gegeweb.org"
DEFAULT_EMAIL_HOST="listes.gegeweb.org"
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
add_virtualhost('ml.scasb.org', 'ml.scasb.org')
add_virtualhost('listes.grisbi.org','listes.grisbi.org')
POSTFIX_STYLE_VIRTUAL_DOMAINS = [
'listes.gegeweb.org',
'listes.grisbi.org',
'ml.scasb.org',
]

And domains are listed, one per line in the virtual_domains file (in main.cf) :
virtual_alias_domains = /usr/local/etc/postfix/virtual_domains

And I've some aliases configured as destination address on the list's config in 
the virtual_alias table lilke this :
## Moderators grisbi.admin
## Mailman List Aliases
#
grisbi-ad...@listes.grisbi.org  ad...@listes.grisbi.org
grisbi-i...@listes.grisbi.org   i...@listes.grisbi.org

And, make by mailman in data/aliases for the de...@listes.grisbi.org list :

# STANZA START: devel
# CREATED: Fri Jul  6 23:10:51 2012
devel: "|/usr/local/mailman/mail/mailman post devel"
devel-admin:   "|/usr/local/mailman/mail/mailman admin devel"
devel-bounces: "|/usr/local/mailman/mail/mailman bounces devel"
devel-confirm: "|/usr/local/mailman/mail/mailman confirm devel"
devel-join:"|/usr/local/mailman/mail/mailman join devel"
devel-leave:   "|/usr/local/mailman/mail/mailman leave devel"
devel-owner:   "|/usr/local/mailman/mail/mailman owner devel"
devel-request: "|/usr/local/mailman/mail/mailman request devel"
devel-subscribe:   "|/usr/local/mailman/mail/mailman subscribe devel"
devel-unsubscribe: "|/usr/local/mailman/mail/mailman unsubscribe devel"
# STANZA END: devel

And in data/virtual-mailman
# STANZA START: devel
# CREATED: Fri Jul  6 23:10:51 2012
de...@listes.grisbi.org  devel
devel-ad...@listes.grisbi.orgdevel-admin
devel-boun...@listes.grisbi.org  devel-bounces
devel-conf...@listes.grisbi.org  devel-confirm
devel-j...@listes.grisbi.org devel-join
devel-le...@listes.grisbi.orgdevel-leave
devel-ow...@listes.grisbi.orgdevel-owner
devel-requ...@listes.grisbi.org  devel-request
devel-subscr...@listes.grisbi.orgdevel-subscribe
devel-unsubscr...@listes.grisbi.org  devel-unsubscribe
# STANZA END: devel

This two files, aliases en virtual-mailman and the db are created and updated 
by mailman without have something to do.

-- 
Gérald Niel




signature.asc
Description: OpenPGP digital signature
--
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

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

2016-11-08 Thread Christian
Thanks I changed it back to Postfix. 'transport-mailman' get's created
correctly again.
The error message is still the same.

So I added a verbose log from postfix down here.
Postfix seems to read the transport-mailman but dont forward it to mailman.
Almost in the middle of the log is this line:
Nov 7 22:06:06 mail postfix/smtpd[18815]: resolve_clnt: `' ->
`li...@domain.tld' -> transp=`mailman' host=`domain.tld'
rcpt=`li...@domain.tld' flags= class=virtual

Why it is searching further and doesn't forward the mail?
It can't find the mailaddress because certainly no mailaccout exists.
Only the transport_maps =  hash:/var/lib/mailman/data/transport-mailman
has the mailing-list address

 
>From the archive mailing.list:
"So mail to my-list at foo.bar.com
 should use a
'mailman' transport, presumably defined in master.cf as
postfix_to_mailman.py. If you want to use this, there should be no
aliases for Mailman at all there should only be transport maps entries
of the form my-list at foo.bar.com
 mailman:
my-list-admin at foo.bar.com
 mailman:
my-list-bounces at foo.bar.com
 mailman: etc. A
total of 10 per list since non-list mail for this domain should be
handled by the 'virtual' transport."
See link in my first mail.

Greetings
Christian

_Postfix verbose logging - trying to send to li...@domain.tld:_
Nov 7 22:06:01 mail postfix/master[18812]: daemon started -- version
2.11.3, configuration /etc/postfix
Nov 7 22:06:05 mail postfix/smtpd[18815]: name_mask: ipv4
Nov 7 22:06:05 mail postfix/smtpd[18815]: inet_addr_local: configured 2
IPv4 addresses
Nov 7 22:06:05 mail postfix/smtpd[18815]: process generation: 3 (3)
Nov 7 22:06:05 mail postfix/smtpd[18815]: match_string: mynetworks ~?
debug_peer_list
Nov 7 22:06:05 mail postfix/smtpd[18815]: match_string: mynetworks ~?
fast_flush_domains
Nov 7 22:06:05 mail postfix/smtpd[18815]: match_string: mynetworks ~?
mynetworks
Nov 7 22:06:05 mail postfix/smtpd[18815]: match_string: relay_domains ~?
debug_peer_list
Nov 7 22:06:05 mail postfix/smtpd[18815]: match_string: relay_domains ~?
fast_flush_domains
Nov 7 22:06:05 mail postfix/smtpd[18815]: match_string: relay_domains ~?
mynetworks
Nov 7 22:06:05 mail postfix/smtpd[18815]: match_string: relay_domains ~?
permit_mx_backup_networks
Nov 7 22:06:05 mail postfix/smtpd[18815]: match_string: relay_domains ~?
qmqpd_authorized_clients
Nov 7 22:06:05 mail postfix/smtpd[18815]: match_string: relay_domains ~?
relay_domains
Nov 7 22:06:05 mail postfix/smtpd[18815]: match_string:
permit_mx_backup_networks ~? debug_peer_list
Nov 7 22:06:05 mail postfix/smtpd[18815]: match_string:
permit_mx_backup_networks ~? fast_flush_domains
Nov 7 22:06:05 mail postfix/smtpd[18815]: match_string:
permit_mx_backup_networks ~? mynetworks
Nov 7 22:06:05 mail postfix/smtpd[18815]: match_string:
permit_mx_backup_networks ~? permit_mx_backup_networks
Nov 7 22:06:05 mail postfix/smtpd[18815]: connect to subsystem
private/proxymap
Nov 7 22:06:05 mail postfix/smtpd[18815]: send attr request = open
Nov 7 22:06:05 mail postfix/smtpd[18815]: send attr table =
unix:passwd.byname
Nov 7 22:06:05 mail postfix/smtpd[18815]: send attr flags = 0
Nov 7 22:06:05 mail postfix/smtpd[18815]: private/proxymap socket:
wanted attribute: status
Nov 7 22:06:05 mail postfix/smtpd[18815]: input attribute name: status
Nov 7 22:06:05 mail postfix/smtpd[18815]: input attribute value: 0
Nov 7 22:06:05 mail postfix/smtpd[18815]: private/proxymap socket:
wanted attribute: flags
Nov 7 22:06:05 mail postfix/smtpd[18815]: input attribute name: flags
Nov 7 22:06:05 mail postfix/smtpd[18815]: input attribute value: 16
Nov 7 22:06:05 mail postfix/smtpd[18815]: private/proxymap socket:
wanted attribute: (list terminator)
Nov 7 22:06:05 mail postfix/smtpd[18815]: input attribute name: (end)
Nov 7 22:06:05 mail postfix/smtpd[18815]: dict_proxy_open: connect to
map=unix:passwd.byname status=0 server_flags=fixed
Nov 7 22:06:05 mail postfix/smtpd[18815]: dict_open:
proxy:unix:passwd.byname
Nov 7 22:06:05 mail postfix/smtpd[18815]: Compiled against Berkeley DB:
5.3.28?
Nov 7 22:06:05 mail postfix/smtpd[18815]: Run-time linked against
Berkeley DB: 5.3.28?
Nov 7 22:06:05 mail postfix/smtpd[18815]: dict_open: hash:/etc/aliases
Nov 7 22:06:05 mail postfix/smtpd[18815]: send attr request = open
Nov 7 22:06:05 mail postfix/smtpd[18815]: send attr table =
mysql:/etc/postfix/mysql/postfix-mysql-virtual_alias_maps.cf
Nov 7 22:06:05 mail postfix/smtpd[18815]: send attr flags = 0
Nov 7 22:06:05 mail postfix/smtpd[18815]: private/proxymap socket:
wanted attribute: status
Nov 7 22:06:05 mail postfix/smtpd[18815]: input attribute name: status
Nov 7 22:06:05 mail postfix/smtpd[18815]: input attribute value: 0
Nov 7 22:06:05 mail postfix/smtpd[18815]: private/proxymap socket:
wanted attribute: 

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

2016-11-07 Thread Christian
It works!

-> It should be possible for a mailbox user 'u...@domain.tld' to send at
the mailing list 'l...@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 = 'postmas...@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 :
>>
>> 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 'u...@domain.tld' to send at
>> the mailing list 'l...@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 : Recipient address rejected: User unknown in
>> virtual mailbox table; from= to=
>> 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 = 'postmas...@domain.tld'
>> POSTFIX_STYLE_VIRTUAL_DOMAINS = ['domain.tld']
>> POSTFIX_MAP_CMD = '/var/lib/mailman/data/virtual_to_transport'
>> *
>>
>> root@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 list10 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 

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

2016-11-07 Thread Matthias Schmidt via Mailman-Users

> Am 07.11.2016 um 01:06 schrieb Christian :
> 
> 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 'u...@domain.tld' to send at
> the mailing list 'l...@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 : Recipient address rejected: User unknown in
> virtual mailbox table; from= to=
> 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 = 'postmas...@domain.tld'
> POSTFIX_STYLE_VIRTUAL_DOMAINS = ['domain.tld']
> POSTFIX_MAP_CMD = '/var/lib/mailman/data/virtual_to_transport'
> *
> 
> root@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 list10 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-l...@domain.tld mailman:
> 
> mail...@domain.tld  mailman:
> mailman-ad...@domain.tldmailman:
> mailman-boun...@domain.tld  mailman:
> mailman-conf...@domain.tld  mailman:
> mailman-j...@domain.tld mailman:
> mailman-le...@domain.tldmailman:
> mailman-ow...@domain.tldmailman:
> mailman-requ...@domain.tld  mailman:
> mailman-subscr...@domain.tldmailman:
> mailman-unsubscr...@domain.tld  mailman:
> 
> l...@domain.tld  mailman:
> list-ad...@domain.tldmailman:
> list-boun...@domain.tld  mailman:
> list-conf...@domain.tld  mailman:
> list-j...@domain.tldmailman:
> list-le...@domain.tldmailman:
> list-ow...@domain.tldmailman:
> list-requ...@domain.tld  mailman:
> list-subscr...@domain.tldmailman:
> list-unsubscr...@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 [:::127.0.0.0]/104 [::1]/128
> mailbox_size_limit = 0
> virtual_mailbox_limit = 0
> recipient_delimiter = +
> inet_interfaces = all
> inet_protocols = ipv4