Page 1 of 1

Attachment wildcard

Posted: Thu Aug 09, 2012 2:53 pm
by MobiCompany
Hesk Version 2.3 - paid version
What terms did you try when SEARCHING for a solution: Attachment wildcard

Write your message below:

Hello Klemen,

If somebody emails for example with Thunderbird an email message, and has a second
message in an attachment, the attachment is stripped from the email and doesn't
show up in the ticket system.

The setting for accepting attachments is on.
Accepting .gif,.jpg,.png,.txt,.pdf,.doc,.docx,.txt,.rtf,.csv,.xls,.xlsx,.pst,.eml

All the above attachments end up in the ticket system, no problems, works perfect.
Only forwarded emails, being forwarded as an attachment, are stripped.

Is there an wildcard option to accept all incoming attachments ? I've tried ,*
but that didn't help. Please let me know if i missed a solution or a faq.
If it's not a setting i have to find a coder ;-)

Thanks

Re: Attachment wildcard

Posted: Thu Aug 09, 2012 3:01 pm
by Klemen
Do you know exactly what extension those attachments have?

Perhaps the attachment is embedded in the email? In that case perhaps version 2.4 might help (released hours ago with improved piping/pop3 fetching)?

Also, feel free to forward me a sample message to (removed) and I will have a look.

Re: Attachment wildcard

Posted: Thu Aug 09, 2012 3:18 pm
by Klemen
Looks like those attachments have no extension. You can try this to force save them as text:

In inc/mail/hesk_pipe.php change

Code: Select all

$ext = strtolower(strrchr($myatt['real_name'], "."));
to this:

Code: Select all

$ext = strtolower(strrchr($myatt['real_name'], ".")) or $ext = '.txt';
Does that help?

Re: Attachment wildcard

Posted: Thu Aug 09, 2012 3:41 pm
by MobiCompany
sorry, it broke the email pipe-ing all together

Line 117 $ext = strtolower(strrchr($myatt['real_name'], ".")) or $ext = '.txt';

pipe to |/usr/home/ourdomain/public_html/inc/mail/hesk_pipe.php
generated by email@ourdomain.com
(ultimately generated from email@ourdomain.com)
local delivery failed

Re: Attachment wildcard

Posted: Thu Aug 09, 2012 3:54 pm
by Klemen
Are you sure your modified file is chmod-ed to 755?

Does enabling Debug mode in settings give any other errors in the returned mail?

Re: Attachment wildcard

Posted: Fri Aug 10, 2012 12:41 am
by MobiCompany
Edit line 117 $ext = strtolower(strrchr($myatt['real_name'], ".")) or $ext = '.txt';

and

chmod-ed to 755 (that was the trick ... )

Tested with multiple attachments, strange formats. It all works. Thanks for the
support and please check your beer money account :D

Re: Attachment wildcard

Posted: Fri Aug 10, 2012 5:53 am
by Klemen
Thanks for the very generous donation, you didn't have to!