Hybrid-Hosting Posted July 3, 2013 Share Posted July 3, 2013 Hello all, After spending a fair amount of time fighting with piping in Plesk and getting a bit frustrated because it kept failing, I finally figured out what was keeping it from working. I shared the info with support and am putting it here as well. the instructions below are a little rough, but they are accurate: In order to get piping to work in Plesk 10.4.4 (my current version) with qmail, ensure that you have not created an email address for the address you want piped, in this case, I'll use "support@domain.com" for these instructions. log into your system through SSH and then su to root. CD to the mail directory where your mailnames are for the domain "cd /var/qmail/mailnames/domain.com" (enter) type ls -al (enter) and you should see the following: (the ls command with the -al switch allows you to see the hidden files which you would not normally see in a simple listing command) drwxr-x--- 3 popuser popuser 4096 Jul 2 14:55 . drwxr-xr-x 13 root root 4096 Jun 12 22:14 .. drwx------ 5 popuser popuser 4096 Jul 1 21:58 admin -rw------- 1 popuser popuser 56 Apr 15 2008 .qmail-default as shown here, the email address of admin@domain.com has already been created as indicated by the presence of the "admin" mail folder and there are no other mailboxes showing. next we want to copy the .qmail-default file to .qmail-support so we type in "cp .qmail-default .qmail-support" (enter) now the ls -al command will show that you have a .qmail-default and a .qmail-support file both with 0600 permissions, but the owners and groups of the files will be different because we are currently working as the root user, so the original file is: -rw------- 1 popuser popuser 56 Apr 15 2008 .qmail-default yet the file we created just now is: -rw------- 1 root root 75 Jul 2 22:19 .qmail-support So we change owner and group with the command "chown popuser:popuser .qmail-support"(enter) then after doing that, we edit the file "nano .qmail-support"(enter) where we will see the following text: "|bouncesaying This\ address\ no\ longer\ accepts\ mail." we will change that to the pipe command for your billing installation as shown in the support department's setup instructions: " | php -q /var/www/vhosts/domain.com/httpdocs/billing/pipe/pipe.php" (your path will vary based on where you install your billing system) make sure that each folder in that path chain has the 755 permission and that the pipe.php file does as well and that the proper path to php is listed in the pipe.php file. if all was done correctly, it's time to test your email pipe. typing the command "tail -f /usr/local/psa/var/log/maillog"" will bring up a view of the mail log that updates as the mail log does, so in another window, browser, or from your mail client, send a test email to "support@domain.com". you will see a few lines of text go by and as long as you don't see a deferral message saying that it could not open the input file at "/var/www/vhosts/domain.com/httpdocs/billing/pipe/pipe.php" you will be able to check your support center and find a support ticket sitting there waiting for you, if you setup the "support" department with the email address of support@domain.com. In my case, the httpdocs folder had permissions of 0750 rather than 0755 and that's why it wouldn't work, when i went backwards through the path chain and checked the permissions on each folder, I found the issue. please note that the quotes are not used in the actual commands and I hope this information helps someone. Thanks Bill 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.