Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Mail Server
  • Search

Trigger and run PHP script when mail is received on Exim

Questions regarding the Mail Server
Dovecot, Exim, RoundCube
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
freelancer
Posts: 2
Joined: Wed Mar 21, 2018 7:42 am

Os: CentOS 5x
Web: apache + nginx
Trigger and run PHP script when mail is received on Exim
  • Quote

Post by freelancer » Tue Nov 26, 2019 10:40 pm

Hi,

I want to trigger my below PHP script - whenever "Server" receives mail in its mail server (Exim).

PHP script:

Code: Select all

<?php
    echo "Mail received ";
    file_put_contents("/tmp/mailReceivedLog", "Last Mail Receved at".gmdate("d-m-y"));
?>
Is it possible to create "Exim" trigger which runs PHP script as soon as the mail is received?

Thanks
Top

plutocrat
Posts: 232
Joined: Fri Jan 27, 2017 9:16 am

Os: Ubuntu 17x
Web: apache + nginx
Re: Trigger and run PHP script when mail is received on Exim
  • Quote

Post by plutocrat » Thu Nov 28, 2019 4:08 am

Use exim's pipe transport?
https://www.exim.org/exim-html-current/ ... sport.html

Or if the mail is going to a single email address you could just monitor the directory /home/user/mail/domain.com/mailuser/
https://www.tecmint.com/watchman-monito ... -in-linux/
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “Mail Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

cron

Login  •  Register

I forgot my password