13.07.2015 Views

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 12 ■ MANAGING TIME AND PEOPLEThen reload exim4 (/etc/init.d/exim4 reload) for the change to take effect.■ Note If you have any authorization set up for RT access (see recipe 12-5), you need to make sure that the“NoAuth” sections of RT are excluded from the authorization. If you don’t do this, then the mailgate won’t be ableto run the required parts of RT (since it doesn’t have the correct authorization), and the mailgate setup won’t work.This is why there’s a separate “NoAuth” section of the RT code! The configuration example in recipe 12-5 doesthis correctly.To test this, create a file testfile with a couple of lines of text, and execute it from the commandline:cat testfile |/usr/bin/rt-mailgate --queue General --action correspond --url https://localhost/rtA ticket corresponding to the contents of testfile should show up on the RT web site. Next, trysending an e-mail to your rt-email address from the local command line (mail -s "testing RT!" rtemail@example.comand then hit Ctrl-D). Again, the ticket should show up on the web page, and yourAdminCc group should receive appropriate e-mails.If you run your own mail server, this is all you need, because the mail server will handle externalmail already. If not, the next step is to grab the mail from the server and deal with it correctly. You canuse fetchmail for this, with the following config in a file rt-fetchmail.conf (this should be a single line):poll imap.example.com protocol IMAP username rt-email password passwd smtpaddress example.com mda '/usr/bin/rt-mailgate --queue General --action correspond --url https://localhost/rt'imap.example.com should be whatever e-mail server you use; example.com should be whateverdomain your e-mail appears to come from.The command to do the work of fetching the e-mail is as follows:fetchmail -f /path/to/rt-fetchmail.confwhich you should then put in an appropriate crontab (running every one or two minutes should suffice).E-mail rt-email from somewhere nonlocal, wait for the cronjob to run, and a new ticket will appearin RT.12-5. Creating a Secure Setup for RTTo run RT as a secure or authorized setup (that is, under HTTPS), you need to add some lines to/etc/apache2/apache2.conf. Edit the file so it has a section that looks like this (some of this section mayalready be there):241Download at WoweBook.Com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!