Re: transport_maps not taking on

2019-08-07 Thread Jay Gairson
Kai:

I think this issue might be the same as the one that I'm encountering in my
post yesterday titled, "Postfix not using LMTP Transport in map".

Can you look at your logs and see if you're getting a similar message to
what I have below?

Host postfix/lmtp[22981]: C0EEEA8: to=http://postfix.1071664.n5.nabble.com/user/SendEmail.jtp?type=node=102395=0>>,
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))

Basically Postfix is reading the map, but applying it to the "To", but not
using the relay for it at all.  Instead it refers to the
private/dovecot-lmtp in my case as the relay.

Does this match the behavior you are seeing?





On Wed, Aug 7, 2019 at 10:11 AM Kai Schaetzl 
wrote:

> Postfix 3.1.0, set up with virtual domains and users in a database via
> virtual_ directives in main.cf
> rspamd set up as a milter
> -> everything works just fine.
>
> I have one server where the client wants to get mail delivered to his
> Exchange server remotely instead. He wants to have the mail floating
> through my postfix and use the spam marking by rspamd and then get it
> delivered to his Exchange.
>
> So I:
> - commented out all virtual_ lines
> - added the domain to $mydestination
> - added this to the transport map:
>   example.com   smtp:[IP]
>   (and compiled with postmap, of course, and)
>   (transport_maps = hash:/etc/mail/transport)
>
> Unfortunately, this doesn't work. It seems that the transport map is
> either not getting consulted or that line not getting used.
> The mail gets accepted but I get this error:
> Recipient address rejected: User unknown in local recipient table
> (or: if the user exists it gets delivered locally)
>
> I know I have done this in the past when I didn't use a virtual_ setup.
> What am I missing?
> Should I remove the domain from $mydestination ?
> What do I have to set additionally so that transport is getting consulted?
>
> Thanks a lot!
>
> Kai
>
>
>


Postfix not using LMTP Transport in map

2019-08-07 Thread Jay Gairson
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=,
orig_to=,
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]:8...@host.tld (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 = 51200
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