Beispiel für Filterung/Verteilung durch Procmail und ein Webformular

Dies ist ein Beispiel für ein Webformular, dass eine eMail für OTRS erzeugt. Sie finden dieses Perl-Skript in "$OTRS_HOME/scripts/webform.pl".

Sie haben ein Thema, Von, eMail, Betreff und Nachrichten Feld.

Ändern Sie die Einstellungen für das Webformular:
# --
# web form options
# -- 
my $Ident = 'ahfiw2Fw32r230dddl2foeo3r';
# sendmail location and options
my $Sendmail = '/usr/sbin/sendmail -t -i -f ';
# email where the emails of the form will send to
my $OTRSEmail = 'otrs-system@example.com';
# topics and dest. queues
my %Topics = (
    # topic => OTRS queue
    'Info' => 'info',
    'Support' => 'support',
    'Bugs' => 'bugs',
    'Sales' => 'sales',
    'Billing' => 'billing',
    'Webmaster' => 'webmaster',
);
Achten Sie darauf, dass die benutzte $OTRSEmail und die OTRS Queue in Ihrem OTRS existieren.

Als nächstes ändern Sie die OTRS .procmailrc von:
# --
# Remove all X-OTRS Header (allow this only for trusted email)
# e. g. from *@example.com
# --
:0 fhw :
* !^From.*@example.com
| grep -vi '^X-OTRS-'
auf:
# --
# Remove all X-OTRS Header (allow this only for trusted email)
# just not emails with "X-OTRS-Ident: ahfiw2Fw32r230dddl2foeo3r" header!
# --
:0 fhw :
* !^X-OTRS-Ident: ahfiw2Fw32r230dddl2foeo3r
| grep -vi '^X-OTRS-'
Wenn eine eMail durch webform.pl generiert und an $OTRSEmail gesendet wird, wird sie an das entsprechende Thema, bzw. Queue verteilt.