This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Email Protection -> Quarantine Report -> Script language question

Hi to all,

I am working on a modification for the Quarantine Report of Sophos UTM Email Protection.
I am modifying the file /var/storage/chroot-smtp/etc/digest/digest and so far it works like I expect it.

My question is now ... there are some script parts within this file to control the dynamic content.
These syntax is f.e. <? $MsgRelease ?>.
To use this example in this variable $MsgRelease the release link for a quarantined mail is stored.

What I now want to achive is to paste the content of this Variable into a mailto: line but this does not work correctly as this $MsgRelease contains special characters like & which are control characters for a mailto line.

In other occasions I re-formatted variables like this with HEX or converted them to a URL string but I cannot figure out which kind of script language is used on the UTM.
Can someone please tell me what script language is used so that I can have a look on what commands are available on this language to reformat the output of $MsgRelease ... 

Thanks a lot!

And yes I know working on the CLI like this modifying files means no warranty ... 

Best regards

Jupp



This thread was automatically locked due to age.
Parents
  • Hallo Jupp and welcome to the UTM Community!

    Sounds like a fun project, but did you know that if you don't have a user in the UTM, it won't send a Quarantine Report for his email address - rather a single email for each email quarantined?

    Likewise, if you disable the Quarantine Report for everyone, everyone will receive an email each time an email is quarantined.  If users receive individual emails instead of a Quarantine Report, they can bulk manage their quarantine with the User Portal.

    You might play with those things a bit to see if there's an easier way to accomplish your goal.

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hi Bob and thanks for the warm welcome!

    Maybe you are right but in this special case it would be easier if I could "just" modify the generated link.

    Maybe it helps understanding what I want to achive by sharing this example with you:

    the "default" release link that is stored in the variable <? $MsgRelease ?> looks like:

    https://FQDN-of-UTM:3840/release.plc?proto=smtp&cluster_ID=2&message_ID=randomstring&size=size&whitelist=0

    What I want to achive is to "reformat" the escape characters within this link to hex so that they can be used with Outlook in a mailto link like:

    mailto:to-addess?subject=<? $MsgRelease with hex encoded escape characters ?>&body=To release this message from quarantine, send this email and keep the subject unchanged! %0A%0AAlternatively use the following link:%0A <? $MsgRelease with hex encoded escape characters ?>

    On a different system which uses Smarty Template Engine I achieved it with <? $MsgRelease|escape:'hex' ?> but on UTM it is not Smarty they use and the |escape:'hex' seems to be unknown.

    That´s why I am asking if someone can help me figure out which script engine is used in UTM so that I can "reformat" the escape characters in  <? $MsgRelease ?> ...

    Thanks

    Jupp

  • please ... every hint is helpful and urgently needed!

    Thanks again!

    Jupp

Reply Children
No Data