Using Mail::Audit with RT

I’ve just been shown a solution for using Mail::Audit to communicate
with RT; with proper regexen, you could configure an RT mailgate through
any mail daemon that supports a .forward file, without having access to
or modifying the MTA configuration. Yay Simon :slight_smile:

if ($to =~ /rt+(w+)@crystalflame.net/) { # mail to
rt+queuename@crystalflame.net
# is sent as correspondence into queuename
$item->pipe("/opt/rt2/bin/rt-mailgate --queue $1 --action
correspond");
}

This is slighty modified from the original:

if ($to =~ /rt-(\w+)@simon-cozens.org/) { # It’s for RT.
$item->pipe("/opt/rt2/bin/rt-mailgate --queue $1 --action
correspond");
}

since my mail daemon parses ‘rt+foo’ as being destined for the user
’rt’, by default (sendmail).

With a bit of tweaking of the above regex, I can send mail to
rs+rt-tasks-correspond@crystalflame.net to add correspondence to the
’tasks’ queue. for instance.

Just thought I’d share the info.

R.

ps. with the Vipul’s Razor plugin (not quite released yet) Mail::Audit
will happily block spam for you, resolving the RT-spam issue. And I
think there’s other plugins as well.

Incredibly cool. So you know, for mail to rt+queuename can also
get into the right queue with

rt: “|/opt/rt2/bin/rt-mailgate --queue-from-extension --action correspond”

as of 2.0.10, you’ can send mail to ticket+@domain with this
invocation:

ticket: “|/opt/rt2/bin/rt-mailgate --ticket-id-from-extension --action correspond”

But, well, mail audit is much more powerful ;)On Mon, Dec 10, 2001 at 02:56:23PM -0500, Richard Soderberg wrote:

I’ve just been shown a solution for using Mail::Audit to communicate
with RT; with proper regexen, you could configure an RT mailgate through
any mail daemon that supports a .forward file, without having access to
or modifying the MTA configuration. Yay Simon :slight_smile:

if ($to =~ /rt+(w+)@crystalflame.net/) { # mail to
rt+queuename@crystalflame.net

is sent as correspondence into queuename

$item->pipe("/opt/rt2/bin/rt-mailgate --queue $1 --action
correspond");
}

This is slighty modified from the original:

if ($to =~ /rt-(\w+)@simon-cozens.org/) { # It’s for RT.
$item->pipe("/opt/rt2/bin/rt-mailgate --queue $1 --action
correspond");
}

since my mail daemon parses ‘rt+foo’ as being destined for the user
’rt’, by default (sendmail).

With a bit of tweaking of the above regex, I can send mail to
rs+rt-tasks-correspond@crystalflame.net to add correspondence to the
’tasks’ queue. for instance.

Just thought I’d share the info.

R.

ps. with the Vipul’s Razor plugin (not quite released yet) Mail::Audit
will happily block spam for you, resolving the RT-spam issue. And I
think there’s other plugins as well.


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

http://www.bestpractical.com/products/rt – Trouble Ticketing. Free.