bug-mailfromd
Re: [Bug-mailfromd] attachment filtering / removal
>
> > Currently I just have a loop testing for 20+ file types/extensions,
>
> You needn't iterate over them, just pack them all in one regular
> expression instead, e.g.:
>
> mime_match_filename(current_message(), '\.((exe)|(zip)|(png))$')
>
> To automate maintaining such a regexp, use emacs regexp-opt function, or
> this Perl module:
>
> https://metacpan.org/pod/List::Regexp
>
> E.g. running
>
> regexp-opt zip exe bz2 xz xls pdf png
>
> produces
>
> (bz2|exe|p(df|ng)|x(ls|z)|zip)
>
I am not so sure this is nice. I am reporting back in the error the file type. Not sure if this is possible with such construct. I also have on the top some config statement that I can easily change.
static string blockedatt "cmd cpl diagcab diagcfg diagpkg dl