Virtual users in Postfix/Courier - execute script

Discussion in 'HOWTO-Related Questions' started by synergy, Aug 20, 2013.

  1. synergy

    synergy New Member

    [SOLVED] Virtual users in Postfix/Courier - execute script

    Is it possible to execute command for received message in Postfix configuration described in http://www.howtoforge.com/virtual-u...-courier-mysql-and-squirrelmail-debian-wheezy ?
    Should I add command to transport table? Adding to /etc/aliases seems doesn't work :(

    UPDATE
    Solved a problem, maybe in not reliable way, but it works.

    1. Add new virtual map to /etc/postfix/virtual:
    [email protected] robot

    2. change owner of /etc/postfix to postfix user & execute postmap /etc/postfix/virtual

    3. create alias to command in /etc/postfix/aliases
    robot: "|/path/to/script"

    4. add hash:/etc/postfix/virtual to virtual_alias_maps (before mysql:)

    5. restart postfix

    Now, all messages to [email protected] forwarded to script.
     
    Last edited: Aug 21, 2013

Share This Page