maybe a bug with PostMaster filters in 5.0.12?

Moderator: crythias

Post Reply
Thomymaster
Znuny newbie
Posts: 76
Joined: 26 Sep 2016, 10:50
Znuny Version: 5.0.12
Company: MPImF Heidelberg

maybe a bug with PostMaster filters in 5.0.12?

Post by Thomymaster »

Hi


I setup a PostMaster filter to reject emails not from a special group of senders. For this i used the "From" field. As the list of e-mail addresses is very long, i hit the maximum number of characters in the "value" field.

To work around this i used the next line and continued with the "From" field.
Upon saving i noticed that only the last line with the "From" field is saved, the other one is gone.

What can i do now? Is this by design and if so, how can i extend the number of characters i can insert into the "value" field?

Best,
Thomas
OTRS 5.0.12 on Ubuntu 14.04 LTS
OTRS 5.0.27 on Ubuntu 16.04 LTS
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: maybe a bug with PostMaster filters in 5.0.12?

Post by reneeb »

You might have several options:

* You could add a second postmaster filter.
* Maybe you can improve the regular expression
* Use http://opar.perl-services.de/dist/JunkFilter-5.0.1 - there you can define unlimited addresses in the sysconfig

Edit: it works as designed that each field can be selected once.
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
wurzel
Znuny guru
Posts: 3228
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: maybe a bug with PostMaster filters in 5.0.12?

Post by wurzel »

Hi,

the from field is possible once per Filter.
Use regular expressions for simplifying matching criterias.

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
root
Administrator
Posts: 3954
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: maybe a bug with PostMaster filters in 5.0.12?

Post by root »

all filter conditions (and set e-mail headers) are unique per PostMaster Filter. They are stored in key/values pairs. That means the last value of multiple keys (header) wins.
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Thomymaster
Znuny newbie
Posts: 76
Joined: 26 Sep 2016, 10:50
Znuny Version: 5.0.12
Company: MPImF Heidelberg

Re: maybe a bug with PostMaster filters in 5.0.12?

Post by Thomymaster »

Hi

Ok my main problem is that the input field is too short, is there a way to expand the numbers of characters i can type in?
I have the shortest regex i can use but it is still too large
OTRS 5.0.12 on Ubuntu 14.04 LTS
OTRS 5.0.27 on Ubuntu 16.04 LTS
root
Administrator
Posts: 3954
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: maybe a bug with PostMaster filters in 5.0.12?

Post by root »

Split the From regex into multiple shorter ones and use multiple PostMaster filter
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Thomymaster
Znuny newbie
Posts: 76
Joined: 26 Sep 2016, 10:50
Znuny Version: 5.0.12
Company: MPImF Heidelberg

Re: maybe a bug with PostMaster filters in 5.0.12?

Post by Thomymaster »

But the mail is discarded if the first postmaster filter matches. So it makes no sense to define a second filter, or?
OTRS 5.0.12 on Ubuntu 14.04 LTS
OTRS 5.0.27 on Ubuntu 16.04 LTS
root
Administrator
Posts: 3954
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: maybe a bug with PostMaster filters in 5.0.12?

Post by root »

How can your first filter match if you split the reg ex up?
Instead of using for From (a|b)@example.com use a@example.com in the first and b@example.com in the second.
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Thomymaster
Znuny newbie
Posts: 76
Joined: 26 Sep 2016, 10:50
Znuny Version: 5.0.12
Company: MPImF Heidelberg

Re: maybe a bug with PostMaster filters in 5.0.12?

Post by Thomymaster »

Hi

If i split the PostMaster filter into i.e. two, does the second get processed anyway right after the first one (regardless of the filter matches or not)?

Best,
Thomas
OTRS 5.0.12 on Ubuntu 14.04 LTS
OTRS 5.0.27 on Ubuntu 16.04 LTS
Thomymaster
Znuny newbie
Posts: 76
Joined: 26 Sep 2016, 10:50
Znuny Version: 5.0.12
Company: MPImF Heidelberg

Re: maybe a bug with PostMaster filters in 5.0.12?

Post by Thomymaster »

Hi

This works for me, thanks a lot! :)


Best,
Thomas
OTRS 5.0.12 on Ubuntu 14.04 LTS
OTRS 5.0.27 on Ubuntu 16.04 LTS
Post Reply