Filtering Email

Moderator: crythias

Locked
mmendoza
Znuny newbie
Posts: 7
Joined: 23 Oct 2014, 21:23
Znuny Version: 3.3.4

Filtering Email

Post by mmendoza »

Hi all!

I'm new on this forum and English is my second language. I apologize for my writing mistakes.

I was wondering if there is a way to filter incoming emails by its comment in customer information, or by ldap group. I have successfully connected customer backend ldap on my otrs. We have some OU on our AD and lots of Groups so I have to connect by OU and filter by mail address, I copy my Kernel/Config.pm:

Code: Select all

    $Self->{CustomerUser} = {
	Name => 'LDAP Data Source',
   	Module => 'Kernel::System::CustomerUser::LDAP',
    	Params => {
        	Host => 'ad.dominio.com',
	        BaseDN => 'ou=BAS,ou=Usuarios,dc=dominio,dc=com',
	        SSCOPE => 'sub',
	        UserDN => 'dominio\usuario',
	        UserPw => 'password',
	        AlwaysFilter => '(mail=*)',
	            SourceCharset => 'utf-8',
	            DestCharset   => 'utf-8',
	            Params => {
	                port => 389,
	                timeout => 120,
	                async => 0,
	                version => 3,
	            },
	    },
    $Self->{CustomerUser1} = {
	Name => 'LDAP Data Source 2',
   	Module => 'Kernel::System::CustomerUser::LDAP',
    	Params => {
        	Host => 'ad.dominio.com',
	        BaseDN => 'ou=BAS,ou=Usuarios,dc=dominio,dc=com',
	        SSCOPE => 'sub',
	        UserDN => 'dominio\usuario',
	        UserPw => 'password',
	        AlwaysFilter => '(mail=*)',
	            SourceCharset => 'utf-8',
	            DestCharset   => 'utf-8',
	            Params => {
	                port => 389,
	                timeout => 120,
	                async => 0,
	                version => 3,
	            },
	    },
We have offices around the country, and we need to create one queue by office. I'm not able to get it. Maybe I'm thinking on the wrong way, I really don't know how to make it work.

I don't have an idea if its relevant or its just impossible to do it.

Thanks.
Marcelo
OTRS 3.3.4 - Debian Linux - MySql - Apache - Firefox
mmendoza
Znuny newbie
Posts: 7
Joined: 23 Oct 2014, 21:23
Znuny Version: 3.3.4

Re: Filtering Email

Post by mmendoza »

If there is another way to do this kind of filtering I'll be pleased to know that way.
OTRS 3.3.4 - Debian Linux - MySql - Apache - Firefox
mmendoza
Znuny newbie
Posts: 7
Joined: 23 Oct 2014, 21:23
Znuny Version: 3.3.4

Re: Filtering Email

Post by mmendoza »

I was thinking something like this

Code: Select all

    $Self->{'PostMaster::PreFilterModule'}->{'1-Match'} = {
        Module => 'Kernel::System::PostMaster::Filter::Match',
        Match => {
            Customer => 'comment=ABC',
        },
        Set => {
            'X-OTRS-Queue' => 'SelectedQueue',
        },
    };
I was thinking something like this, but i wont work. I don't think the "Customer" Parameter is valid.
OTRS 3.3.4 - Debian Linux - MySql - Apache - Firefox
mmendoza
Znuny newbie
Posts: 7
Joined: 23 Oct 2014, 21:23
Znuny Version: 3.3.4

Re: Filtering Email

Post by mmendoza »

I also try this, without luck.

I really don't know what else try.

Should I use CustomerUser instead of User?

Code: Select all

$Self->{TicketAcl}->{'ACL-something-descriptive'} =
{
   Properties => {
       User => {
                Group_rw => [
                    'Gorup1',
                ],
            },
     }
    Possible => {
        Ticket => {
            Queue => ['Queue1'],
        },
    },
};
OTRS 3.3.4 - Debian Linux - MySql - Apache - Firefox
Locked