Michael Grimm via Postfix-users:
> Wietse Venema via Postfix-users <[email protected]> wrote:
> > Michael Grimm via Postfix-users:
> 
> >> Thus, I am thinking about "duplicating" my current LMTP virtual_transport 
> >> to either dovecot and dbmail-lmtpd.
> > 
> > Use different transports for dovecot and dbmail, then use
> > recipient_bcc_maps to add a recipient and use a tranpsort_maps entry
> > with that recipient address.
> > 
> > If necessary I can do a configuration example.
> 
> I am sorry to say, yes, that would be necessary for me ;-)
> 
> Thanks in advance, sorry and regards,

Assuming that [email protected] is already delivered like:

/etc/postfix/main.cf:
    virtual_transport = lmtp:[dovecot host and maybe port]

You would add a recipient BCC mapping, so that [email protected]
will also receive a copy as [email protected]

/etc/postfix/main.cf:
    recipient_bcc_maps = pcre:/etc/postfix/recipient_bcc.pcre

/etc/postfix/recipient_bcc.pcre:
    /^(.*)@example\.com$/ ${1}@db.example.com/

Then we need to route that extra recipient to a dbmail delivery
agent that strips the fake 'db' subdomain before delivery to dbmail.

First, the transport mapping for the BCC recipients:

/etc/postfix/main.cf:
    # instead of cdb you can use hash or lmdb
    transport_maps = cdb:/etc/postfix/transport

/etc/postfix/transport:
    db.example.com      lmtp-db:[dbmail host and maybe port]

Then, the delivery agent:

/etc/postfix/master.cf:
    lmtp-db unix ..     ..      ..      ..      ..  lmtp
        -o lmtp_generic_maps = pcre:/etc/postfix/lmtp_generic.pcre

/etc/postfix/lmtp_generic.pcre:
    /^(.*)@db.example.com       ${1}@example.com

        Wietse
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to