From 5e6776da1fc9487e1d84acd41d9dcc5926a9cf15 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Mon, 28 Jul 2008 14:56:56 +0000 Subject: [PATCH] mailqueue processing is switched to GOsa-SI git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12072 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/client/events/mailqueue.pm | 384 +++++++++++++++++++++++++ gosa-si/gosa-si-server | 13 +- gosa-si/modules/GosaPackages.pm | 7 +- gosa-si/server/events/mailqueue_com.pm | 171 +++++++++++ gosa-si/tests/client.php | 22 +- 5 files changed, 587 insertions(+), 10 deletions(-) create mode 100644 gosa-si/client/events/mailqueue.pm create mode 100644 gosa-si/server/events/mailqueue_com.pm diff --git a/gosa-si/client/events/mailqueue.pm b/gosa-si/client/events/mailqueue.pm new file mode 100644 index 000000000..68171c276 --- /dev/null +++ b/gosa-si/client/events/mailqueue.pm @@ -0,0 +1,384 @@ +package mailqueue; +use Exporter; +@ISA = qw(Exporter); +my @events = ( + "get_events", + "mailqueue_query", + "mailqueue_hold", + "mailqueue_unhold", + "mailqueue_requeue", + "mailqueue_del", + "mailqueue_header", + ); +@EXPORT = @events; + +use strict; +use warnings; +use GOSA::GosaSupportDaemon; +use Data::Dumper; + +BEGIN {} + +END {} + + +sub get_events { return \@events; } + +sub mailqueue_query { + my ($msg, $msg_hash) = @_; + my $header = @{$msg_hash->{'header'}}[0]; + my $source = @{$msg_hash->{'source'}}[0]; + my $target = @{$msg_hash->{'target'}}[0]; + my $session_id = @{$msg_hash->{'session_id'}}[0]; + my $error = 0; + my $error_string; + my $msg_id; + my $msg_hold; + my $msg_size; + my $arrival_time; + my $sender; + my $recipient; + my $out_hash; + my $out_msg; + + &main::daemon_log("DEBUG: run /usr/bin/mailq\n", 7); + my $result = qx("/usr/bin/mailq"); + my @result_l = split(/([0-9A-Z]{10})/, $result); + + if (length($result) == 0) { + $error = 1; + $error_string = "/usr/bin/mailq has no result"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + } + + my $result_collection = {}; + if (not $error) { + # parse information + my $result_length = @result_l; + my $j = 0; + for (my $i = 1; $i < $result_length; $i+=2) { + $j++; + $result_collection->{$j} = {}; + + $msg_id = $result_l[$i]; + $result_collection->{$j}->{'msg_id'} = $msg_id; + $result_l[$i+1] =~ /^([\!| ])\s+(\d+) (\w{3} \w{3} \d+ \d+:\d+:\d+)\s+([\w.-]+@[\w.-]+)\s+/ ; + $result_collection->{$j}->{'msg_hold'} = $1 eq "!" ? 1 : 0 ; + $result_collection->{$j}->{'msg_size'} = $2; + $result_collection->{$j}->{'arrival_time'} = $3; + $result_collection->{$j}->{'sender'} = $4; + my @info_l = split(/\n/, $result_l[$i+1]); + $result_collection->{$j}->{'recipient'} = $info_l[2] =~ /([\w.-]+@[\w.-]+)/ ? $1 : 'unknown' ; + } + } + + # create outgoing msg + $out_hash = &main::create_xml_hash("answer_$session_id", $target, $source); + &add_content2xml_hash($out_hash, "session_id", $session_id); + &add_content2xml_hash($out_hash, "error", $error); + if (defined @{$msg_hash->{'forward_to_gosa'}}[0]){ + &add_content2xml_hash($out_hash, "forward_to_gosa", @{$msg_hash->{'forward_to_gosa'}}[0]); + } + + # add error infos to outgoing msg + if ($error) { + &add_content2xml_hash($out_hash, "error_string", $error_string); + $out_msg = &main::create_xml_string($out_hash); + + # add mail infos to outgoing msg + } else { + my $collection_string = &db_res2xml($result_collection); + $out_msg = &main::create_xml_string($out_hash); + $out_msg =~ s/<\/xml>/$collection_string<\/xml>/ + } + + return $out_msg; + +} + +sub mailqueue_hold { + my ($msg, $msg_hash) = @_; + my $header = @{$msg_hash->{'header'}}[0]; + my $source = @{$msg_hash->{'source'}}[0]; + my $target = @{$msg_hash->{'target'}}[0]; + my $session_id = @{$msg_hash->{'session_id'}}[0]; + my $error = 0; + my $error_string; + + # sanity check of input + if (not exists $msg_hash->{'msg_id'}) { + $error_string = "Message doesn't contain a XML tag 'msg_id"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + $error = 1; + } elsif (ref @{$msg_hash->{'msg_id'}}[0] eq "HASH") { + $error_string = "XML tag 'msg_id' is empty"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + $error = 1; + } + + if (not $error) { + my @msg_ids = @{$msg_hash->{'msg_id'}}; + foreach my $msg_id (@msg_ids) { + my $error = 0; # clear error status + + # sanity check of each msg_id + if (not $msg_id =~ /^[0-9A-Z]{10}$/) { + $error = 1; + $error_string = "message ID is not valid ([0-9A-Z]{10}) : $msg_id"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + } + + if (not $error) { + my $cmd = "/usr/sbin/postsuper -h $msg_id 2>&1"; + &main::daemon_log("DEBUG: run $cmd", 7); + my $result = qx($cmd); + if ($result =~ /^postsuper: ([0-9A-Z]{10}): placed on hold/ ) { + &main::daemon_log("INFO: Mail $msg_id placed on hold", 5); + } elsif ($result eq "") { + &main::daemon_log("INFO: Mail $msg_id is alread placed on hold", 5); + + } else { + &main::daemon_log("ERROR: '$cmd' failed : $result", 1); + } + } + } + } + + return; +} + + +sub mailqueue_unhold { + my ($msg, $msg_hash) = @_; + my $header = @{$msg_hash->{'header'}}[0]; + my $source = @{$msg_hash->{'source'}}[0]; + my $target = @{$msg_hash->{'target'}}[0]; + my $session_id = @{$msg_hash->{'session_id'}}[0]; + my $error = 0; + my $error_string; + + # sanity check of input + if (not exists $msg_hash->{'msg_id'}) { + $error_string = "Message doesn't contain a XML tag 'msg_id'"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + $error = 1; + } elsif (ref @{$msg_hash->{'msg_id'}}[0] eq "HASH") { + $error_string = "XML tag 'msg_id' is empty"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + $error = 1; + } + + if (not $error) { + my @msg_ids = @{$msg_hash->{'msg_id'}}; + foreach my $msg_id (@msg_ids) { + my $error = 0; # clear error status + + # sanity check of each msg_id + if (not $msg_id =~ /^[0-9A-Z]{10}$/) { + $error = 1; + $error_string = "message ID is not valid ([0-9A-Z]{10}) : $msg_id"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + } + + if (not $error) { + my $cmd = "/usr/sbin/postsuper -H $msg_id 2>&1"; + &main::daemon_log("DEBUG: run $cmd\n", 7); + my $result = qx($cmd); + if ($result =~ /^postsuper: ([0-9A-Z]{10}): released from hold/ ) { + &main::daemon_log("INFO: Mail $msg_id released from on hold", 5); + } elsif ($result eq "") { + &main::daemon_log("INFO: Mail $msg_id is alread released from hold", 5); + + } else { + &main::daemon_log("ERROR: '$cmd' failed : $result", 1); + } + + } + } + } + + return; +} + +sub mailqueue_requeue { + my ($msg, $msg_hash) = @_; + my $header = @{$msg_hash->{'header'}}[0]; + my $source = @{$msg_hash->{'source'}}[0]; + my $target = @{$msg_hash->{'target'}}[0]; + my $session_id = @{$msg_hash->{'session_id'}}[0]; + my @msg_ids = @{$msg_hash->{'msg_id'}}; + my $error = 0; + my $error_string; + + # sanity check of input + if (not exists $msg_hash->{'msg_id'}) { + $error_string = "Message doesn't contain a XML tag 'msg_id'"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + $error = 1; + } elsif (ref @{$msg_hash->{'msg_id'}}[0] eq "HASH") { + $error_string = "XML tag 'msg_id' is empty"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + $error = 1; + } + + if (not $error) { + my @msg_ids = @{$msg_hash->{'msg_id'}}; + foreach my $msg_id (@msg_ids) { + my $error = 0; # clear error status + + # sanity check of each msg_id + if (not $msg_id =~ /^[0-9A-Z]{10}$/) { + $error = 1; + $error_string = "message ID is not valid ([0-9A-Z]{10}) : $msg_id"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + } + + if (not $error) { + my $cmd = "/usr/sbin/postsuper -r $msg_id 2>&1"; + &main::daemon_log("DEBUG: run '$cmd'", 7); + my $result = qx($cmd); + if ($result =~ /^postsuper: ([0-9A-Z]{10}): requeued/ ) { + &main::daemon_log("INFO: Mail $msg_id requeued", 5); + } elsif ($result eq "") { + &main::daemon_log("WARNING: Cannot requeue mail '$msg_id', mail not found!", 3); + + } else { + &main::daemon_log("ERROR: '$cmd' failed : $result", 1); + } + + } + } + } + + return; +} + +sub mailqueue_del { + my ($msg, $msg_hash) = @_; + my $header = @{$msg_hash->{'header'}}[0]; + my $source = @{$msg_hash->{'source'}}[0]; + my $target = @{$msg_hash->{'target'}}[0]; + my $session_id = @{$msg_hash->{'session_id'}}[0]; + my @msg_ids = @{$msg_hash->{'msg_id'}}; + my $error = 0; + my $error_string; + + # sanity check of input + if (not exists $msg_hash->{'msg_id'}) { + $error_string = "Message doesn't contain a XML tag 'msg_id'"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + $error = 1; + } elsif (ref @{$msg_hash->{'msg_id'}}[0] eq "HASH") { + $error_string = "XML tag 'msg_id' is empty"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + $error = 1; + } + + if (not $error) { + my @msg_ids = @{$msg_hash->{'msg_id'}}; + foreach my $msg_id (@msg_ids) { + my $error = 0; # clear error status + + # sanity check of each msg_id + if (not $msg_id =~ /^[0-9A-Z]{10}$/) { + $error = 1; + $error_string = "message ID is not valid ([0-9A-Z]{10}) : $msg_id"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + } + + if (not $error) { + my $cmd = "/usr/sbin/postsuper -d $msg_id 2>&1"; + &main::daemon_log("DEBUG: run '$cmd'", 7); + my $result = qx($cmd); + if ($result =~ /^postsuper: ([0-9A-Z]{10}): removed/ ) { + &main::daemon_log("INFO: Mail $msg_id deleted", 5); + } elsif ($result eq "") { + &main::daemon_log("WARNING: Cannot remove mail '$msg_id', mail not found!", 3); + + } else { + &main::daemon_log("ERROR: '$cmd' failed : $result", 1); + } + + } + } + } + + return; +} + +sub mailqueue_header { + my ($msg, $msg_hash) = @_; + my $header = @{$msg_hash->{'header'}}[0]; + my $source = @{$msg_hash->{'source'}}[0]; + my $target = @{$msg_hash->{'target'}}[0]; + my $session_id = @{$msg_hash->{'session_id'}}[0]; + my $error = 0; + my $error_string; + my $sender; + my $recipient; + my $subject; + my $out_hash; + my $out_msg; + + # sanity check of input + if (not exists $msg_hash->{'msg_id'}) { + $error_string = "Message doesn't contain a XML tag 'msg_id'"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + $error = 1; + } elsif (ref @{$msg_hash->{'msg_id'}}[0] eq "HASH") { + $error_string = "XML tag 'msg_id' is empty"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + $error = 1; + } + + # sanity check of each msg_id + my $msg_id; + if (not $error) { + $msg_id = @{$msg_hash->{'msg_id'}}[0]; + if (not $msg_id =~ /^[0-9A-Z]{10}$/) { + $error = 1; + $error_string = "message ID is not valid ([0-9A-Z]{10}) : $msg_id"; + &main::daemon_log("ERROR: $error_string : $msg", 1); + } + } + + # parsing information + if (not $error) { + my $cmd = "postcat -q $msg_id"; + &main::daemon_log("DEBUG: run '$cmd'", 7); + my $result = qx($cmd); + foreach (split(/\n/, $result)) { + if ($_ =~ /^To: ([\S]+)/) { $recipient = $1; } + if ($_ =~ /^From: ([\S]+)/) { $sender = $1; } + if ($_ =~ /^Subject: ([\s\S]+)/) { $subject = $1; } + } + } + + # create outgoing msg + $out_hash = &main::create_xml_hash("answer_$session_id", $target, $source); + &add_content2xml_hash($out_hash, "session_id", $session_id); + &add_content2xml_hash($out_hash, "error", $error); + if (defined @{$msg_hash->{'forward_to_gosa'}}[0]){ + &add_content2xml_hash($out_hash, "forward_to_gosa", @{$msg_hash->{'forward_to_gosa'}}[0]); + } + + # add error infos to outgoing msg + if ($error) { + &add_content2xml_hash($out_hash, "error_string", $error_string); + $out_msg = &main::create_xml_string($out_hash); + + # add mail infos to outgoing msg + } else { + &add_content2xml_hash($out_hash, "recipient", $recipient); + &add_content2xml_hash($out_hash, "sender", $sender); + &add_content2xml_hash($out_hash, "subject", $subject); + $out_msg = &main::create_xml_string($out_hash); + } + + return $out_msg; +} + + +# vim:ts=4:shiftwidth:expandtab + +1; diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index ada883ba0..e377f705d 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -87,6 +87,7 @@ our (%cfg_defaults, $log_file, $pid_file, $GosaPackages_key, $gosa_ip, $gosa_port, $gosa_timeout, $foreign_server_string, $server_domain, $ServerPackages_key, $foreign_servers_register_delay, $wake_on_lan_passwd, $job_synchronization, $modified_jobs_loop_delay, + $arp_enabled, $arp_interface, ); # additional variable which should be globaly accessable @@ -257,7 +258,12 @@ my $max_children = 2; "key-lifetime" => [\$foreign_servers_register_delay, 120], "job-synchronization-enabled" => [\$job_synchronization, "true"], "synchronization-loop" => [\$modified_jobs_loop_delay, 5], -} + }, +"ArpHandler" => { + "enabled" => [\$arp_enabled, "true"], + "interface" => [\$arp_interface, "all"], + }, + ); @@ -449,10 +455,9 @@ sub import_modules { } my $mod_name = $1; + # ArpHandler switch if( $file =~ /ArpHandler.pm/ ) { - if( $no_arp > 0 ) { - next; - } + if( $arp_enabled eq "false" ) { next; } } eval { require $file; }; diff --git a/gosa-si/modules/GosaPackages.pm b/gosa-si/modules/GosaPackages.pm index 5791a318e..ad5d12b50 100644 --- a/gosa-si/modules/GosaPackages.pm +++ b/gosa-si/modules/GosaPackages.pm @@ -172,7 +172,6 @@ sub process_incoming_msg { if (defined $out_msg){ push(@out_msg_l, $out_msg); } - } return \@out_msg_l; @@ -185,9 +184,12 @@ sub process_gosa_msg { my @out_msg_l = ('nohandler'); my $sql_events; + # strip gosa_ prefix from header, it is not used any more + @{$msg_hash->{'header'}}[0] =~ s/gosa_//; + $msg =~ s/
gosa_/
/; + my $header = @{$msg_hash->{'header'}}[0]; my $target = @{$msg_hash->{'target'}}[0]; - $header =~ s/gosa_//; # check local installed events if( exists $event_hash->{$header} ) { @@ -212,7 +214,6 @@ sub process_gosa_msg { # client is registered for this event, deliver this message to client if ($client_events =~ /,$header,/) { - $msg =~ s/
gosa_/
/; @out_msg_l = ( $msg ); # client is not registered for this event, set error diff --git a/gosa-si/server/events/mailqueue_com.pm b/gosa-si/server/events/mailqueue_com.pm new file mode 100644 index 000000000..aed549510 --- /dev/null +++ b/gosa-si/server/events/mailqueue_com.pm @@ -0,0 +1,171 @@ +package mailqueue_com; +use Exporter; +@ISA = qw(Exporter); +my @events = ( + "get_events", + "mailqueue_query", + "mailqueue_header", +); +@EXPORT = @events; + +use strict; +use warnings; +use GOSA::GosaSupportDaemon; +use Data::Dumper; +use Time::HiRes qw( usleep); +use MIME::Base64; + + +BEGIN {} + +END {} + +### Start ###################################################################### + +sub get_events { + return \@events; +} + +sub mailqueue_query { + my ($msg, $msg_hash, $session_id) = @_ ; + my $header = @{$msg_hash->{header}}[0]; + my $target = @{$msg_hash->{target}}[0]; + my $source = @{$msg_hash->{source}}[0]; + my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0]; + my $error = 0; + my $error_string; + my $answer_msg; + my ($sql, $res); + + if( defined $jobdb_id) { + my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id"; + &main::daemon_log("$session_id DEBUG: $sql_statement", 7); + my $res = $main::job_db->exec_statement($sql_statement); + } + + # send message + $sql = "SELECT * FROM $main::known_clients_tn WHERE ((hostname='$target') || (macaddress LIKE '$target'))"; + $res = $main::known_clients_db->exec_statement($sql); + + # sanity check of db result + my ($host_name, $host_key); + if ((defined $res) && (@$res > 0) && @{@$res[0]} > 0) { + $host_name = @{@$res[0]}[0]; + $host_key = @{@$res[0]}[2]; + } else { + &main::daemon_log("$session_id ERROR: cannot determine host_name and host_key from known_clients_db\n$msg", 1); + $error_string = "Cannot determine host_name and host_key from known_clients_db"; + $error = 1; + } + + if (not $error) { + $msg =~ s/GOSA<\/source>/$main::server_address<\/source>/g; + $msg =~ s/<\/xml>/$session_id<\/session_id><\/xml>/; + &main::send_msg_to_target($msg, $host_name, $host_key, $header, $session_id); + + # waiting for answer + my $message_id; + my $i = 0; + while (1) { + $i++; + $sql = "SELECT * FROM $main::incoming_tn WHERE headertag='answer_$session_id'"; + $res = $main::incoming_db->exec_statement($sql); + if (ref @$res[0] eq "ARRAY") { + $message_id = @{@$res[0]}[0]; + last; + } + + if ($i > 100) { last; } # do not run into a endless loop + usleep(100000); + } + # if answer exists + if (defined $message_id) { + $answer_msg = decode_base64(@{@$res[0]}[4]); + $answer_msg =~ s/\S+<\/target>/$source<\/target>/; + $answer_msg =~ s/
\S+<\/header>/
$header<\/header>/; + + my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0]; + if (defined $forward_to_gosa){ + $answer_msg =~s/<\/xml>/$forward_to_gosa<\/forward_to_gosa><\/xml>/; + } + $sql = "DELETE FROM $main::incoming_tn WHERE id=$message_id"; + $res = $main::incoming_db->exec_statement($sql); + } + } + + return ( $answer_msg ); +} + +sub mailqueue_header { + my ($msg, $msg_hash, $session_id) = @_ ; + my $header = @{$msg_hash->{header}}[0]; + my $target = @{$msg_hash->{target}}[0]; + my $source = @{$msg_hash->{source}}[0]; + my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0]; + my $error = 0; + my $error_string; + my $answer_msg; + my ($sql, $res); + + if( defined $jobdb_id) { + my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id"; + &main::daemon_log("$session_id DEBUG: $sql_statement", 7); + my $res = $main::job_db->exec_statement($sql_statement); + } + + # search for the correct target address + $sql = "SELECT * FROM $main::known_clients_tn WHERE ((hostname='$target') || (macaddress LIKE '$target'))"; + $res = $main::known_clients_db->exec_statement($sql); + my ($host_name, $host_key); + if ((defined $res) && (@$res > 0) && @{@$res[0]} > 0) { # sanity check of db result + $host_name = @{@$res[0]}[0]; + $host_key = @{@$res[0]}[2]; + } else { + &main::daemon_log("$session_id ERROR: cannot determine host_name and host_key from known_clients_db\n$msg", 1); + $error_string = "Cannot determine host_name and host_key from known_clients_db"; + $error = 1; + } + + # send message to target + if (not $error) { + $msg =~ s/GOSA<\/source>/$main::server_address<\/source>/g; + $msg =~ s/<\/xml>/$session_id<\/session_id><\/xml>/; + &main::send_msg_to_target($msg, $host_name, $host_key, $header, $session_id); + } + + # waiting for answer + if (not $error) { + my $message_id; + my $i = 0; + while (1) { + $i++; + $sql = "SELECT * FROM $main::incoming_tn WHERE headertag='answer_$session_id'"; + $res = $main::incoming_db->exec_statement($sql); + if (ref @$res[0] eq "ARRAY") { + $message_id = @{@$res[0]}[0]; + last; + } + + if ($i > 100) { last; } # do not run into a endless loop + usleep(100000); + } + # if answer exists + if (defined $message_id) { + $answer_msg = decode_base64(@{@$res[0]}[4]); + $answer_msg =~ s/\S+<\/target>/$source<\/target>/; + $answer_msg =~ s/
\S+<\/header>/
$header<\/header>/; + + my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0]; + if (defined $forward_to_gosa){ + $answer_msg =~s/<\/xml>/$forward_to_gosa<\/forward_to_gosa><\/xml>/; + } + $sql = "DELETE FROM $main::incoming_tn WHERE id=$message_id"; + $res = $main::incoming_db->exec_statement($sql); + } + } + + return ( $answer_msg ); +} + +# vim:ts=4:shiftwidth:expandtab +1; diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index 7737ff0e2..4c507336f 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -125,13 +125,13 @@ for($count = 1; $count <= $zahl; $count++) #$data = "
gosa_opsi_get_netboot_products
GOSA 00:01:6c:9d:aa:16 limux-cl-2.intranet.gonicus.de
"; # Get all localboot products - $data = "
gosa_opsi_get_local_products
GOSA 00:01:6c:9d:aa:16
"; + #$data = "
gosa_opsi_get_local_products
GOSA 00:01:6c:9d:aa:16
"; # Get localboot product for specific host #$data = "
gosa_opsi_get_local_products
GOSA 00:01:6c:9d:aa:16 limux-cl-2.intranet.gonicus.de
"; # Get product properties - global - $data = "
gosa_opsi_get_product_properties
GOSA 00:01:6c:9d:aa:16 winxppro
"; + #$data = "
gosa_opsi_get_product_properties
GOSA 00:01:6c:9d:aa:16 winxppro
"; # Get product properties - per host #$data = "
gosa_opsi_get_product_properties
GOSA 00:01:6c:9d:aa:16 firefox limux-cl-2.intranet.gonicus.de
"; @@ -152,7 +152,23 @@ for($count = 1; $count <= $zahl; $count++) #$data = "
gosa_opsi_list_clients
GOSA 00:01:6c:9d:aa:16
"; # Delete Opsi client - $data = "
gosa_opsi_del_client
GOSA 00:01:6c:9d:aa:16 sdfgsg.intranet.gonicus.de
"; + #$data = "
gosa_opsi_del_client
GOSA 00:01:6c:9d:aa:16 sdfgsg.intranet.gonicus.de
"; + + ######################### + # Mailqueue communication + $data = "
gosa_mailqueue_query
GOSA 00:01:6c:9d:b9:fa
"; + + # multiple xml tags msg_id are allowed + #$data = "
gosa_mailqueue_hold
GOSA 00:01:6c:9d:b9:fa 99C8ABEF23
"; + #$data = "
gosa_mailqueue_unhold
GOSA 00:01:6c:9d:b9:fa 5657EBEEF7
"; + #$data = "
gosa_mailqueue_requeue
GOSA 00:01:6c:9d:b9:fa 11A09BEF04
"; + #$data = "
gosa_mailqueue_del
GOSA 00:01:6c:9d:b9:fa 11A09BEF04
"; + + # only one xml tag msg_id is allowed + #$data = "
gosa_mailqueue_header
GOSA 00:01:6c:9d:b9:fa 99E92BEF2B
"; + + + $sock->write($data); $answer = "nothing"; -- 2.30.2