Disabling certain attachment types

Moderator: crythias

Post Reply
jlmacho
Znuny newbie
Posts: 6
Joined: 06 Oct 2016, 17:44
Znuny Version: 5.0.16-01
Real Name: Jose Luis

Disabling certain attachment types

Post by jlmacho »

Hi,
I would like to know how I can disable certain types of attachments, there are certain file extensions that I want to disable.
It's possible?
Can somebody help me?
Thanks,
Regards
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Disabling certain attachment types

Post by reneeb »

What do you mean with "disable"? Do you want to filter attachments from incoming mails? Do you want agents to not upload attachments of some types?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
jlmacho
Znuny newbie
Posts: 6
Joined: 06 Oct 2016, 17:44
Znuny Version: 5.0.16-01
Real Name: Jose Luis

Re: Disabling certain attachment types

Post by jlmacho »

I want to prevent certain attachments from being added to OTRS (.exe, .sh for example)
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Disabling certain attachment types

Post by reneeb »

To avoid those attachments in incoming mails, you could write your own postmaster filter module. For the agents stuff, you should train your agents, and you can change the code of all modules that allow uploading files....
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
wurzel
Znuny guru
Posts: 3230
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Disabling certain attachment types

Post by wurzel »

Hi,

for incoming E-Mail I would use a Content Filtering before the E-Mail arrives OTRS.

Found this on
https://stackoverflow.com/questions/568 ... -on-apache
for .htaccess

Code: Select all

<FilesMatch "(^#.*#|\.(exe|bak|config|dist|fla|inc|ini|log|psd|sh|sql|sw[op])|~)$">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>
Maybe this works? (untested)

regards,
Florian
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Disabling certain attachment types

Post by reneeb »

You .htaccess stuff is only for accessing .exe files. That doesn't affect the possibility to attach .exe files to tickets...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
wurzel
Znuny guru
Posts: 3230
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Disabling certain attachment types

Post by wurzel »

Hi,

mhh... did not know that.
There should be an upload restriction possible, too. Or is a contenfilter/proxy needed for this?

Or is a module for OTRS available somewhere?

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
pfipf
Znuny advanced
Posts: 123
Joined: 14 Jul 2017, 09:30
Znuny Version: 6 Free
Real Name: Günter
Company: KIT

Re: Disabling certain attachment types

Post by pfipf »

Hi,

I'm facing the same problem. For security reasons I have to disallow various attachment file types.
Are there any plans for implementing such a feature in future versions?
I guess this would be appreciated by many admins.

Thanks.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Disabling certain attachment types

Post by jojo »

You can submit your idea here: https://otrsteam.ideascale.com/
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
pfipf
Znuny advanced
Posts: 123
Joined: 14 Jul 2017, 09:30
Znuny Version: 6 Free
Real Name: Günter
Company: KIT

[SLOVED] Re: Disabling certain attachment types

Post by pfipf »

Thank you JoJo for your quick reply.
I submitted this idea as suggested: https://otrsteam.ideascale.com/a/idea-v2/546212
I believe this thread can be closed.
Post Reply