Differences

This shows you the differences between two versions of the page.

Link to this comparison view

postfixmailforwarding [2016/06/09 14:57] (current)
yassine chaouche created
Line 1: Line 1:
 +\\
 +[[:​index|Home]] > [[:​computers|computers]] > [[:​mail|mail]] > [[:​postfix|postfix]] >  [[postfixmailforwarding |postfixmailforwarding]] ​ | [[:​about|About]]
 +
 +
 +Use the virtual_alias_maps configuration setting in /​etc/​postfix/​main.cf.
 +
 +<​code>​
 +virtual_alias_maps = proxy:​mysql:/​etc/​postfix/​mysql-virtual_forwardings.cf
 +</​code>​
 +
 +If you already using a mysql table, use a query like this : 
 +
 +<​code>​
 +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] ~ # 
 +</​code>​
 +
 +You sql table could like this : 
 +<​code>​
 +id           ​int(11)
 +source ​      ​varchar(255)
 +destination ​ text
 +active ​      ​enum('​n',​ '​y'​)
 +</​code>​
 +
 +----
 +
 +
 +
 +contact : [[http://​twitter.com/​ychaouche|@ychaouche]] yacinechaouche at yahoocom
  

QR Code
QR Code postfixmailforwarding (generated for current page)