
Hi Marc, On Thu, Apr 15, 2004 at 12:04:15AM +0200, marc@mercator.net wrote:
I have read about the filtering/dispatching PostMaster module and added the following to my Config.pm:
$Self->{DefaultCloseNoteText} = '-'; # # # added by Marc to delete/filter spam # # Job Name: 1-Match # (block/ignore all mails with Subject "Mail Delivery") $Self->{'PostMaster::PreFilterModule'}->{'1-Match'} = { Module => 'Kernel::System::PostMaster::Filter::Match', Match => { Subject => 'Mail Delivery', }, Set => { 'X-OTRS-Ignore' => 'yes', }, }; _______________
However, since I receive many mails with subjects that identify them as spam or unwanted mail or something I do NOT want to receive, can I JUST add more "subjects" in this patch or do I have to create a new entry for EACH subject?
I mean, could I just put for example:
Match => { Subject => 'Mail Delivery', Subject => 'Re: Your Order', Subject => 'I love you',
etc in this patch or do I have to create ONE for each subject?
I mean, I want to filter mails with EITHER subject, of course not mail that have ALL three subjects.
You can do this with regexp like: $Self->{'PostMaster::PreFilterModule'}->{'1-Match'} = { Module => 'Kernel::System::PostMaster::Filter::Match', Match => { Subject => '(Mail Delivery|Re: Your Order|I love you)', }, Set => { 'X-OTRS-Ignore' => 'yes', }, };
Marc
Martin Edenhofer -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Manage your communication!