/usr/bin/imp-mailbox-decode is in php-horde-imp 6.1.6-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | #!/usr/bin/php
<?php
/**
* This script quickly allows conversion between a base64url encoded mailbox
* name (as used on the webpages) and the IMAP mailbox name (as used on the
* server).
*
* Copyright 2011-2013 Horde LLC (http://www.horde.org/)
*
* See the enclosed file COPYING for license information (GPL). If you
* did not receive this file, see http://www.horde.org/licenses/gpl.
*
* @author Michael Slusarz <slusarz@horde.org>
* @category Horde
* @license http://www.horde.org/licenses/gpl GPL
* @package IMP
*/
$baseFile = __DIR__ . '/../lib/Application.php';
if (file_exists($baseFile)) {
require_once $baseFile;
} else {
require_once 'PEAR/Config.php';
require_once PEAR_Config::singleton()
->get('horde_dir', null, 'pear.horde.org') . '/imp/lib/Application.php';
}
Horde_Registry::appInit('imp', array(
'authentication' => false,
'cli' => true
));
$opts = array(
1 => 'Decode base64url string => IMAP mailbox',
2 => 'Encode IMAP mailbox => base64url string'
);
switch ($cli->prompt('Action:', $opts)) {
case 1:
$encoded = trim($cli->prompt('Base64url encoded mailbox:'));
$cli->writeln();
$cli->message($cli->red('IMAP mailbox: ') . IMP_Mailbox::formFrom($encoded));
break;
case 2:
$decoded = trim($cli->prompt('IMAP mailbox:'));
$cli->writeln();
$cli->message($cli->red('Base64url encoded mailbox: ') . IMP_Mailbox::formTo($decoded));
break;
}
|