Postmaster filter for empty subject

Moderator: crythias

Locked
benkeesing
Znuny newbie
Posts: 12
Joined: 19 Nov 2012, 10:43
Znuny Version: 3.3.6
Real Name: Ben
Company: MIQ

Postmaster filter for empty subject

Post by benkeesing »

Hi,

I was just wondering how I would configure the Postmaster Filters to filter an email based on the subject being empty.

I have the set email headers configured correctly but I just cant seem to get the right thing in the Value box.

I would prefer to do this through the web interface.

Please let me know if you need any more info on this.

Thanks,
Ben.
OTRS Version 5.05
ITSM Version 5.0.5
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Postmaster filter for empty subject

Post by reneeb »

The regex for empty subjects is ^$ or \A\z
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
benkeesing
Znuny newbie
Posts: 12
Joined: 19 Nov 2012, 10:43
Znuny Version: 3.3.6
Real Name: Ben
Company: MIQ

Re: Postmaster filter for empty subject

Post by benkeesing »

Hi,

Thank you for your response.

Unfortunately neither of these expressions worked for rejecting the email.

Would it help to see a screenshot?

Thanks
OTRS Version 5.05
ITSM Version 5.0.5
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Postmaster filter for empty subject

Post by reneeb »

Yes, please show a screenshot
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
benkeesing
Znuny newbie
Posts: 12
Joined: 19 Nov 2012, 10:43
Znuny Version: 3.3.6
Real Name: Ben
Company: MIQ

Re: Postmaster filter for empty subject

Post by benkeesing »

Please see the attached .jpg

Thanks
You do not have the required permissions to view the files attached to this post.
OTRS Version 5.05
ITSM Version 5.0.5
bin
Znuny newbie
Posts: 29
Joined: 06 Jan 2011, 10:29
Znuny Version: 3

Re: Postmaster filter for empty subject

Post by bin »

Hi

If you just want to blow it away and never see it then use header X-OTRS-Ignore - true

http://doc.otrs.org/3.1/en/html/adminar ... ilter.html

Regds

bin
benkeesing
Znuny newbie
Posts: 12
Joined: 19 Nov 2012, 10:43
Znuny Version: 3.3.6
Real Name: Ben
Company: MIQ

Re: Postmaster filter for empty subject

Post by benkeesing »

We want to let the user know that their call has been rejected due to now subject which is handled in the bottom part (or can be as we are currently doing this in the same way for something else) The difficulty is getting the filter to detect that there is nothing in the subject field and then push it through. When trying \A\z or ^$ it did not work and still created the ticket as normal.
OTRS Version 5.05
ITSM Version 5.0.5
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Postmaster filter for empty subject

Post by jojo »

Please show a picture of the Queue Definition of your Auto Reject Queue
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
benkeesing
Znuny newbie
Posts: 12
Joined: 19 Nov 2012, 10:43
Znuny Version: 3.3.6
Real Name: Ben
Company: MIQ

Re: Postmaster filter for empty subject

Post by benkeesing »

Hi JoJo,

I do not believe the error lies here as currently have a filter that picks up the company number in the body (rejected on signatures) and then rejects the call using the same queues as we are trying for the empty subject ones.

If you still feel you would like to see this just let me know.

Thanks.
Ben
OTRS Version 5.05
ITSM Version 5.0.5
benkeesing
Znuny newbie
Posts: 12
Joined: 19 Nov 2012, 10:43
Znuny Version: 3.3.6
Real Name: Ben
Company: MIQ

Re: Postmaster filter for empty subject

Post by benkeesing »

Any one have any ideas on this? Or if it can even work?
OTRS Version 5.05
ITSM Version 5.0.5
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Postmaster filter for empty subject

Post by reneeb »

This can't work, because IMHO there is a bug in OTRS. I've filed a bug at http://bugs.otrs.org/show_bug.cgi?id=8941

You can either patch the module in the way I've described it in the bugreport or write your own postmaster filter module.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
benkeesing
Znuny newbie
Posts: 12
Joined: 19 Nov 2012, 10:43
Znuny Version: 3.3.6
Real Name: Ben
Company: MIQ

Re: Postmaster filter for empty subject

Post by benkeesing »

Thanks Reneeb, will keep checking in on your bug post.
OTRS Version 5.05
ITSM Version 5.0.5
Locked