Source string Read only

type: Content of: <section><section><section><itemizedlist><listitem><para>
31/310
Context English State
# Job Name: 1-Match
# (block/ignore all spam email with From: noreply@)
$Self-&gt;{'PostMaster::PreFilterModule'}-&gt;{'1-Match'} = {
Module =&gt; 'Kernel::System::PostMaster::Filter::Match',
Match =&gt; {
From =&gt; 'noreply@',
},
Set =&gt; {
'X-OTRS-Ignore' =&gt; 'yes',
},
};
# Job Name: 2-Match
# (sort emails with From: sales@example.com and Subject: **ORDER**
# into queue 'Order')
$Self-&gt;{'PostMaster::PreFilterModule'}-&gt;{'2-Match'} = {
Module =&gt; 'Kernel::System::PostMaster::Filter::Match',
Match =&gt; {
To =&gt; 'sales@example.com',
Subject =&gt; '**ORDER**',
},
Set =&gt; {
'X-OTRS-Queue' =&gt; 'Order',
},
};
<literal>Kernel::System::PostMaster::Filter::CMD</literal> is a default module to pipe the email into an external command. The output is given to STDOUT and if the result is true, then set new email header (e.g. X-OTRS-Ignore: yes or X-OTRS-Queue: spam). The Example below can be used in <filename>Kernel/Config.pm</filename>.
Example job for the filter module Kernel::System::PostMaster::Filter::CMD
# Job Name: 5-SpamAssassin
# (SpamAssassin example setup, ignore spam emails)
$Self-&gt;{'PostMaster::PreFilterModule'}-&gt;{'5-SpamAssassin'} = {
Module =&gt; 'Kernel::System::PostMaster::Filter::CMD',
CMD =&gt; '/usr/bin/spamassassin | grep -i "X-Spam-Status: yes"',
Set =&gt; {
'X-OTRS-Ignore' =&gt; 'yes',
},
};
<literal>Kernel::System::PostMaster::Filter::ExternalTicketNumberRecognition</literal> is a default module that adds the possibility to parse external identifiers, in the email subject, the body or both using regular expressions. It then stores this value in a defined dynamic field. When an email comes in, OTRS will first search for an external identifier and when it finds one, query OTRS on the pre-defined dynamic field. If it finds an existing ticket, it will update this ticket, otherwise it will create a new ticket with the external reference number in the separate field.
OTRS SysConfig already provide 4 different settings to setup different external ticket numbers. If more settings are needed they need to be added manually. The following example can be used in <filename>Kernel/Config.pm</filename> to extend SysConfig settings.
Example job for the filter module <literal>Kernel::System::PostMaster::Filter::ExternalTicketNumberRecognition</literal>
# Job Name: ExternalTicketNumberRecognition
# External Ticket Number Reconition, check for Incident-<number> in incoming mails subject and
# body from the addeesses <sender>@externalticket.com, if number is found it will be stored in
# the dynamic field 'ExternalNumber' (that need to be setup in the Admin Panel).
$Self->{'PostMaster::PreFilterModule'}->{'000-ExternalTicketNumberRecognition'} = {
'FromAddressRegExp' => '\\s*@externalticket.com',
'NumberRegExp' => 'Incident-(\\d.*)',
'SearchInSubject' => '1',
'SearchInBody' => '1',
'TicketStateTypes' => 'new;open'
'DynamicFieldName' => 'ExternalNumber',
'Module' => 'Kernel::System::PostMaster::Filter::ExternalTicketNumberRecognition',
'Name' => 'Test External Ticket Number',
'SenderType' => 'system',
};
<emphasis>Configuration Options</emphasis>
<literal>FromAddressRegExp</literal>
This is an optional setting. Only mails matching this <emphasis>From:</emphasis> address will be considered for this filter. You can adjust this setting to the sender address your external system uses for outgoing mails. In case this address can differ, you can set this option to empty. OTRS will in that case not check the sender address.
<literal>NumberRegExp</literal>
This is a mandatory setting. This setting contains the regular expression OTRS will use to extract the ticket number out of the subject and/or ticket body. The default regular expression will match occurrences of for example 'Incident-12354' and will put the part between parentheses in the dynamic field field, in this case '12354'.
<literal>SearchInSubject</literal>
If this is set to '1', the email subject is searched for a ticket number.
<literal>SearchInBody</literal>
If this is set to '1', the email body is searched for a ticket number.
<literal>TicketStateTypes</literal>
This is an optional setting. If given, it will search OTRS only for open external tickets of given state types. The state types are separated with semicolons.
<literal>DynamicField</literal>
This is a required setting. It defines the dynamic filed that is used to store the external number (the field name must exist in the system and has to be valid).
<literal>SenderType</literal>
This defines the sender type used for the articles created in OTRS.
<literal>Kernel::System::PostMaster::Filter::Decrypt</literal> is a default module that is capable to decrypt an encrypted incoming email message (S/MIME or PGP) placing the unencrypted message body in the email header X-OTRS-BodyDecrypted to be processed later. Additionally it can also update the email body to the unencrypted version.
In order to decrypt the emails the system needs to be properly configured for S/MIME and/or PGP and have the needed private keys to decrypt the information.
This module is disabled by default and it can be configured directly in the System Configuration in the Admin Panel.
<literal>StoreDecryptedBody</literal>
Set this option to "1" to update the email body to the unencrypted version if the decryption was successful. Be aware that using this the emails will be stored unencrypted and there is no possible way to revert this action.
Of course it's also possible to develop your own PostMaster filter modules.
Troubleshooting Email Filtering
This section shows some common issues and things to consider when troubleshooting Postmaster filters.

Loading…

User avatar None

New source string

OTRS 6 / Administration ManualEnglish

New source string a year ago
Browse all component changes

Things to check

Multiple failing checks

The translations in several languages have failing checks

Reset

Glossary

English English
No related strings found in the glossary.

Source information

Source string comment
type: Content of: <section><section><section><itemizedlist><listitem><para>
Flags
read-only
Source string location
en/content/administration/email/email.xml:426
String age
a year ago
Source string age
a year ago
Translation file
i18n/doc-admin.pot, string 1803