Re: forward to an external command

From: J.P. Trosclair (no email)
Date: Fri Mar 06 2009 - 12:20:29 EST

  • Next message: Noel Jones: "Re: Do not include first 'Received' header when received via 465/587?"

    George wrote:
    > I have postfix with postfixadmin and everything stored in a mysql database.
    >
    > How do I forward emails sent to a mail account to an external command?

    Since you are using virtual aliases (postfixadmin w/mysql assumes so)
    you'll need to setup a pipe transport in master.cf and proper settings
    in /etc/postfix/transports. See the man pages of pipe and transport for
    more details than what you'll find in this email.

    virtual alias:
     

    add to /etc/postfix/transports:
    my_custom_transport.example.com my_custom_transport:

    add to /etc/postfix/main.cf:
    transport_maps = hash:/etc/postfix/transports

    add to /etc/postfix/master.cf:
    my_custom_transport unix - n n - - pipe
       flags=flags_from_pipe_manual
       user=some_user:some_group
       argv=/path/to/my_custom_script vars_from_pipe_manual

    This may be incomplete. It is a rough (very rough?) example of the
    configuration. I strongly recommend having a look at the pipe and
    transport manuals before attempting to implement any of this.


  • Next message: Noel Jones: "Re: Do not include first 'Received' header when received via 465/587?"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD