[rt-devel] Minor, but handy change to outbound messages

Monte Mitzelfelt monte at nm.net
Tue Dec 5 13:27:57 EST 2000


I think we're running 1.0.1.  Here's a patch that I keep rolling forward
as we upgrade because it's turned out to be very helpful in getting
replies back to the queue rather than individuals.  The jest of it is to
change the To: and the Bcc: lines in the following manner:

To: Requestor and $in_queue_id Staff: ;
Bcc: $in_recipient$in_bcc

This way, their are no real addresses in the To: line, just an RFC
complaint named empty list of addresses.  It's greatly reduced the amount
of mail that we used to see twice: once as a part of ticket process and
once as a direct reply.  It's also helped funnel things back into the
ticket system since it leaves only the Rt address as an obvious reply
point.  I've also added some crude filtering against some automated
senders. This could be done much better, but is useful to us.


*** /home/mathew/rt-1.0.1/lib/rt/support/mail.pm	Tue Nov 16
02:38:29 1999--- /usr/local/rt/lib/rt/support/mail.pm	Mon Jun  5
16:15:37 2000
***************
*** 101,113 ****
      $in_subject =~ s/^(\s*)//;
  
      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>
  From: $friendly_name <$temp_mail_alias>
! To: $in_recipient   
  Cc: $in_cc
! Bcc: $in_bcc
  X-Request-ID: $in_serial_num
  X-RT-Loop-Prevention: $rt::rtname
  X-Sender: $in_current_user
--- 101,116 ----
      $in_subject =~ s/^(\s*)//;
  
      open (MAIL, "|$rt::mailprog $rt::mail_options");
+ 
+     # don't send replies to these guys MONTE -- hacky, so hacky
+     $in_recipient = '' if $in_recipient =~ /\@(verisign.com|uu.net)/i ;
      
      print  MAIL "Subject: [$rt::rtname \#". $in_serial_num . "]
($in_queue_id) $in_subject
  Reply-To: $friendly_name <$temp_mail_alias>
  From: $friendly_name <$temp_mail_alias>
! To: Requestor and $in_queue_id Staff: ;
  Cc: $in_cc
! Bcc: $in_recipient$in_bcc
  X-Request-ID: $in_serial_num
  X-RT-Loop-Prevention: $rt::rtname
  X-Sender: $in_current_user






More information about the Rt-devel mailing list