Home > computers > mail > postfix > postfixmailforwarding | About

Use the virtual_alias_maps configuration setting in /etc/postfix/main.cf.

virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf

If you already using a mysql table, use a query like this :

root@messagerie[CHROOT][10.10.10.19] ~ # cat /etc/postfix/mysql-virtual_forwardings.cf
user = xxx
password = xxx
dbname = db
table = mail_forwarding
select_field = destination
where_field = source
additional_conditions = and active = 'y' 
hosts = 127.0.0.1
root@messagerie[CHROOT][10.10.10.19] ~ # 

You sql table could like this :

id           int(11) 	
source       varchar(255) 	
destination  text 	
active       enum('n', 'y') 	

contact : @ychaouche yacinechaouche at yahoocom


QR Code
QR Code postfixmailforwarding (generated for current page)