[rt-users] Address mangling

Robert Spier rspier at pobox.com
Sun Sep 24 11:27:17 EDT 2000


>>>>> "AT" == Alex Titov <alt at mark-itt.ru> writes:
AT> Hi, There is a problem in RT's idea about address rewriting.  It
AT> sends out letters using comma-separated address lists in 'To:',
AT> but on our site we strongly dislike such a manner.  Is it possible
AT> to make RT send to queue members through one group list? (not to
AT> reveal actual recipients)

We use the following hack to do it.  It's very ugly.

I hope RT2 will support this natively.

i.e. "send all member-corresopndence to this address: ________________ "

-R

unified diff:

--- /pkg/src/rt-1.0.4/lib/rt/support/mail.pm	Fri Dec 10 06:38:51 1999
+++ lib/rt/support/mail.pm	Fri Aug 18 01:21:58 2000
@@ -1,4 +1,4 @@
-# $Header: /raid/cvsroot/rt/lib/rt/support/mail.pm,v 1.24 1999/12/10 11:38:51 tobiasb Exp $
+# $Header: /usr/local/rt/lib/rt/support/mail.pm,v 1.1 2000/08/18 03:15:18 rt Exp rt $
 #
 
 package rt;
@@ -46,7 +46,7 @@
     local ($in_template,$in_queue_id, $in_recipient, $in_cc, $in_bcc, 
 	   $in_serial_num, $in_transaction, $in_subject, $in_current_user, 
 	   $in_custom_content) = @_;
-    my ($mailto, $template, $temp_mail_alias);
+    my ($mailto, $template, $reply_to, $temp_mail_alias);
     
     # Everything except when using the 'correspondence' is
     # autogenerated, and should be marked as bulk:
@@ -88,6 +88,17 @@
       $temp_mail_alias = $rt::queues{"$in_queue_id"}{'mail_alias'};
     }
     
+    # if the address is rt-managers, we should set Reply-To to 
+    # managers at speed.seas.upenn.edu so kevin stops sending his 
+    # replies into a black hole.
+    # and send the initial message to managers
+    if ($temp_mail_alias =~ /rt-managers/) {
+      $reply_to     = 'managers at somehost.some.com';
+      $in_recipient = 'managers at somehost.some.com';
+      $in_cc = $in_bcc = '';
+    } else {
+      $reply_to = $temp_mail_alias;
+    }
 
     if (!$rt::users{"$in_current_user"}{'real_name'}) {
       $friendly_name = "Request Tracker";
@@ -103,7 +114,7 @@
     open (MAIL, "|$rt::mailprog $rt::mail_options");
     
     print  MAIL "Subject: [$rt::rtname \#". $in_serial_num . "] ($in_queue_id) $in_subject
-Reply-To: $friendly_name <$temp_mail_alias>
+Reply-To: $friendly_name <$reply_to>
 From: $friendly_name <$temp_mail_alias>
 To: $in_recipient   
 Cc: $in_cc






More information about the rt-users mailing list