Mailx
Using mailx to send outgoing email directly to a smarthost
Sometimes you don't have an email system on your RT-server. In this case you can use mailx as a sendmail drop-in to directly connect to a remote mailserver (smarthost) instead of to a local installation.
First obtain mailx (previously called nail) from
http://heirloom.sourceforge.net/mailx.html
Use something like the following to compile and install:
make PREFIX=/opt/mailx SYSCONFDIR=/opt/mailx/etc MANDIR=/opt/mailx/man UCBINSTALL=/usr/bin/install make install PREFIX=/opt/mailx SYSCONFDIR=/opt/mailx/etc MANDIR=/opt/mailx/man UCBINSTALL=/usr/bin/install
Lay down a wrapper script, for instance in /opt/mailx/bin/mailx-wrapper
#!/bin/bash # do not query a resource file export MAILRC=/dev/null # send email directly to a remote smtp smarthost export smtp=smtp-smarthost.example.com # make mailx accept 8-bit content - in this case for German umlauts etc. export LC_CTYPE=de_DE.iso88591 # send the email (since this is the first real command executed in the script, it will receive the email content from STDIN) /opt/mailx/bin/mailx -n -t # log a line to syslog for debugging purposes /usr/bin/logger -t RTmailer -p syslog.info -- CALL /opt/mailx/bin/mailx -n -t "$@" RETURNED $?
Set the following options in RT_Config.pm
Set($MailCommand , 'sendmailpipe'); Set($SendmailArguments , ""); Set($SendmailPath , "/opt/mailx/bin/mailx_wrapper");
Make sure your smarthost accepts email from the reply- and comment-addresses defined for each queue.
--- Back to the Documentation page