OTRS
(SpamAssassin) |
(→Mail setup: spamassassin) |
||
| Line 32: | Line 32: | ||
=== 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 the following configuration modifications: | ||
| + | |||
| + | By default it runs as root, which is unnecessary. To change this: | ||
| + | |||
| + | By default, spamd, if enabled, runs as root. To change this: | ||
| + | # adduser --system --home /var/lock/spamassassin --group --disabled-password --disabled-login spamd | ||
==== /etc/default/spamassassin ==== | ==== /etc/default/spamassassin ==== | ||
| Line 37: | Line 42: | ||
# Change to one to enable spamd | # Change to one to enable spamd | ||
ENABLED=1 | ENABLED=1 | ||
| + | |||
| + | User preferences are disabled, spamd listens on the loopback interface only, and runs as user/group ''spamd'': | ||
| + | OPTIONS="--max-children 5 --nouser-config --listen-ip=127.0.0.1 -u spamd -g spamd" | ||
Don't let spam filtering eat all resources: | Don't let spam filtering eat all resources: | ||
Revision as of 20:35, 29 January 2009
OTRS is installed on bart.wikimedia.org.
- Source is in /opt/otrs
- Config file is /opt/otrs/Kernel/Config.pm
- URL is https://secure.wikimedia.org/otrs/index.pl
- The root user/pass is in /home/wikipedia/doc/otrs
- Primary db is on db9, replica on db10. OTRS uses only the primary DB, they apparently don't support slaves.
- The codebase is patched, e.g. for supporting one-click-spam. The patches can be found at http://svn.wikimedia.org/svnroot/mediawiki/trunk/otrs
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
- Stop postfix. You don't want to have mail coming in while OTRS is broken.
- Fetch new OTRS code
- Decompress into /opt/otrs-X.Y.Z
- Get the patches with svn export --force http://svn.wikimedia.org/svnroot/mediawiki/trunk/otrs /opt/otrs-cvs
- Apply them with quilt push -a
- Copy in Kernel/Config/Files/*, home, var/log, var/stats, var/sessions
- Symlink the templates...
- cd Kernel/Output/HTML && ln -s Standard OTRS
- 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
- change the /opt/otrs symlink to the new version
- start postfix
- 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.
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 the following configuration modifications:
By default it runs as root, which is unnecessary. To change this:
By default, spamd, if enabled, runs as root. To change this:
# adduser --system --home /var/lock/spamassassin --group --disabled-password --disabled-login spamd
/etc/default/spamassassin
Make sure spamd is enabled:
# Change to one to enable spamd ENABLED=1
User preferences are disabled, spamd listens on the loopback interface only, and runs as user/group spamd:
OPTIONS="--max-children 5 --nouser-config --listen-ip=127.0.0.1 -u spamd -g spamd"
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