Jump to content

How to setup WHMCS support Email Piping between 2 different domains


Louisvdw

Recommended Posts

My support email is under my main domain as support@mydomain.co.za, but WHMCS is installed under a seperate account secure.mydomain.co.za (with it's own IP), so piping "| php -q /home/username/public_html/whmcs/pipe/pipe.php" from support@mydomain.co.za won't work. According to http://wiki.whmcs.com/Email_Piping) I'll have to use the CRON Piping method :shock:

 

There is another (better) way :)

 

Here is what to do to setup this scenario to work with Email Piping directly into WHMCS:

We're going to use a normal forward from mydomain.co.za to get to secure.mydomain.co.za and then piping from secure.mydomain.co.za into WHMCS using to normal method of "| php -q /home/username/public_html/whmcs/pipe/pipe.php"

 

1) Login to your WHMCS admin (e.g. at secure.mydomain.co.za/admin) and setup your support department. (Configuration, Support Departments, Add New Dep./Edit existing Dep.)

Make sure that the email address that you specify is the address from your main domain that you want to use, even though it is under a different account/domain. (e.g. support@mydomain.co.za)

 

2) Then setup a forward for the email address from your main domain that you specified in your Support Department in 1), to an email address on your WHMCS domain. (e.g. Forward support@mydomain.co.za --> support@secure.mydomain.co.za)

 

3) Next we will setup the email piping on the mail address on the WHMCS domain using the pipe command supplied by your WHMCS. (e.g. support@secure.mydomain.co.za --> | php -q /home/secure/public_html/pipe/pipe.php)

 

All that is left to do is to test your setup. Send a mail to you support department (e.g. support@mydomain.co.za) from a separate address that is not a admin. When replying as an admin, the response will be sent to the client from the email you specified under you support department. 8)

 

My example use a sub domain for WHMCS, but you can use a completely separate domain as well, so long as you can send emails as the mail user from your main domain.

Link to comment
Share on other sites

My support email is under my main domain as support@mydomain.co.za, but WHMCS is installed under a seperate account secure.mydomain.co.za (with it's own IP), so piping "| php -q /home/username/public_html/whmcs/pipe/pipe.php" from support@mydomain.co.za won't work. According to http://wiki.whmcs.com/Email_Piping) I'll have to use the CRON Piping method

We were setup similar to the above earlier and also had to use the cron.

 

What we did was create a single account mydomain.com and then created a subdomain in this account for WHMCS as secure.mydomain.com the only dedicated IP is assigned as normal but onlly used for the subdomain SSL as the main site has no need for SSL.

All mail is at the main domain and is piped as normal. We found this to be cleaner than creating the sub as a separate account.

 

Just our experience...

Link to comment
Share on other sites

You might run into a problem with that though if the host you are using has OpenBaseDir enabled.

 

If your cron/pipe file is at /home/site1/public_html/whmcs/pipe file and you are trying to call it from a different cpanel account or from a different script in another account say

 

/home/site2/public_html/whmcs/pipe file

 

then it might fail due to security permissions?

Link to comment
Share on other sites

I have different IPs & accounts AND using email piping (Not a CRON)

Don't know your reasoning for needing a Dedi-IP for your other account??

We did not require it and only assigned the SSL Host to the single IP of the base account to the subdomain SSL(Meaning, SSL issued to secure.main_domain.xxx). We also use piping now and not CRON.

Link to comment
Share on other sites

@Pima - It's more of a want than a need :)

 

@mycommon - By using a normal forward from the one account to the next where you setup your WHMCS, it's the account itself that has the access. The main account does not have access to the second, so you can't call the PIPE directly.

Link to comment
Share on other sites

Louisvdw: I tried your method but it doesn't work since it does not recognize the email when importing it.

 

when using email forwarding the recipient email@mydomain1.com will be forwarding it to email@mydomain2.com.

 

The problem is your ticket department is setup to be email@mydomain1.com so when importing it from email@mydomain2.com it will not be assigned to the proper department.

Link to comment
Share on other sites

Did you go to your secure.mydomain.com account and created the forward for support@secure.mydomain.com --> | php -q /home/secure/public_html/pipe/pipe.php

 

This is the part that actually pipe the email to WHMCS

 

Yes. it was set and importing correctly since the error message is within the WHMCS Mail Log under the tools sesction, the problem was assigning the imported mail to the proper department.

 

When forwarding emails from support@mydomain.com -> support@secure.mydomain.com , whmcs recognizes that mail as being sent to support@secure.mydomain.com and not support@mydomain.com.

 

Have you tried this setup? I mean do you have a working setup like this?

Link to comment
Share on other sites

  • 3 weeks later...

If you are getting department not found error, you can create new department for the other domain with the same name and description as the current domain you are using but set those newly created department to hidden so your client won't see duplicate department when submitting ticket.

Link to comment
Share on other sites

  • 1 month later...

trying to get my head around this.

 

I'm trying to simply all emails for both sales and support

 

i have my support emails sent to support@domain.com but if the emails is sent to another address and cc'd to support@domain.com the messages gets deleted and "department not found",

 

is there a way to get cc'd tickets raised, in may cases the ticket is sent to the sender boss so is not an attempt to raise duplicate tickets.

 

simularly for sales@domain.com, set as the pop account for sales department works ok, but over the years i have used card@domain.com, customer@domain.com on different business cardsand the email address sales@domain.com.au. problem is that all 3 - card@domain.com, customer@domain.com & sales@domain.com.au - the messages gets deleted and "department not found".

 

how can i set them so they get tickets raised, any suggestions other than raise multiple departments

 

Thanks

Ian

Link to comment
Share on other sites

The Support Departments read the TO address for the email that they are setup with. CC or Forwards will not work for you unfortunately.

 

You will have to do some magic to get those mails to show the correct To address, or setup multiple departments :)

Link to comment
Share on other sites

  • 1 month later...
  • 11 months later...

Reading through this post to understand how the piping works and how to setup it properly, I came across this post. It appears that this post is referring to setting up piping using a primary domain email with WHMCS installed on a sub-domain.

 

For example:

Domain: somedomain.com

Pipe Email: someone@somedomain.com

WHMCS: subdomain.somedomain.com

 

There are many ways listed here to set it up so I figured I would add the way I got mine working without the extra email accounts and forwarding. I do not know if this will work for everybody, but I did it without the extra forward to a someone@subdomain.somedomain.com

 

I used the directions found here: http://wiki.whmcs.com/Email_Piping

 

My subdomains I create will work with either of the following addresses:

http://subdomain.somedomain.com

http://www.somedomain.com/subdomain

 

I use C-Panel (X3) and created a forward from someone@somedomain.com using this command (found from my WHMCS Support Departments):

php -q /home/cpaneluser/public_html/subdomain/pipe/pipe.php

(original command included a "|" in front of php but cpanel forwarders would not accept it)

 

Replace the "cpaneluser" with your cPanel Username and replacing "subdomain" with the folder you actually used to install WHMCS.

 

I have tested it both ways: from user and admin, and the piping is working perfectly!

 

NOTE: Even though I am using X3 theme in C-Panel, using only "public_html/subdomain/pipe/pipe.php" DID NOT work. Even though the Trace in Cpanel resolved, it would not pipe through. It started working by changing the command for piping.

 

Hope this helps someone along the way!

Link to comment
Share on other sites

  • 1 year later...

I am really confused now. I tried to enter as it is described below in my main account (not the subdomain and other cpanel account with WHMCS) and when I save the forwarder it changes it to |/home/main account cpanel/php -q /home/sub domain cpanel account/public_html/pipe/pipe.php

 

I try to send an email the support@maindomain.com and get the following error - pipe to |/home/main account cpanel/php -q /home/sub domain cpanel account/public_html/pipe/pipe.php

generated by support@maindomain.com

local delivery failed

 

Can i ask for clarity in what you meant by "it all changed when you changed the command for piping"?

 

Thanks

 

Reading through this post to understand how the piping works and how to setup it properly, I came across this post. It appears that this post is referring to setting up piping using a primary domain email with WHMCS installed on a sub-domain.

 

For example:

Domain: somedomain.com

Pipe Email: someone@somedomain.com

WHMCS: subdomain.somedomain.com

 

There are many ways listed here to set it up so I figured I would add the way I got mine working without the extra email accounts and forwarding. I do not know if this will work for everybody, but I did it without the extra forward to a someone@subdomain.somedomain.com

 

I used the directions found here: http://wiki.whmcs.com/Email_Piping

 

My subdomains I create will work with either of the following addresses:

http://subdomain.somedomain.com

http://www.somedomain.com/subdomain

 

I use C-Panel (X3) and created a forward from someone@somedomain.com using this command (found from my WHMCS Support Departments):

php -q /home/cpaneluser/public_html/subdomain/pipe/pipe.php

(original command included a "|" in front of php but cpanel forwarders would not accept it)

 

Replace the "cpaneluser" with your cPanel Username and replacing "subdomain" with the folder you actually used to install WHMCS.

 

I have tested it both ways: from user and admin, and the piping is working perfectly!

 

NOTE: Even though I am using X3 theme in C-Panel, using only "public_html/subdomain/pipe/pipe.php" DID NOT work. Even though the Trace in Cpanel resolved, it would not pipe through. It started working by changing the command for piping.

 

Hope this helps someone along the way!

Link to comment
Share on other sites

I just realised a possible slight difference in my setup. I have my main domain with the emails and then the sub domain with whmcs, and they are in separate Cpanel accounts... although on the same server/whm.

 

That is the same setup we all have (WHMCS in a sub account)

 

Did you setup the forwards like in 2) and 3) in the opening post? (a forward from the main domain to the sub domain and then a forward in the sub domain to the WHMCS pipe)

 

What DepotMan is refering too is that he had to change the Pipe from

"| php -q /home/username/public_html/whmcs/pipe/pipe.php"

to

"/home/username/public_html/whmcs/pipe/pipe.php"

in order for cPanel to accept it. (username should be your username on the server)

Link to comment
Share on other sites

Thanks for responding... I was trying to follow the path of not setting up al the forwarding etc which just felt really complicated open to risk. When I tried to enter the pipe it just came back as I mentioned with |/home/main account cpanel/php -q /home/sub domain cpanel account/public_html/pipe/pipe.php... something like a double negative : )

 

I ended up using the pop import and it worked straight away. Obviously running a cron every 5 minutes is not my preferred option but it worked straight away and I got very confused trying to sift through everyones comments and then getting the above thing back when i tried just did it for me...

 

Perhaps I miss read some of the comments but the forwarding from here to there just seemed a bit too much.

Link to comment
Share on other sites

  • 8 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated