Page 4 of 8

Re: HESK e-mail piping public BETA (test version)

Posted: Wed Dec 22, 2010 1:11 pm
by Klemen
Please use this topic exclusively for issues related to the e-mail piping script.

For your problem see
http://www.hesk.com/knowledgebase/?article=25

Re: HESK e-mail piping public BETA (test version)

Posted: Wed Dec 29, 2010 10:53 pm
by sympsodon
Hi!

I have installed HESK to run locally in my pc and it is working perfect.

I have tried to configure my cpanel, but i am having problems, as i do not know the right path to pipe to a program.

If i set it to: localhost/hesk/inc/mail/hesk_pipe.php
When i save the settings it is changed to: |/home/aquariav/localhost/hesk/inc/mail/hesk_pipe.php

If i set it to: hesk/inc/mail/hesk_pipe.php
then it is changed to: |/home/aquariav/hesk/inc/mail/hesk_pipe.php

Will it work locally?

Thank you and best regards!
Sympso.

Re: HESK e-mail piping public BETA (test version)

Posted: Thu Dec 30, 2010 5:49 pm
by Klemen
You are mixing host names (localhost) with server paths (actual folder/file path on the system), it's like mixing apples and peaches.

The correct path to use probably is
|/home/aquariav/public_html/hesk/inc/mail/hesk_pipe.php

Re: HESK e-mail piping public BETA (test version)

Posted: Thu Dec 30, 2010 6:22 pm
by sympsodon
I have tried that path and it is not working.

The problem is that i am running locally HESK, and the directory suggested is for the domain of the emails. But i need to tell the forwarded to go locally.

I want to run it locally because in the compueters where is going to be used do not have the posibility of browsing (enterprise policy), only emails can work.

I do not know if i am transmiting correctly the information. Please let me know.

Thank You!
Sympso.

Re: HESK e-mail piping public BETA (test version)

Posted: Fri Dec 31, 2010 11:05 am
by mdiehl
Klemen wrote:Matthias, could you try changing this code in your inc/mail/hesk_pipe.php file

Code: Select all

rename($v['stored_name'],HESK_PATH.'attachments/'.$myatt['saved_name']);
Change the HESK_PATH.'attachments/' part to the full path of your attachments folder (even if you set the HESK_PATH to full pathbefore), for example:

Code: Select all

rename($v['stored_name'],'/home/username/public_html/hesk/attachments/'.$myatt['saved_name']);
If that doesn't help you can try deleting that code and see if this one works instead:

Code: Select all

copy($v['stored_name'],HESK_PATH.'attachments/'.$myatt['saved_name']);
unlink($v['stored_name']);
Hi Klemen,
sorry but I keep getting zero byte Attachments having tried both options. Is there a way to check the attachments on the server, so that I can find out if they are stored correct? Maybe it is only a matter of downloading the attachments?
All the best to you and your family and a healthy new year

Re: HESK e-mail piping public BETA (test version)

Posted: Fri Dec 31, 2010 8:51 pm
by mdiehl
I found out some more interesting things.
The attachments are there and have the correct site. The problem is the owner and the rights. The attachments have the rights 600 and belong to nobody:nogroup. Therefor they cannot be opened.
So the "only" thing that needs to be done is to chmod the files after they are created.

Re: HESK e-mail piping public BETA (test version)

Posted: Sat Jan 01, 2011 5:01 pm
by Klemen
@sympsodon:

I'm afraid I can't be of much help then as I neither know exactly how your server is setup nor do I have experience in such setups. I would recommend asking for help your system admin (the one who set up your local mail exchange) for the correct e-mail piping setup.

@mdiehl:

Happy new year to you too! Are you on Windows or Linux? You can try adding this code

Code: Select all

chmod($myatt['saved_name'],0644);
just below

Code: Select all

rename($v['stored_name'],HESK_PATH.'attachments/'.$myatt['saved_name']);
in your hesk_pipe.php file and see if that helps.

Re: HESK e-mail piping public BETA (test version)

Posted: Sat Jan 01, 2011 5:18 pm
by mdiehl
Hello Klemen,
nope, that didn't work. The file still has nobody:nogroup as owner and 0600 as rights-
The script is running on Debian Sarge.

Re: HESK e-mail piping public BETA (test version)

Posted: Sat Jan 01, 2011 11:43 pm
by sympsodon
Will it be possible to jet the incoming emails via POP?

Thank you Sympso!

Re: HESK e-mail piping public BETA (test version)

Posted: Tue Jan 04, 2011 5:18 am
by mdiehl
Hi Klemen,
here are the missing informations that I owe :)

Operating system (Windows, Linux, ...): Linux, Debian 5.0.6
PHP version: 5.2.6.1
MySQL version: 5.0.51a-24
Description of bug: Attachments have owner nobody:nogorup and rights 0600
Exact steps to reproduce the bug: Installed HESK mail pipe script on this system. The attachments are made but with the above settings. Therefor you cannot download or view the attachments.

Re: HESK e-mail piping public BETA (test version)

Posted: Tue Jan 04, 2011 6:01 pm
by Klemen
@sympsodon: in version 2.3, which should include the first officially supported piping module, most likely not yet via POP3. But definitely in the future.

@mdiehl: if you FTP to the attachments folder and manually change chmod to 644 can they be downloaded then?

If yes try this code instead:

Code: Select all

chmod(HESK_PATH.'attachments/'.$myatt['saved_name'],0644);
If it doesn't help double-check that you pasted the chmod() code BELOW the other line of code I posted. Also make sure chmod() is not a disabled function in your php.ini file. Also check if you have any "error_log" files inside the Hesk folder or if there are any Hesk-related errors in your appache error log.

Are you running PHP in safe mode?

Re: HESK e-mail piping public BETA (test version)

Posted: Tue Jan 04, 2011 7:26 pm
by mdiehl
Klemen wrote:@mdiehl: if you FTP to the attachments folder and manually change chmod to 644 can they be downloaded then?

If yes try this code instead:

Code: Select all

chmod(HESK_PATH.'attachments/'.$myatt['saved_name'],0644);
Hi Klemen,
thank you so much. It works using your code line above. Now the attachments are working properly.
Again: Thank you so much!
I appreciate your help! I bought a license and hope other swill do also to keep up this fabolous support!

Re: HESK e-mail piping public BETA (test version)

Posted: Tue Jan 04, 2011 8:53 pm
by Klemen
Glad to hear that worked and thanks for supporting me!

Script "drops" letters

Posted: Sat Jan 08, 2011 5:17 am
by mdiehl
Hi Klemen,
I found another incident with the email piping script.

Operating system (Windows, Linux, ...): Linux, Debian 5.0.6
PHP version: 5.2.6.1
MySQL version: 5.0.51a-24
Description of bug:
Sending an email to the script may result in missing letters in the ticket. The formatting also gets lost, so that the text is no longer consisting any paragraphs.
It seems to me as if the Carriage Returns and Line Feeds disappear, together with some letters.

For example, the mail content is

Code: Select all

beim Versuch es zu installieren kam der Hinweis
and the ticket text

Code: Select all

 Beim Veuch es zu itallieren kam der Hinweis
and

Code: Select all

Schon vorab tausend Dank für Ihre schnelle Hilfe!

Mit freundlichen Grüßen
appears as

Code: Select all

Schon vorab tausend Dank für Ihre schnelle Hilfe!Mit freundlichen Grüßen
This only happens when the mail is redirected (Apple Mail does that). Forwarding the mail works fine.
Redirecting is a great way to create a ticket, keeping the original sender so that the "new ticket mail" goes to the customer instead of me.

If it helps I can send you the original mail and the ticket text that was produced by PN.

Best regards
Matthias

Re: HESK e-mail piping public BETA (test version)

Posted: Sat Jan 08, 2011 9:53 am
by Klemen
I assume it's an encoding problem. If it works fine without Apple Mail but then doesn't anymore it's possible that Apple Mail is modifying the encoding. Please do PM me the full messages and I will have a look.

Also let me know what encoding you use in the Hesk language file and what in the e-mail.