Block mails with empty Subject

Moderator: crythias

Locked
AlexanderH
Znuny newbie
Posts: 5
Joined: 20 Apr 2012, 12:33
Znuny Version: 3.0.11

Block mails with empty Subject

Post by AlexanderH »

Hi,

I want to block/ignore incoming E-Mails without Subject, but the Postmasterfilter doesn't accept it when I leave the Subjectfield empty.

Then I tried this in the Confg.pm with different statements in the Subjectfield "^$" "$".

Code: Select all

# Job Name: Subject-empty
    # (block/ignore all spam email with no Subject)
    $Self->{'PostMaster::PreFilterModule'}->{'noSubject'} = {
        Module => 'Kernel::System::PostMaster::Filter::Match',
        Match => {
            Subject => '',
        },
        Set => {
            'X-OTRS-Ignore' => 'yes',
        },
     };
every statement didn't work.

Does anyone have a solution to that Problem?
Last edited by AlexanderH on 22 Aug 2012, 15:11, edited 1 time in total.
[LIVE]OTRS 3.1.8
[TEST]OTRS 3.1.8
ITSM 3.1.5
Windows Server 2008 R2 Standard
mysql 5.1.51
Appache
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Block mails with empty Subject

Post by crythias »

This is probably not the issue, but the posted information isn't closed curly brace };
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
AlexanderH
Znuny newbie
Posts: 5
Joined: 20 Apr 2012, 12:33
Znuny Version: 3.0.11

Re: Block mails with empty Subject

Post by AlexanderH »

This evil curly brace didn't wanted to get copied out of the "config.pm" but you are right its not the issue.

I am not really into perl so maybe I did something wrong with the syntax "if the subject is empty then block the e-mail" thing.
[LIVE]OTRS 3.1.8
[TEST]OTRS 3.1.8
ITSM 3.1.5
Windows Server 2008 R2 Standard
mysql 5.1.51
Appache
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Block mails with empty Subject

Post by crythias »

Try RegEx *$
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked