I cannot seem to get a scrip that will accept multiple comma-seperated 
addresses from an email (or any correspondevent for that matter), only one 
address will be accepted.

The scrip I am using is a custom action that looks like this:

        my $Ticket = $self->TicketObj;
        my $Transaction = $self->TransactionObj;
        my $body = $Transaction->Content();
        my $cf = new RT::CustomField($RT::SystemUser);
        my $id;
        my $msg;
        my $queue = 'Testes';

        #---IPS
        if($body =~ /X-addresses\:(.*)\n/i){
        my $iplist = $1;
        ($id,$msg) = $cf->LoadByNameAndQueue (Name=>'ip-addresses', 
Queue=>$queue);
        ($id,$msg) = $Ticket->AddCustomFieldValue (Field => $cf, Value 
=>$iplist);
        }
        return(1);

I'm not opposed to being told I'm going about this the wrong way; present 
practice for my RT install is to have a web form submit requests, currently 
that request will have an IP address field that is picked up by a similar scrip 
(in addition to x-fqdn, x-contact, x-OS, and other information being collected) 
and I was thinking a comma-seperated list of mixed ipv4,ipv6 could be snarfed 
in one line and, as long as RT's address parser validated it, we'd be in 
business.



✔ Never use your HawkID's email address and password anywhere else!
   Emory Lundberg, Security Friend
   Information Security & Policy Office, University of Iowa 





Reply via email to