set SenderType and ArticleType for external emails from agents
Moderator: crythias
-
MCCoolMoDAue
- Znuny newbie
- Posts: 33
- Joined: 24 Jan 2017, 11:55
- Znuny Version: 5.0.0
set SenderType and ArticleType for external emails from agents
Hello,
I want to set the
X-OTRS-ArticleType
and
X-OTRS-SenderType
when an agent answers to a case by email.
right now the emails are classified as
"customer – email-external"
I know i could use postmaster filters, but i don#t want to create a filter for each agent.
Can i find out that the sender address was from one of our agents in the postmaster filters?
I want to set the
X-OTRS-ArticleType
and
X-OTRS-SenderType
when an agent answers to a case by email.
right now the emails are classified as
"customer – email-external"
I know i could use postmaster filters, but i don#t want to create a filter for each agent.
Can i find out that the sender address was from one of our agents in the postmaster filters?
-
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: set SenderType and ArticleType for external emails from agents
You have to write your own postmaster module for that. It's not that difficult. I've posted some sample postmaster modules in the forum. Another one is on github: https://gist.github.com/reneeb/375bfc2c ... c71833209e
In that module you should check if the mail address belongs to one of the agents and set the article type.
Hint: to check whether the from address belongs to an user/agent, you can use UserSearch() from Kernel::System::User http://otrs.perl-services.de/docs/otrs/ ... _user.html
In that module you should check if the mail address belongs to one of the agents and set the article type.
Hint: to check whether the from address belongs to an user/agent, you can use UserSearch() from Kernel::System::User http://otrs.perl-services.de/docs/otrs/ ... _user.html
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
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
MCCoolMoDAue
- Znuny newbie
- Posts: 33
- Joined: 24 Jan 2017, 11:55
- Znuny Version: 5.0.0
Re: set SenderType and ArticleType for external emails from agents
are you talking about the
PostMaster::PreFilterModule###1-Match
setting?
is that where I would have to set it?
Do I need to find the agents email addresses by sql statement?
Or do I use the OTRS interface?
PostMaster::PreFilterModule###1-Match
setting?
is that where I would have to set it?
Do I need to find the agents email addresses by sql statement?
Or do I use the OTRS interface?
-
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: set SenderType and ArticleType for external emails from agents
With that setting you can set the article type for all mails that come from your company. To check whether the addresses are actual agents, you have to write your own module. Please have a look at the linked websites.
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
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
MCCoolMoDAue
- Znuny newbie
- Posts: 33
- Joined: 24 Jan 2017, 11:55
- Znuny Version: 5.0.0
Re: set SenderType and ArticleType for external emails from agents
I did have a look at the websites.
i am new to this.
I basically did code a .pm file,
but I don'T know where to add that module so it is executed.
Also I don't know how to debug it.
Some help would be highly appreciated!
i am new to this.
I basically did code a .pm file,
but I don'T know where to add that module so it is executed.
Also I don't know how to debug it.
Some help would be highly appreciated!
-
MCCoolMoDAue
- Znuny newbie
- Posts: 33
- Joined: 24 Jan 2017, 11:55
- Znuny Version: 5.0.0
Re: set SenderType and ArticleType for external emails from agents
since I could not find out how to actually use / test the filter i created
I've tried the postmaster filters.
but they only use for the first email, the follow up mails are all set to "customer"
I guess that is for the follow up filters
I've tried the postmaster filters.
but they only use for the first email, the follow up mails are all set to "customer"
I guess that is for the follow up filters
-
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: set SenderType and ArticleType for external emails from agents
You can add X-OTRS-FollowUp-... to the same postmaster filter.
You .pm file should be at Kernel/System/PostMaster/Filter/ and you have to add the config option that is shown in the gist to you Kernel/Config.pm
You .pm file should be at Kernel/System/PostMaster/Filter/ and you have to add the config option that is shown in the gist to you Kernel/Config.pm
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
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
MCCoolMoDAue
- Znuny newbie
- Posts: 33
- Joined: 24 Jan 2017, 11:55
- Znuny Version: 5.0.0
Re: set SenderType and ArticleType for external emails from agents
thank you,
as a non-ideal solution setting the X-OTRS-FollowUp-... in the postmaster filters works.
Next step is creating our own filter and registering it.
as a non-ideal solution setting the X-OTRS-FollowUp-... in the postmaster filters works.
Next step is creating our own filter and registering it.