Message ID generation

Excerpt from Action/SendEmail.pm:

sub SetMessageID {
my $self = shift;

TODO this one might be sort of broken. If we have several scrips +++

sending several emails to several different persons, we need to

pull out different message-ids. I’d suggest message ids like

“rt-ticket#-transaction#-scrip#-receipient#”

TODO $RT::rtname should be replaced by $RT::hostname to form valid

message-ids (ref rfc822)

$self->SetHeader
(‘Message-ID’, “<rt-”.$self->TicketObj->id().
“-”.
$self->TransactionObj->id().“.” .rand(20) . “@”.$RT::rtname.“>”)
unless $self->TemplateObj->MIMEObj->head->get(‘Message-ID’);
}

Is it safe to change $RT::rtname to something else in this context?
In our case, $RT::rtname isn’t a FQDN. :-/

Florian Weimer Weimer@CERT.Uni-Stuttgart.DE
University of Stuttgart http://CERT.Uni-Stuttgart.DE/people/fw/
RUS-CERT +49-711-685-5973/fax +49-711-685-5898

sub SetMessageID {

TODO $RT::rtname should be replaced by $RT::hostname to form valid

message-ids (ref rfc822)

$self->SetHeader
(‘Message-ID’, “<rt-”.$self->TicketObj->id().
“-”.
$self->TransactionObj->id().“.” .rand(20) . “@”.$RT::rtname.“>”)
unless $self->TemplateObj->MIMEObj->head->get(‘Message-ID’);
}

Is it safe to change $RT::rtname to something else in this context?
In our case, $RT::rtname isn’t a FQDN. :-/

You could change it to $RT::hostname, and ensure you set $hostname in
etc/config.pm to something that is a FQDN . Eric and I will cry though
(we’re doing seperate work regarding MessageId handling) :wink:

Seriously though, go right ahead.

Regards,

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations

Bruce Campbell bruce_campbell@ripe.net writes:> On Mon, 11 Mar 2002, Florian Weimer wrote:

sub SetMessageID {

TODO $RT::rtname should be replaced by $RT::hostname to form valid

message-ids (ref rfc822)

$self->SetHeader
(‘Message-ID’, “<rt-”.$self->TicketObj->id().
“-”.
$self->TransactionObj->id().“.” .rand(20) . “@”.$RT::rtname.“>”)
unless $self->TemplateObj->MIMEObj->head->get(‘Message-ID’);
}

Is it safe to change $RT::rtname to something else in this context?
In our case, $RT::rtname isn’t a FQDN. :-/

You could change it to $RT::hostname, and ensure you set $hostname in
etc/config.pm to something that is a FQDN . Eric and I will cry though
(we’re doing seperate work regarding MessageId handling) :wink:

Seriously though, go right ahead.

Okay, here is a patch.

Index: etc/config.pm
RCS file: /raid/cvsroot/rt/etc/config.pm,v
retrieving revision 1.17
diff -u -u -r1.17 config.pm
— etc/config.pm 2002/02/18 21:36:46 1.17
+++ etc/config.pm 2002/03/11 21:13:22
@@ -219,6 +219,11 @@

$CommentAddress=‘RT::CommentAddress.not.set’;

+# $MessageIDDomain controls the domain of the Message-ID for outgoing
+# messages (the part after the @ sign). The default assumes that
+# $rtname is a fully qualified domain name.
+$MessageIDDomain = $rtname;

#Sendmail Configuration

Index: lib/RT/Action/SendEmail.pm
RCS file: /raid/cvsroot/rt/lib/RT/Action/SendEmail.pm,v
retrieving revision 1.3
diff -u -u -r1.3 SendEmail.pm
— lib/RT/Action/SendEmail.pm 2002/02/28 06:49:09 1.3
+++ lib/RT/Action/SendEmail.pm 2002/03/11 21:13:22
@@ -227,12 +227,9 @@

$self->SetHeader
(‘In-Reply-To’, “<rt-”.$self->TicketObj->id().

  • "\@".$RT::rtname.">");
    
  • "\@".$RT::MessageIDDomain.">");
    
  • TODO $RT::rtname should be replaced by $RT::hostname to form valid

  • message-ids (ref rfc822)

    TODO We should always add References headers for all message-ids

    of previous messages related to this ticket.

}
@@ -253,13 +250,10 @@

pull out different message-ids. I’d suggest message ids like

“rt-ticket#-transaction#-scrip#-receipient#”

  • TODO $RT::rtname should be replaced by $RT::hostname to form valid

  • message-ids (ref rfc822)

    $self->SetHeader
    (‘Message-ID’, “<rt-”.$self->TicketObj->id().
    “-”.
  • $self->TransactionObj->id()."." .rand(20) . "\@".$RT::rtname.">")
    
  • $self->TransactionObj->id()."." .rand(20) . "\@".$RT::MessageIDDomain.">")
     unless $self->TemplateObj->MIMEObj->head->get('Message-ID');
    

}

Florian Weimer Weimer@CERT.Uni-Stuttgart.DE
University of Stuttgart http://CERT.Uni-Stuttgart.DE/people/fw/
RUS-CERT +49-711-685-5973/fax +49-711-685-5898

Okay, here is a patch.

ack, patches to Jesse, rt-2.0-bugs@fsck.com or rt-devel@lists.fsck.com.
Not just to rt-users :wink:

( Note to peoples - I’ve started an ‘RT Hackers Manual’ on RT/FM - if you
have suggestions for that or any other RT documentations, please refer
to the rt-doc-workers list and contribute! http://www.fsck.com/rtfm/ )

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations

Hi,

I’ve only just started using rt an am very impressed by the flexibility
and power this offers, thanks a lot for creating this. I have run into
two problems however and am wondering whether anybody here can help me:

1.) Tickets are not displayed in the web interface. I have created
tickets in several queues (“general” and newly created ones). But they
do not show up in the web interface, the queue summaries show 0 tickets
and if I try a “rt --limit-queue= --summary” it prints the title
bar but no tickets. If I go into mysql the tickets are in the Tickets
table, and content is in the Attachments table. And I receive an
acknowledgement email upon creation, so all this seems to work fine. I’m
using Redhat 7.0 on that machine with perl 5.6.1, mod_perl 1.26 and
apache 1.3.23.
Neither the rt log nor the apache error log show anything untoward (BTW,
is there an option to turn on a more verbose logging somewhere, I’d like
to know a little more about what’s going on :-).

2.) Sometimes I log into rt, click on an any option to move on to
(“Search”,“Configuration”, whatever) and it sends me right back to the
logon screen) I log on again and am now on the screen I wanted to reach
but when I click on anything else I get back to logon and the process
repeats itself ad infinitum. I suspect this is a browser issue since it
seems to happen with Mozilla (0.9.8 and 0.9.7) and Konqueror but hasn’t
happened with Opera so far. Or could this be related to me logging on as
several different users from the same machine (using different
browsers)?

Any help would be muchly appreciated, thanks,

Marc

E-mail is an informal method of communication and may be subject to data corruption, interception and unauthorised amendment for which Digital Bridges Ltd will accept no liability. Therefore, it will normally be inappropriate to rely on information contained on e-mail without obtaining written confirmation.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

One thing I forgot to mention:On Tue, 2002-03-12 at 10:21, Marc Beyer wrote:

1.) Tickets are not displayed in the web interface. I have created
tickets in several queues (“general” and newly created ones). But they
do not show up in the web interface, the queue summaries show 0 tickets
and if I try a “rt --limit-queue= --summary” it prints the title
bar but no tickets. If I go into mysql the tickets are in the Tickets
table, and content is in the Attachments table. And I receive an
acknowledgement email upon creation, so all this seems to work fine.

Entering the ticket number and clicking “Goto ticket” brings up the
ticket for display. And I can edit it, close it, everything. It just
refuses to appear in the summary.

Thanks, regards,

Marc

E-mail is an informal method of communication and may be subject to data corruption, interception and unauthorised amendment for which Digital Bridges Ltd will accept no liability. Therefore, it will normally be inappropriate to rely on information contained on e-mail without obtaining written confirmation.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Entering the ticket number and clicking “Goto ticket” brings up the
ticket for display. And I can edit it, close it, everything. It just
refuses to appear in the summary.

You need to give each user the ‘SeeQueue’ Right. Note that applying
‘SeeQueue’ to any group that the user is in doesn’t quite work :wink:

Regards,

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations