<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=Mailx</id>
	<title>Mailx - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=Mailx"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Mailx&amp;action=history"/>
	<updated>2026-08-22T05:27:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Mailx&amp;diff=1945&amp;oldid=prev</id>
		<title>Admin: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Mailx&amp;diff=1945&amp;oldid=prev"/>
		<updated>2016-04-06T20:14:21Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Using mailx to send outgoing email directly to a smarthost ==&lt;br /&gt;
&lt;br /&gt;
Sometimes you don&amp;#039;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.&lt;br /&gt;
&lt;br /&gt;
First obtain mailx (previously called nail) from&lt;br /&gt;
&lt;br /&gt;
 http://heirloom.sourceforge.net/mailx.html&lt;br /&gt;
&lt;br /&gt;
Use something like the following to compile and install:&lt;br /&gt;
&lt;br /&gt;
 make PREFIX=/opt/mailx SYSCONFDIR=/opt/mailx/etc MANDIR=/opt/mailx/man UCBINSTALL=/usr/bin/install&lt;br /&gt;
 make install PREFIX=/opt/mailx SYSCONFDIR=/opt/mailx/etc MANDIR=/opt/mailx/man UCBINSTALL=/usr/bin/install&lt;br /&gt;
&lt;br /&gt;
Lay down a wrapper script, for instance in /opt/mailx/bin/mailx-wrapper&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
 # do not query a resource file&lt;br /&gt;
 export MAILRC=/dev/null&lt;br /&gt;
 # send email directly to a remote smtp smarthost&lt;br /&gt;
 export smtp=smtp-smarthost.example.com&lt;br /&gt;
 # make mailx accept 8-bit content - in this case for German umlauts etc.&lt;br /&gt;
 export LC_CTYPE=de_DE.iso88591&lt;br /&gt;
 # send the email (since this is the first real command executed in the script, it will receive the email content from STDIN)&lt;br /&gt;
 /opt/mailx/bin/mailx -n -t&lt;br /&gt;
 # log a line to syslog for debugging purposes&lt;br /&gt;
 /usr/bin/logger -t RTmailer -p syslog.info -- CALL /opt/mailx/bin/mailx -n -t &amp;quot;$@&amp;quot; RETURNED $?&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the following options in [[RT Config|RT_Config]].pm&lt;br /&gt;
&lt;br /&gt;
 Set($MailCommand , &amp;#039;sendmailpipe&amp;#039;);&lt;br /&gt;
 Set($SendmailArguments , &amp;quot;&amp;quot;);&lt;br /&gt;
 Set($SendmailPath , &amp;quot;/opt/mailx/bin/mailx_wrapper&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Make sure your smarthost accepts email from the reply- and comment-addresses defined for each queue.&lt;br /&gt;
&lt;br /&gt;
--- Back to the [[Documentation]] page&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>