I solved it myself.
I made two php-Scripts (Sorry, JSON-php was the easiest available). The first one fetches a raw message from the server:
Code:
<?php
if ($_SERVER['argc'] != 3) {
die ("Usage: php getmail.php <mailbox> <msgid>");
}
$mailbox = $_SERVER['argv'][1];
$msgid = $_SERVER['argv'][2];
$mail = json_decode(`zmsoap --json -z -m $mailbox GetMsgRequest/m @id=$msgid @raw=1`);
print $mail->m[0]->content->_content; The second one uses that one to resend the message by using sendmail (yeah, that could've been done in bash):
Code:
<?php
if ($_SERVER['argc'] != 3) {
die ("Usage: php resend.php <mailbox> <msgid>");
}
$mailbox = $_SERVER['argv'][1];
$msgid = $_SERVER['argv'][2];
print `php /usr/local/bin/getmail.php $mailbox $msgid | sendmail -i -t`; If someone could wrap up something more compatible with Zimbra by not relying on PHP or other external libraries, please do so.
Kind regards
Dennis