Initial release
[manu/RT-Extension-AttachmentFilter.git] / README
1 NAME
2     RT-Extension-AttachmentFilter - Set forbidden attachments file names or
3     extensions
4
5 DESCRIPTION
6     Ses RT extension allows to forbid some files names or extensions from
7     web attachment upload.
8
9     It's use may be to match an existing mail policy.
10
11     The filter can be defined per queue so queues that do not have outgoing
12     emails configured can have less restrictions.
13
14     See the configuration example under "INSTALLATION".
15
16 INSTALLATION
17     "perl Makefile.PL"
18     "make"
19     "make install"
20         May need root permissions
21
22     Edit your /opt/rt4/etc/RT_SiteConfig.pm
23         If you are using RT 4.2 or greater, add this line:
24
25             Plugin('RT::Extension::AttachmentFilter');
26
27         For RT 4.0, add this line:
28
29             Set(@Plugins, qw(RT::Extension::AttachmentFilter));
30
31         or add "RT::Extension::AttachmentFilter" to your existing @Plugins
32         line.
33
34         Then configure the limits using the $AttachmentFilter config option.
35         This option takes the generic form of:
36
37             Set( $AttachmentFilter, 
38                 '*'    => 'regexp',
39                 queue1 => 'regexp',
40             );
41
42         which allows to set limit per queue. '*' means for all queues that
43         do not have a specific filter.
44
45         'regexp' is a perl regular expression against the filename.
46
47     Clear your mason cache
48             rm -rf /opt/rt4/var/mason_data/obj
49
50     Restart your webserver
51
52 IMPLEMENTATION DETAILS
53   Methods
54    CheckAttachmentName
55     This is the main routine, it takes an attachment file name and an
56     optional queue (name, id or object) and validate it against RT
57     $AttachmentFilter configuration.
58
59     Returns undef if allowed, (1, error message) else.
60
61 TODO
62     Dynamic enforcement using javascript
63
64 AUTHOR
65     Emmanuel Lacour, <elacour@home-dn.net>
66
67 BUGS
68     All bugs should be reported via email to
69
70         L<bug-RT-Extension-AttachmentFilter@rt.cpan.org|mailto:bug-RT-Extension-AttachmentFilter@rt.cpan.org>
71
72     or via the web at
73
74         L<rt.cpan.org|http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-AttachmentFilter>.
75
76 LICENSE AND COPYRIGHT
77     This software is Copyright (c) 2016 by Emmanuel Lacour
78     <elacour@home-dn.net>
79
80     This is free software, licensed under:
81
82       The GNU General Public License, Version 2, June 1991
83