Postfix not using LMTP Transport in map

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Postfix not using LMTP Transport in map

maztec
Greetings!

I have a Postfix + PostfixAdmin + Dovecot + Mailman3 install.  My longer logs and configuration files are pasted here:  https://pastebin.com/U0Ciy2i9

Virtual aliases and domains are managed by PostfixAdmin, but stored and confirmed by Dovecot.  Postfix uses dovecot-lmtp to connect, confirm users, and transmit mail to local users.

I am now attempting to install Mailman3.  I have setup Mailman3 to receive messages via my mailman3-lmtp.  I have used regex postmaps, generated by Mailman3, to help Postfix identify the email addresses controlled by Mailman3 and relay them through the Mailman3 transport.  The transport maps properly trigger and tell Postfix to send the message to the Mailman3 lmtp:   mailman3:[127.0.0.1]:8024.

Frustratingly, Postfix instead posts the mapped Mailman3 LMTP as the postfix/lmtp "TO", but continues to use the dovecot-lmtp relay.  This results in a log message that looks like the following:

Host postfix/lmtp[22981]: C0EEEA8: to=<mailman3:[127.0.0.1]:[hidden email]>, orig_to=<[hidden email]>, relay=Host.TLD[private/dovecot-lmtp], delay=566, delays=566/0.04/0.01/0.01, dsn=5.1.1, status=bounced (host Host.com[private/dovecot-lmtp] said: 550 5.1.1 <"mailman3:[127.0.0.1]:8024"@Host.TLD> User doesn't exist: mailman3:[127.0.0.1]:[hidden email] (in reply to RCPT TO command))

As a result the message is bounced due to no such user.  The regex postmap that was used when this message was generated was:  

/^List-confirm(\+.*)?@List\.TLD$/   mailman3:[127.0.0.1]:8024

I believe the most likely culprit is in how I have set up my virtual mailbox and transport maps in Postfix's main.cf:

transport_maps = hash:/etc/postfix/transport,regexp:/var/lib/mailman3/data/postfix_lmtp
virtual_alias_domains = proxy:mysql:/etc/postfix/virtual_alias_domains.cf
virtual_alias_maps = proxy:mysql:/etc/postfix/virtual_alias_maps.cf,proxy:mysql:/etc/postfix/virtual_alias_domains_maps.cf,regexp:/var/lib/mailman3/data/postfix_lmtp
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/virtual_mailbox_domains.cf
virtual_mailbox_limit = 512000000
virtual_mailbox_maps = regexp:/var/lib/mailman3/data/postfix_lmtp,proxy:mysql:/etc/postfix/virtual_mailbox_maps.cf
virtual_minimum_uid = 5000
virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_uid_maps = static:5000


I have edited, re-edited, modified, tested, and poked at dozens of variations of these commands, but even when pruning it down to a minimum the Mailman3 transport map never triggers.  The only way around it seems to be to set Mailman3 as the principal virtual_transport, but then it breaks Dovecot.

I feel like I am missing something obvious here, either a basic syntax issue or a misunderstanding of how the transport maps actually work.

I would greatly appreciate a nudge in the right directly.

Thank you,

Jay
Reply | Threaded
Open this post in threaded view
|

Re: Postfix not using LMTP Transport in map

maztec
Update:The error message my mail client receives is as follows:  
"lmtp:+51c0564a95aa31a8840305bec77e9023baa46477"@Domain.TLD *User doesn't  
exist: lmtp:@Domain.TLD* (in reply to RCPT TO command)and
"lmtp:[127.0.0.1]:8024"@Domain.TLD (expanded from   [hidden email]): host
Domain.TLD[private/dovecot-lmtp]   said: 550 5.1.1
"lmtp:[127.0.0.1]:8024"@Domain.TLD User doesn't exist:  
lmtp:[127.0.0.1]:[hidden email] (in reply to RCPT TO
command)------------------------The first example above came as a result of
a suggestion by Kai that my transport map was incorrect.  Specifically, he
suggested that I could remove the port specification and that mailman3 is
operating on a socket.  However, Mailman3 does not use a socket -
nonetheless I tried.  The result was the same.*Despite the directive for
Postfix to use the LMTP Transport *(either via lmtp or the mailman3 alias -
I have configured for both), *it still uses the dovecot-lmtp and ignores the
mailman lmtp.*  Furthermore, it places the mailman lmtp into the address TO
space, rather than utilizing the mailman3 transport method.I'm at a loss for
what is going on here...



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Reply | Threaded
Open this post in threaded view
|

Re: Postfix not using LMTP Transport in map

Kai Schaetzl
Maztec wrote on Thu, 8 Aug 2019 01:13:18 -0700 (MST):

> However, Mailman3 does not use a socket -
> nonetheless I tried.

I wrote that because your service specification in master.cf says it does
use a Unix socket.
I think you have to specify that in the mailman3 service in your
master.cf! That's where everything should go if you use a postfix service
specification. Then postfix picks everything up from there.
I have it that way for a vacation service and the entry in the transport
map just sends to "vacation:".
Maybe use inet:portnumber instead of unix as the type. (I don't know if
you can specify the portnumber this way.)
Did you follow a tutorial for delivering to mailman the way you want to do
it? (I didn't look for one.)



Kai