Postmaster filter question

Moderator: crythias

Post Reply
dim3nsi0n
Znuny newbie
Posts: 11
Joined: 22 Feb 2016, 14:54
Znuny Version: 3.3.7

Postmaster filter question

Post by dim3nsi0n »

Hi all,

I'm sorry if this has been asked before but I couldn't find an answer.
We are handling emails from both external and internal customers. We are not supposed to send automatic replies to internal customers but we'd like to send automatic replies to external ones. We also have a contact form where emails are coming in from mailgenerator@domain.com (domain.com is internal) with a reply-to address directed to the external customer.
We have a postmaster filter rule that says if email is From @domain.com then set X-OTRS-Loop set to True which prevents sending us automated replies to internal parties but this way we don't reply to the customers using the Contact Form.
Basically I would like to only send automatic replies to mailgenerator@domain.com and not send automatic replies to everyone else @domain.com.

I've tried adding the following rule but after saving just one Header remains.
Header1: From @domain.com
Header2: From Negate mailgenerator@domain.com
Stop after match No
OTRS: 3.3.7

Thank you!
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 question

Post by reneeb »

You have to create two postmaster filters...
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
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Postmaster filter question

Post by crythias »

Another way is to send to different queues, one of which has an autoreply and one that doesn't.
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
dim3nsi0n
Znuny newbie
Posts: 11
Joined: 22 Feb 2016, 14:54
Znuny Version: 3.3.7

Re: Postmaster filter question

Post by dim3nsi0n »

Thank you so much for your answers.
I don't want to confuse the agents with more queues so I'll create 2 postmaster filters.

Basically I'll have to do:

Postmaster filter 1:
From @domain.com set X-Loop to True

Posmaster filter 2:
From mailgenerator@domain.com set X-Loop to False

Is there any way to control in which order the Postmaster filters are applied? I am thinking if filter 2 is run before filter 1 OTRS will still not send automatic replies. Or am I mistaken?

Thank you!
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 question

Post by reneeb »

It's ordered alphabetically...
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
dim3nsi0n
Znuny newbie
Posts: 11
Joined: 22 Feb 2016, 14:54
Znuny Version: 3.3.7

Re: Postmaster filter question

Post by dim3nsi0n »

I have 2 rules now:

"Do not Reply to @domain.com" with the following settings:
From @domain.com X-OTRS-Loop True
Stop after match NO

"Reply to mailgenerator@domain.com" with:
From mailgenerator@domain.com X-OTRS-Loop False
Stop after match NO

Unfortunately OTRS is still not sending replies to mailgenerator@domain.com ... What am I doing wrong?

Thank you again!
EXG133
Znuny expert
Posts: 217
Joined: 06 Aug 2012, 18:12
Znuny Version: 3.1.7 & 4.04

Re: Postmaster filter question

Post by EXG133 »

Do you have this:
@domain.com
or this:
.*@domain.com
in your first rule? It should be the second.
dim3nsi0n
Znuny newbie
Posts: 11
Joined: 22 Feb 2016, 14:54
Znuny Version: 3.3.7

Re: Postmaster filter question

Post by dim3nsi0n »

yes I have the first one
what's the difference please?

thank you!
dim3nsi0n
Znuny newbie
Posts: 11
Joined: 22 Feb 2016, 14:54
Znuny Version: 3.3.7

Re: Postmaster filter question

Post by dim3nsi0n »

I think I've got it :)

X-OTRS-Loop flag can only be True. I've tested with only 1 postmaster filter and set it to false but it didn't make a difference.
So now I have a rule with named "1 Reply to ..." so that I am sure it's the first rule to run
From mailgenerator@domain.com
X-OTRS-State Open --> basically don't do anything
Stop after Match: Yes --> so it won't reach the next rule

Thank you for your support!
Post Reply