Open francoislepage opened 6 years ago
While performing more troubleshoot, I noticed the following logs :
In Apache error logs
[Sun Aug 05 14:40:22.743053 2018] [proxy_fcgi:error] [pid 10267:tid 139895850878720] [client 192.xxx.xxx.xxx:0] AH01071: Got error 'PHP message: osTicket RewritePlugin: Bootstrappin..\n', referer: https://help.mydomain.com/scp/tickets.php
In osTicket
Going to get brutal with regex against the ticket.. hold onto your hat!
The last one being quite humorous. This was after enabling : DUMPWHOLETHING
Hmm, others have tried the regex thing as well, it's complex. I'd suggest the easiest for that is to actually add a custom method to the plugin. Does osTicket even use the Reply-To address? hmm.
Hi,
Yes, osTicket have an option to use the Reply-To instead of the regular header as part of the filter system. I'm not sure thought is this would work with your code Regardless, we ended up deciding on developing a custom function that will extract and use the right headers.
Thank you for your answer!
Ok, if you want to submit it as a pull request others might appreciate it mate. But either way, glad it works. 🙂
I am not developing it myself, I asked for help and development did not start yet. I'm not sure if integration with plugin-fwd-rewriter will be straight forward, but if there is something I can share, I will definitely do so.
Kind regards,
Oh I see. I thought you had added a method to the plugin, lol.
On Wed, 22 Aug. 2018, 23:08 Francois Lepage, notifications@github.com wrote:
I am not developing it myself, I asked for help and development did not start yet. I'm not sure if integration with plugin-fwd-rewriter will be straight forward, but if there is something I can share, I will definitely do so.
Kind regards,
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/clonemeagain/plugin-fwd-rewriter/issues/7#issuecomment-415025415, or mute the thread https://github.com/notifications/unsubscribe-auth/AE15j7H9gsR0MHckkGs6kNBgou6QNmarks5uTVe9gaJpZM4Vve1p .
Hi,
Congratulations and thank you for making this plugin available. :-)
I am trying to use it to rewrite the email headers of emails containing a voicemail as an mp3 attachment, using the RegEx rewriter.
The following headers are inserted in the original email being sent to osTicket :
I though I would match them, and replace them with a Reply-To header such as
Reply-to: "FirstName LastName" <sms+5142224444@myvoipprovider.net>
..knowing that I configured osTicket to use the Reply-To information.
Here is the $pattern, $replacement I am using :
/X-Asterisk-CallerID:\s(\d{10})\nX-Asterisk-CallerIDName:\s(.+)$/m||Reply-To: "$2" <sms+$1@myvoipprovider>
Since I am trying to match headers and that the ":" separator was in my way, I did edit config.php and class.RewriterPlugin.php to use "||" as a separator, which seem to work, since "the confirmation message in the admin panel reports $pattern and $replacement properly". I do have to set <, > " using html escape characters.
I can confirm the plugin runs because I can re-write emails addresses properly (non-regex).
I'm not sure what I am missing here, but I do not get any system logs, debug traces, etc, when only using the RegEx replacement.
My RegEx and replacement were tested successfully outside of the plugin. I'm wondering if the issue has something to do with me trying to perform a multi-line match /m,
Your insights on this would be greatly appreciated.
Thank you