[Rtir] Disabling Autoresponder to specific addresses
Ruediger Riediger
ruediger.riediger at sun.com
Wed Nov 10 05:18:12 EST 2004
Jarrod Loidl wrote:
> Is it possible to disable the Autoresponder in RTIR/RT3 so that it will
> not autorespond to a specific address? Failing that is it possible to
> disable autoresponding all together?
Ruediger Riediger wrote:
> [...] need to copy over /opt/rt3/lib/RT/Action/Autoreply.pm
> to /opt/rt3/local/lib/RT/Action/MyAutoreply.pm, register the new Action,
> change all scripts with "Autoreply" to "MyAutoreply" and [...]
even more easy :-)
drop the attached into /opt/rt3/local/lib/RT/Action/Autoreply_Local.pm,
then set in RT_SiteConfig.pm:
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))\@');
This will send only autoreplies to requesters matching your Allow
pattern and will further exclude your Deny pattern (Deny is current
DAEMON description from procmail). Obviously, Allow and Deny are ignored
if not set.
Note: this has not yet been tested completely.
Best regards,
Ruediger Riediger
--
Dr. Ruediger Riediger Sun Microsystems GmbH
NSG - SunCERT Komturstr. 18a
mailto:Ruediger.Riediger at Sun.com D-12099 Berlin
------------------------------------------------------------------------
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
------------------------------------------------------------------------
PGP 2048RSA/0x2C5020E9 964C E189 0FF0 8882 2BAB 65E2 6912 1FF2
------------------------------------------------------------------------
-------------- next part --------------
#
# /opt/rt3/local/lib/RT/Action/Autoreply_Local.pm
#
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);
}
1;
More information about the Rtir
mailing list