OK.

I found a solution to this myself! Thanks to everyone who provided possible 
fixes. It's probably not elegant but it seems to fit ok.

The trick was in this post to RTIR 
http://lists.bestpractical.com/pipermail/rtir/2004-November/000209.html, which 
I adapted for Ubuntu.

I found that copying /usr/share/request-tracker3.4/lib/RT/Action/Autoreply.pm 
to /usr/local/share/request-tracker3.4/lib/RT/Action/Autoreply.pm and replacing 

sub SetRecipients {
    my $self=shift;

    push(@{$self->{'To'}}, $self->TicketObj->Requestors->MemberEmailAddresses);

    return(1);
}

with 

no warnings qw(redefine);

sub SetRecipients {
    my $self=shift;

    if(defined($RT::AllowAutoReplyRegexp) && defined($RT::DenyAutoReplyRegexp)) 
{
        foreach($self->TicketObj->Requestors->MemberEmailAddresses) {
            push(@{$self->{'To'}}, $_)
              if ( ( ! $RT::AllowAutoReplyRegexp || 
/$RT::AllowAutoReplyRegexp/oi )
                &&  ! ( $RT::DenyAutoReplyRegexp && 
/$RT::DenyAutoReplyRegexp/oi ) );
        }
    } else {
        push(@{$self->{'To'}}, 
$self->TicketObj->Requestors->MemberEmailAddresses);
    }

    return(1);
}

worked.

In /etc/request-tracker3.4/RT_SiteConfig.pm add the lines

Set($AllowAutoReplyRegexp, '\@([\w.-]+\.)?your\.domain\.com$');
Set($DenyAutoReplyRegexp,
'^(Post(ma?(st(e?r)?|n)|of|ficl)|(send)?Mail(er)?|daemon|m(mdf|ajordomo)|n?uucp|LIST(SERV|proc)|NETSERV|o(wner|ps)|r(e(quest|sponse)|oot)|b(ounce|bs\.smtp)|echo|mirror|s(erv(ices?|er)|mtp(error)?|ystem)|A(dmin(istrator)?|MMGR|utoanswer))\@');

near the end.

So there you go.

Chris

Chris Wenn
IT Support Officer

Royal Botanic Gardens
Royal Botanic Gardens Melbourne
PH: (03) 9252 2354   FAX: (03) 9252 2442
EMAIL: [EMAIL PROTECTED] 
WEB: http://www.rbg.vic.gov.au


_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Reply via email to