Home / Linux / Trap and redirect all PostFix Email to one address

Trap and redirect all PostFix Email to one address


Cent OS 6.9

Create /etc/postfix/virtual-regexp with the following content:
  1. /.+@.+/ email@service.com
Edit /etc/postfix/main.cf and add virtual-regexp to the virtual_maps configuration (if configuration does not exist, add the line):
  1. virtual_maps = hash:/etc/postfix/virtual, regexp:/etc/postfix/virtual-regexp
Build the mapfile:
  1. postmap /etc/postfix/virutal-regexp
Finally, create a vritual.db (if file does not exist):
  1. touch /etc/postfix/virtual && postmap /etc/postfix/virtual
Source:

    Post a comment

    Your Name or E-mail ID (mandatory)

     

    Note: Your comment will be published after approval of the owner.




     RSS of this page