• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Pipe Incoming Email to PHP or PL script

S

sandersii

Guest
I know this isn't a new thing and I've done a significant amount of digging to find a solution, of which I can't get the full script with dot-qmail file to work properly.

I've have the /mailnames/<emailname>/.qmail file with the following:

| preline /var/www/vhosts/domain/script/emailproc.pl
| preline /var/www/vhosts/domain/script/emailproc.php
| /usr/bin/deliverquota ./Maildir

and in both the Perl and PHP script files contain a simple print(MYFILE, "test text\n"); and fwrite("test text\n","a"); respectfully. Both have chmod 755. When I run either one from the CLI they do as intended, write a new line to the file, however when an email is sent to the <emailname> it doesn't write the to the file, but I do receive the email in the inbox.

I'm stumpped on why I can run them from the CLI just fine, but they don't seem to be firing whith the .qmail file. If I make a false entry on the file location in the .qmail file I do receive the error notice, so I know that .qmail file is being called correctly.

Any ideas or help would be extremely helpful
 
Just a thought if you still haven't resolved this... if you are still getting the email in the inbox it is probably because you did not remove the mailbox line from the dot.qmail file... the only lines in the file should be your pipe to script.

The dot.qmail file is what tells qmail where and what to do with the incoming mail messge.
 
Back
Top