Filter mails from outside my own domain

Hi,

I have a new RT installation (latest version) and I need to NOT
autoreply mails coming from outside my domain, lets say @example.com.

So, any internal user sending a mail to helpdesk@example.com should get
an autoreply and any user sending a mail from anything else should get
nothing.

Any suggestion?

Thanks

Hi,
i’m now searching since some hours how to get the TicketObj from a given Ticket ID.

Normally from within a scrip i go this way: $self->TicketObj and i can work with all the Information (like $self->TicketObj->Status etc)

Now i have only i Ticket ID stored in a variable and i’m searching a way to get back my TicketObj.

Any hints? I’m lost at the moment

Thanks

Torsten

Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne

Hi,
i’m now searching since some hours how to get the TicketObj from a given Ticket ID.

Normally from within a scrip i go this way: $self->TicketObj and i can work with all the Information (like $self->TicketObj->Status etc)

Now i have only i Ticket ID stored in a variable and i’m searching a way to get back my TicketObj.

my $TicketObj = LoadTicket($id);

Matt Zagrabelny - mzagrabe@d.umn.edu - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems & Services
PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot

Hi,
i’m now searching since some hours how to get the TicketObj from a given Ticket ID.

Normally from within a scrip i go this way: $self->TicketObj and i can work with all the Information (like $self->TicketObj->Status etc)

Now i have only i Ticket ID stored in a variable and i’m searching a way to get back my TicketObj.

Any hints? I’m lost at the moment

Try something like:

my $Ticket = RT::Ticket->new($RT::SystemUser);
$Ticket->Load(TicketID#)

You can replace $RT::SystemUser with an RT::CurrentUser object for a
user in your system if you want to have actions restricted by or
transactions recorded for that user.

Thanks

Torsten

Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne


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

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

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

/------------------------------------------------------------------
| Jason A. Smith Email: smithj4@bnl.gov |
| Atlas Computing Facility, Bldg. 510M Phone: +1-631-344-4226 |
| Brookhaven National Lab, P.O. Box 5000 Fax: +1-631-344-7616 |
| Upton, NY 11973-5000, U.S.A. |
------------------------------------------------------------------/

smime.p7s (3.81 KB)

Hi Matt & Jason,

thanks for your support, but i cant get this running. I have tried both methods and both wont work.

Here my Action Code:

my $DepOnBy = $self->TicketObj->DependedOnBy;
while( my $dep = $DepOnBy->Next ) {
next unless( $dep->BaseURI->IsLocal );
my $orig = $dep->BaseObj->Id;
my $depon = $dep->TargetObj->Id;
$RT::Logger->debug(“ORIG: $orig DEPON: $depon”);
}

my $OriginalTicketObj = RT::Ticket->new($RT::SystemUser);
$OriginalTicketObj->Load($orig);

$RT::Logger->debug(“TBRUMM-LWIS-TST: CustomActionCleanCode - Ende”);
return 1;

This is the version like explained from Jason and it is not working.

And the same problem if i replace:

my $OriginalTicketObj = RT::Ticket->new($RT::SystemUser);
$OriginalTicketObj->Load($orig);

with

my $OriginalTicketObj = LoadTicket($orig);

I have now idea anymore whats going wrong at the moment.

Thanks

Torsten

Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne

-----Urspruengliche Nachricht-----Von: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] Im Auftrag von Matt Zagrabelny
Gesendet: Dienstag, 17. November 2009 15:38
An: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] How to get TicketObj from a Ticket ID

Hi,
i’m now searching since some hours how to get the TicketObj from a given Ticket ID.

Normally from within a scrip i go this way: $self->TicketObj and i can
work with all the Information (like $self->TicketObj->Status etc)

Now i have only i Ticket ID stored in a variable and i’m searching a way to get back my TicketObj.

my $TicketObj = LoadTicket($id);

Matt Zagrabelny - mzagrabe@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems & Services PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot lose.
-Jim Elliot

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

Community help: http://wiki.bestpractical.com Commercial support: sales@bestpractical.com

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

Finally i got the error. outsite the while loop the $orig variable does not exsist.

Thanks to all for the help.

TorstenVon: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] Im Auftrag von Brumm,Torsten / Kuehne + Nagel / Ham MI-ID
Gesendet: Dienstag, 17. November 2009 16:12
An: Matt Zagrabelny; rt-users@lists.bestpractical.com; smithj4@bnl.gov
Betreff: Re: [rt-users] How to get TicketObj from a Ticket ID

Hi Matt & Jason,

thanks for your support, but i cant get this running. I have tried both methods and both wont work.

Here my Action Code:

my $DepOnBy = $self->TicketObj->DependedOnBy; while( my $dep = $DepOnBy->Next ) {
next unless( $dep->BaseURI->IsLocal );
my $orig = $dep->BaseObj->Id;
my $depon = $dep->TargetObj->Id;
$RT::Logger->debug(“ORIG: $orig DEPON: $depon”); }

my $OriginalTicketObj = RT::Ticket->new($RT::SystemUser); $OriginalTicketObj->Load($orig);

$RT::Logger->debug(“TBRUMM-LWIS-TST: CustomActionCleanCode - Ende”); return 1;

This is the version like explained from Jason and it is not working.

And the same problem if i replace:

my $OriginalTicketObj = RT::Ticket->new($RT::SystemUser); $OriginalTicketObj->Load($orig);

with

my $OriginalTicketObj = LoadTicket($orig);

I have now idea anymore whats going wrong at the moment.

Thanks

Torsten

Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne

-----Urspruengliche Nachricht-----
Von: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] Im Auftrag von Matt Zagrabelny
Gesendet: Dienstag, 17. November 2009 15:38
An: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] How to get TicketObj from a Ticket ID

Hi,
i’m now searching since some hours how to get the TicketObj from a given Ticket ID.

Normally from within a scrip i go this way: $self->TicketObj and i can
work with all the Information (like $self->TicketObj->Status etc)

Now i have only i Ticket ID stored in a variable and i’m searching a way to get back my TicketObj.

my $TicketObj = LoadTicket($id);

Matt Zagrabelny - mzagrabe@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems & Services PGP key 1024D/84E22DA2 2005-11-07
Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2

He is not a fool who gives up what he cannot keep to gain what he cannot lose.
-Jim Elliot

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

Community help: http://wiki.bestpractical.com Commercial support: sales@bestpractical.com

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

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

Community help: http://wiki.bestpractical.com Commercial support: sales@bestpractical.com

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