Skip to main content

Redirect all income and outcome mails to script

Comments

6 comments

  • 24x7server
    Hi,
    Anyone knows how can I bypass all mails to this script (PHP, node, ruby o python)?

    Can you provide me with some kind of a picture, so I can take a look at it and update you. Do you want to restrict the mailing functions from those scripts?
    0
  • Bastify
    No. What I'm looking for is to be able to filter the incoming and outgoing mails on the server so I can set my own rules using a PHP script. It must be valid for all domains on the server. Thanks.
    0
  • Bastify
    I'm find something usefull in exim.org/exim-html-current/doc/html/spec_html/ch-the_pipe_transport.html 29. The pipe transport
    0
  • cPanelLauren
    You can pipe mail to a script using a mail filter this might be useful to you How to Customize the Exim System Filter File - cPanel Knowledge Base - cPanel Documentation to employ the filter.
    0
  • Bastify
    Hi, Thanks but I'm searching redirect mails to external program. Our actual problem using pipe router is that we cant freeze mails we identified as spam. The program return non zero code but exim always send the email to recipient (Except that exim sends an email error to the sender). ############ROUTERS runscript: driver = accept transport = run_script unseen no_expn no_verify ############TRANSPORT run_script: debug_print = "T: run_script for $local_part@$domain" headers_add = "X-added: this is a header added at $tod_log\n\ X-added: this is another" driver = pipe log_output = true return_fail_output = true freeze_exec_fail = true freeze_signal = true command = /tmp/mailspam.sh force_command The script is called, executed and forced to return non-zero result but exim not freeze the message. Thanks.
    0
  • cPanelLauren
    I'm not too familiar with what you're trying to accomplish but since you've got logging enabled on the transport do you get any output when you test it in regards to the message being frozen or not frozen?
    0

Please sign in to leave a comment.