[rt-users] Re: Can I restrict autoreplies to the local domain?
Chris Wenn
Chris.Wenn at rbg.vic.gov.au
Mon Nov 13 17:45:25 EST 2006
Hi Isaac
I did post a solution, but I'll reprint it here for completeness:
--Quote--
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: Chris.Wenn at rbg.vic.gov.au
WEB: http://www.rbg.vic.gov.au
>>> Isaac Vetter <ivetter at math.purdue.edu> 14/11/2006 2:58:08 am >>>
Good Morning Chris;
Did you ever figure out a nice way to do this? The easiest way is
probably a procmail script, if that's what you ended up using, would you
mind posting it to the list?
Thanks,
Isaac Vetter
Chris Wenn wrote:
> Hm
>
> Has potential for my situation, but I'm trying to figure out how you actually _identify_ the mail coming from other domains. I suppose what I want is something simple that says "if the mail is from rbg.vic.gov.au, autoreply. if not, don't autoreply but continue processing as normal" but my perl-fu is too weak to figure it out!
>
> Chris
>
> Chris Wenn
> IT Support Officer
>
> Royal Botanic Gardens
> Royal Botanic Gardens Melbourne
> PH: (03) 9252 2354 FAX: (03) 9252 2442
> EMAIL: Chris.Wenn at rbg.vic.gov.au
> WEB: http://www.rbg.vic.gov.au
>
>
>>>> Gary Hall <hall at fas.sfu.ca> 20/09/2006 2:38:24 am >>>
>>>>
> We divert all incoming mail from outside the domain to a separate queue
> and enable autoreply only on the internal queue. (I.e., we removed the
> global autoreply scrips and recreated them on the internal queue.)
>
> We're a help-desk operation serving internal users who sometimes send
> requests from external email accounts. Such requests get moved to the
> internal queue and the Respondor value is corrected to the internal
> account name for the user.
>
> All remaining tickets in the external queue are spam and dealt with
> accordingly.
>
> Gary
>
>
>
>> "Chris Wenn" <Chris.Wenn at rbg.vic.gov.au> wrote
>>
> >
>
>> Hi
>>
>> Has anyone got a way of restricting RT's autoreply function to a single domain?
>>
>> I don't want users outside rbg.vic.gov.au to receive communication from my RT system.
>>
>> It's v3.4.4, running on Ubuntu Dapper 6.06, with postfix, apache2 and mysql as the backend.
>>
>> Chris
>>
>
>
>
More information about the rt-users
mailing list