Skip to main content

Exim pipe outgoing emails not working

Comments

3 comments

  • cPanelMichael
    Hello, I see a similar custom Exim configuration referenced on the following StackOverflow thread: Mail Routing using pipe in Exim Could you let us know if the pipe output works when using the syntax referenced on that thread? Thank you.
    0
  • CaMer0n
    I know this is an old thread, but no where else on the internet could I find a solution. Here's what I worked out, in case it can help someone else here. Piping incoming and outgoing mail to a PHP script with Exim. Add this to the configuration via Exim Configuration Manager. (Advanced Editor) Section PREROUTERS support_outgoing_router: driver = accept domains = !+local_domains transport = support_transport unseen support_incoming_router: driver = accept domains = mydomain.com transport = support_transport unseen Section TRANSPORTSTART support_transport: driver = pipe user = (use FTP to find user of script) group = (use FTP to find group of script) debug_print = "T: support_transport_script for $local_part@$domain" command = /usr/local/bin/php -q /home/account/path-to-my-script.php (There's probably a way to combine the routers into one entry, but I didn't find a way to do that yet) The script is just a regular PHP file, make sure it is executable (755) and the shebang (#!.....) is not necessary.
    0
  • CaMer0n
    And to avoid your script halting emails and throwing errors to people sending email - add ignore_status before: command = /usr/local/bin/php -q /home/account/path-to-my-script.php
    0

Please sign in to leave a comment.