Mail Routing using pipe in Exim

馋奶兔 提交于 2019-12-05 12:53:07

In routers section I wrote my own custom router that will deliver email to my desired php script. In transport section wrote my own custom transport that will ensure delivery to the desired script using curl. Kept the system_aliases section in Routers configuration as it is but changed driver from accept to redirect.Wrote the following configurations in my /etc/exim.cnf file:

############ROUTERS
runscript:
        driver = accept
        transport = run_script
        unseen
        no_expn
        no_verify
############TRANSPORT
run_script:
     debug_print = "T: run_script for $local_part@$domain"
     driver = pipe
     command = /home/bin/curl http://my.domain.com/mailTest.php --data-urlencode $original_local_part@$original_domain

mailTest.php was my php script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!