I have RT 6 with Nginx configured and mysql.
I have done many tried to restrict file extensions using scrips and in “RT_Siteconfig.pm, other than pdf and jpg but failed to do so.
Now, I’m totally faded up. Please provide me full solution in which i may restrict attachments other than pdf and jpg only.
I have also studied the best practical guideline but no positive solution found yet.
Please help me out.
Thanks.
Where do you need to restrict attachments?
In the admin web interface, or also received via email?
1st, I want to disable “Choose File" option while creating new ticket or any correspondence in tickets.
2nd, i want to restrict normal user to attach only pdf and jpg while creating new ticket or any correspondence of tickets.(MIME Types)
I’ve posted this on the Wiki with two ways to customise RT to restrict attachment types, either in the web frontend and/or the backend:
I also added a config option $DisableAttachments which allows to disable it entirely in the web UI if that is what you really want to do.
Let me know if this is useful as I may be able to package it as an extension at some point to make it easier to install.
I need to restrict both in the admin web interface and also received via email.
Attachment for user restrict in create tickets for MIME Types other than PDF and JPG.
In that case, you can implement both of the customisations I mentioned on the Wiki page:-
1st, I want to disable “Choose File" option while creating new ticket or any correspondence in tickets.
See the wiki page above, option $DisableAttachments will disable that but everywhere.
2nd, i want to restrict normal user to attach only pdf and jpg while creating new ticket or any correspondence of tickets.(MIME Types)
I am not sure what you mean by “normal user to attach only pdf and jpg” - do you mean:
- external users accessing vial the SelfService web interface?
- external users updating via email?
- Staff users updating via RT web interface?
- Staff users updating via email?
RT has a self-service web interface for unprivileged users which uses the same components for as the staff interface for attachments. So, if you want to apply different restrictions for staff and unprivileged users in the web UI, you would need to modify the templates for the SelfService interface.
Blocking or restricting attachments received by email only for external users seems difficult to do. It might be easier to do on the mail server before RT receives the email, for example.
Did this help you @S.M.Mobeen_Tirmizi ?