Em 11/06/2020 06:58, Andrew Beverley escreveu:
Dear all,
I have a domain, for which I would like to deliver some email locally
(as a virtual domain) and some email via a relay (using a transport
map). The differentiation is based on the recipient address.
For example, I would like us...@example.com to be delivered locally,
but to have email for us...@example.com relayed to another server using a
transport map.
I have this working, by listing the domain in both
virtual_alias_domains and relay_domains, and setting up the required
virtual addresses and transport rules. However, I get the warning:
warning: do not list domain example.com in BOTH virtual_alias_domains
and relay_domains
Is what I would like to do possible as an official configuration? Can I
safely ignore the warnings?
Postfix version 3.4.8
I am doing most of the above configuration using mysql maps.
Many thanks,
Andy
Hi Andrew.
I'm using a custom install of iRedMail adapted to postfixAdmin and Mysql.
Using "on premisse" postfix for "simple mortals" and O365 for company
"president and directors"
MX Weight 10 for example.com in O365.
MX Weight 20 for example.com in "on premisse" postfix
My aproach is:
-----------
main.cf:
default_transport = smtp
virtual_transport = dovecot
transport_maps =
hash:/etc/postfix/transport
proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf
-----
/etc/postfix/transport:
example.com relay:[example-com.mail.protection.outlook.com]
------
/etc/postfix/mysql/transport_maps_user.cf:
query = SELECT transport FROM mailbox WHERE username='%s'
----
On Mysql mailbox table I set "dovecot" as default field for "transport"
for all usernames.
ex. :
MariaDB [vmail]> SELECT transport FROM mailbox WHERE
username='julio.covol...@example.com' ;
+-----------+
| transport |
+-----------+
| dovecot |
+-----------+
1 row in set (0.00 sec)
The advantage on this aproach is that I don't need more to use command
line to add/delete users, only web interface, and anyone can admin it!
The only problem is when the username does not exist on any of the 2
email servers, looping between them until reaching hopcount_limit
(default hopcount_limit = 50).
I tried to reduce the hopcount_limit to 20, but had losses of several
emails ...
Regards,
----------------------------------
_ Engº Julio Cesar Covolato
0v0 <ju...@psi.com.br>
/(_)\ F: 55-11-99175-9260
^ ^ PSI INTERNET
----------------------------------