On 2011-12-15 3:27 PM, Christian Boltz <pos...@cb...> wrote:
> Hello,
>
> Am Donnerstag, 15. Dezember 2011 schrieb Tanstaafl:
>> I'd appreciate some comments/replies on this Feature Request for a
>> documented way to easily add new from/mailfrom strings that will cause
>> the vacation message to NOT be sent...
>>
>> I have seen numerous vacation messages sent that should NOT be sent
>> (one example is documented on the FR)...
>>
>> https://sourceforge.net/tracker/?func=detail&atid=937967&aid=2813224&g
>> roup_id=191583
>
> Have a look at vacation.pl around line 558 to 569. There are lines like
> (broken into multiple lines for better readability)
>
> elsif (/^List\-(Id|Post|Unsubscribe):/i) {
> $logger->debug("List-$1: found; exiting");
> exit (0);
> }
>
> You can add similar lines there, for example
>
> elsif (/^autoresponders-are:\s+evil/i) {
> $logger->debug("autoresponders-are: evil found; exiting");
> exit (0);
> }
>
> would not respond to mails which have this header:
> Autoresponders-are: evil
Thanks Christian, but I have tried this about a year ago, but never
could get it to work (vacation messages would still go out.
> It shouldn't be too hard to make that a config option with an array or
> hash of regular expressions + corresponding log message, and I'll
> happily accept a patch implementing that.
Wish I could, but that would be way beyond my pay grade. ;)
> OTOH, I'm not sure if it is a good idea to make it configureable in the
> web interface. It might sound like a good idea at the first look, but
> IMHO people who can write proper regular expressions are the same people
> who prefer a config file ;-) - and everybody else could cause some
> breakage by wrong regular expressions.
I agree regexes are easily messed up, which is why I'd like this to be
in the GUI - to avoid mistakes. I'd like to simply be able to add a text
string that would be added to a list of 'generic headers' (anything in a
From or Envelope header) to not respond to - so if I add the string
'Autoresponders-are: evil' (minus the quotes), then the GUI would set up
the regex properly.
|