OTRS - Open Ticket Request System 2009-1-9
otrs.org | bugs.otrs.org | lists.otrs.org | faq.otrs.org | doc.otrs.org
Navigation:
print version

New!
OTRS 2.3 is published!

announce at otrs.org:
OTRS announcements and important news.


Powered by:
OTRS.org is hosted by IP Exchange
OTRS.org is powered by Thomas-Krenn Server
powered frische-fische.com
 
Example for filtering/dispatching by Procmail and a webform

Example for filtering/dispatching by Procmail and a webform

This is an example for a webform to generate an email for OTRS. You will find this perl scrtipt in $OTRS_HOME/scripts/webform.pl

You have a Topic, From, Email, Subject and Message field.

Change the config settings for the webform:
# --
# 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',
);
Take care, that your used $OTRSEmail and the used OTRS queues exists in your OTRS system.

Now, change the OTRS .procmailrc from:
# --
# 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-'
to:
# --
# 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-'
If a email is generated by the webform.pl and sent to the $OTRSEmail it will be dispatched to the topic=>queue.

 

RSS News Feed - Contact

Copyright © 2001-2009 OTRS Team, All Rights Reserved.