Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------master.cf----------------------------
- smtp inet n - - - - smtpd
- -o content_filter=myhook:dummy
- # (At bottom)
- myhook unix - n n - - pipe
- flags=F user=www-data argv=/hsp/mail.php
- -------------------------------------------------
- ------------mail.php-----------------------------
- #!/usr/bin/php
- <?php
- $file = @ fopen("/hsp/test.txt","a");
- fwrite($file, "Message received!");
- fclose($file);
- ?>
- -------------------------------------------------
- ---------mail.log--------------------------------
- Feb 18 13:33:09 horus postfix/pipe[6194]: 3FB3B12006C: to=<n0bane@localhost>, relay=myhook, delay=0.11, delays=0.07/0.01/0/0.03, dsn=2.0.0, status=sent (delivered via myhook service)
- Feb 18 13:33:09 horus postfix/qmgr[6172]: 3FB3B12006C: removed
- -------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement