<?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=SendmailWithoutQueueAliases</id>
	<title>SendmailWithoutQueueAliases - 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=SendmailWithoutQueueAliases"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=SendmailWithoutQueueAliases&amp;action=history"/>
	<updated>2026-08-22T10:32:39Z</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=SendmailWithoutQueueAliases&amp;diff=3493&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=SendmailWithoutQueueAliases&amp;diff=3493&amp;oldid=prev"/>
		<updated>2016-04-06T20:37:40Z</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;Lets say you want to be able to create new queues without having to touch your sendmail configuration. This how-to will allow you to send a mail to [=[mailto:queuename@rt.example.com queuename@rt.example.com]] to Correspond to tickets, and [=queuename+[mailto:action-action-action@rt.example.com action-action-action@rt.example.com]] to work those tickets via email You will need to set [=Set($[[UnsafeEmailCommands]],1);] in your [[RT SiteConfig|RT_SiteConfig]].pm if you wish to take full advantage of this. Read the perldoc documentation of rt-mailgate for full details on using EXTENSION with rt-mailgate.&lt;br /&gt;
&lt;br /&gt;
This howto assumes you have a dedicatd domain for RT configured in sendmail. We&amp;#039;ll use rt.example.com.&lt;br /&gt;
&lt;br /&gt;
* First add a rt3 user to receive all mail directed to RT. This is so we can have a custom .procmailrc for RT.&lt;br /&gt;
&lt;br /&gt;
 adduser rt3 -g rt3&lt;br /&gt;
&lt;br /&gt;
* In /etc/mail/virtusertable add the following lines:&lt;br /&gt;
&lt;br /&gt;
 @rt.example.com     rt3+%1&lt;br /&gt;
 +*@rt.example.com   rt3+%1.%2&lt;br /&gt;
&lt;br /&gt;
* Rebuild your map files in /etc/mail&lt;br /&gt;
&lt;br /&gt;
 make -C /etc/mail&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
These virtusertable entries redirect all mail for the domain rt.example.com to the rt3 user. Using &amp;quot;plushack&amp;quot; (known here as EXTENSION) we can tell rt-mailgate what queue we&amp;#039;re working with. As a bonus, we use a period as a delimiter on the back-end for separating the queue name from the list of actions. End users won&amp;#039;t see the period in email addresses, nor should they use them.&lt;br /&gt;
&lt;br /&gt;
* Create a &amp;lt;code&amp;gt;.procmailrc&amp;lt;/code&amp;gt; in the rt3 user&amp;#039;s homedirectory containing the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;# Uncomment VERBOSE and LOGFILE for debugging, they&amp;#039;re helpful at times.&lt;br /&gt;
 #VERBOSE=1&lt;br /&gt;
 #LOGFILE=$HOME/.procmail.log&lt;br /&gt;
 LOCKFILE=$HOME/.procmail.LCK&lt;br /&gt;
 ARG1=$1&lt;br /&gt;
 EXTENSION=`echo $ARG1 | awk -F. &amp;#039;{ print $1 }&amp;#039;`&lt;br /&gt;
 SUFFIX=`echo $ARG1 | awk -F. &amp;#039;{ print $2 }&amp;#039;`&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 # if no list of actions, default action is correspond&lt;br /&gt;
 :0&lt;br /&gt;
 * ? test -z &amp;quot;$SUFFIX&amp;quot;&lt;br /&gt;
 |/opt/rt3/bin/rt-mailgate --extension queue --action correspond --url http://rt.example.com/&lt;br /&gt;
 &lt;br /&gt;
 # Otherwise, if we DO have a list of actions, run with them.&lt;br /&gt;
 :0 E&lt;br /&gt;
 * ? test ! -z &amp;quot;$SUFFIX&amp;quot;&lt;br /&gt;
 {&lt;br /&gt;
   :0&lt;br /&gt;
   |/opt/rt3/bin/rt-mailgate --extension queue --action $SUFFIX --url http://rt.cexample.com/&lt;br /&gt;
 }&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Notes&lt;br /&gt;
&lt;br /&gt;
Configure your [[RT SiteConfig|RT_SiteConfig]].pm &amp;lt;code&amp;gt;Set($rtname,&amp;#039;rt.example.com&amp;#039;);&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Set($Organization,&amp;#039;rt.example.com&amp;#039;);&amp;lt;/code&amp;gt; and your [=Set($[[RTAddressRegexp]],&amp;#039;@rt\.example\.com$&amp;#039;);] to the same catch-all domain in virtusertable. I also turn on [=Set($[[ParseNewMessageForTicketCcs]],1);] so that RT auto-assigns people in the To:/Cc: address fields when someone opens a ticket via e-mail.&lt;br /&gt;
&lt;br /&gt;
* BUGS&lt;br /&gt;
&lt;br /&gt;
Mail sent to aqueuethatdoesntexist@rt.example.com will vanish, without an answer.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>