OTRS

From Wikitech
(Difference between revisions)
Jump to: navigation, search
(Mail setup: SpamAssassin setup in Exim)
(SpamAssassin: SpamAssassin configuration)
Line 52: Line 52:
  
 
=== SpamAssassin ===
 
=== SpamAssassin ===
[[williams]] runs its own SpamAssassin instance, so <tt>sa-learn</tt> can be used to train it from the OTRS Junk queue. The normal Ubuntu <tt>spamassassin</tt> package is used, with the following configuration modifications:
+
[[williams]] runs its own SpamAssassin instance, so <tt>sa-learn</tt> can be used to train it from the OTRS Junk queue. The normal Ubuntu <tt>spamassassin</tt> package is used, with a few configuration modifications as listed below.
 +
 
 +
Multiple user profiles are not really used, SpamAssassin only reads global configuration settings. Training data is stored under the ''otrs'' home directory, <tt>/opt/otrs-home/.spamassassin/</tt>
  
 
==== /etc/default/spamassassin ====
 
==== /etc/default/spamassassin ====

Revision as of 21:08, 29 January 2009

OTRS is installed on bart.wikimedia.org.

You no longer need to invoke a specific script or update config files to add email addresses to OTRS; mchenry will automatically see that the queue exists or has disappeared.

It is possible (due to negative caching at the secondary mail exchangers) that new addresses will take up to two hours to begin working.

Contents

To upgrade

  1. Stop postfix. You don't want to have mail coming in while OTRS is broken.
  2. Fetch new OTRS code
  3. Decompress into /opt/otrs-X.Y.Z
  4. Get the patches with svn export --force http://svn.wikimedia.org/svnroot/mediawiki/trunk/otrs /opt/otrs-cvs
  5. Apply them with quilt push -a
  6. Copy in Kernel/Config/Files/*, home, var/log, var/stats, var/sessions
  7. Symlink the templates...
    • cd Kernel/Output/HTML && ln -s Standard OTRS
  8. Set permissions on the dir, eg:
    • bin/SetPermissions.pl --secure --otrs-user=otrs --web-user=apache --otrs-group=otrs --web-group=apache /opt/otrs-X.Y.Z
  9. change the /opt/otrs symlink to the new version
  10. start postfix
  11. send a mail to e.g. info-en and check that it shows up in OTRS

Mail setup

In the new OTRS setup, OTRS is installed on williams, and e-mail is sent and received through a special Exim instance on this server. Its configuration follows the lines of the setup described in Mail, but OTRS specific configuration is listed below.

Exim

SpamAssassin scanning

Spam filtering is done using SpamAssassin and an Exim ACL which is run at the DATA phase during the SMTP connection. Should SpamAssassin fail for some reason, mail is let through.

acl_smtp_data = acl_check_data
acl_check_data:
        # Run a SpamAssassin check on any non-locally submitted messages.
        # If the message is estimated to be spam, we discard it, since
        # rejecting only moves the problem to mchenry.
        
        accept hosts = :

        discard message = This message scored $spam_score spam points.
                spam = otrs/defer_ok

        accept

SpamAssassin

williams runs its own SpamAssassin instance, so sa-learn can be used to train it from the OTRS Junk queue. The normal Ubuntu spamassassin package is used, with a few configuration modifications as listed below.

Multiple user profiles are not really used, SpamAssassin only reads global configuration settings. Training data is stored under the otrs home directory, /opt/otrs-home/.spamassassin/

/etc/default/spamassassin

Make sure spamd is enabled:

# Change to one to enable spamd
ENABLED=1

By default it runs as root, which is unnecessary. Since it's only used by OTRS, we can run it as the OTRS user. User preferences are disabled, spamd listens on the loopback interface only.

OPTIONS="--max-children 5 --nouser-config --listen-ip=127.0.0.1 -u otrs -g otrs"

Don't let spam filtering eat all resources:

# Set nice level of spamd
NICE="--nicelevel 10"

Automatically update SpamAssassin rules:

# Cronjob
# Set to anything but 0 to enable the cron job to automatically update
# spamassassin's rules on a nightly basis
CRON=1

/etc/spamassassin/local.cf

Allow SpamAssassin to trust these IP ranges:

trusted_networks 208.80.152.0/22 91.198.174.0/24 203.212.189.192/26
Personal tools
Namespaces

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox