Compare commits
176 Commits
master
...
bnet/addit
Author | SHA1 | Date |
---|---|---|
Felix Stupp | b53d1c83ce | 4 years ago |
Thomas Bruederli | 5b53161198 | 5 years ago |
Aleksander Machniak | 9905b5adaa | 5 years ago |
Thomas Bruederli | 9898599d3e | 5 years ago |
Aleksander Machniak | ccaccae665 | 5 years ago |
Aleksander Machniak | b37433b199 | 5 years ago |
Aleksander Machniak | 4beec65d40 | 5 years ago |
Aleksander Machniak | 20ae604b9f | 5 years ago |
Aleksander Machniak | 5e4195a042 | 5 years ago |
Aleksander Machniak | 31df958caf | 5 years ago |
Aleksander Machniak | bebc9ec1be | 5 years ago |
Aleksander Machniak | c25616b3b5 | 5 years ago |
Aleksander Machniak | eba6fb20cf | 5 years ago |
Aleksander Machniak | 99b20bd82a | 5 years ago |
Christopher Gurnee | 973217d960 | 5 years ago |
Aleksander Machniak | 9362bb9459 | 5 years ago |
Christopher Gurnee | a5c6bfb678 | 5 years ago |
Christopher Gurnee | 79e6042276 | 5 years ago |
Aleksander Machniak | 90afff1929 | 5 years ago |
vaaguirre | 9d0d072f36 | 5 years ago |
Aleksander Machniak | 656c706270 | 5 years ago |
Aleksander Machniak | 26d5fb1b55 | 5 years ago |
Aleksander Machniak | dff0ee3e2a | 5 years ago |
johndoh | f494cd22ce | 5 years ago |
Aleksander Machniak | 2a250d7bc3 | 5 years ago |
Aleksander Machniak | 62a0936ecc | 5 years ago |
Aleksander Machniak | d15d929167 | 5 years ago |
Thomas Bruederli | aadb13e25f | 5 years ago |
Aleksander Machniak | 9bbda422ff | 5 years ago |
Aleksander Machniak | 814eadb699 | 5 years ago |
Aleksander Machniak | fcfb099477 | 5 years ago |
Aleksander Machniak | 1c239c90d9 | 5 years ago |
Aleksander Machniak | 301670f081 | 5 years ago |
Aleksander Machniak | be68e3f679 | 5 years ago |
Aleksander Machniak | 37acfc2e03 | 5 years ago |
Aleksander Machniak | 080b0afd95 | 5 years ago |
Aleksander Machniak | ecfee7470c | 5 years ago |
Aleksander Machniak | 343da344e0 | 5 years ago |
Aleksander Machniak | 0d43c51ce1 | 5 years ago |
Aleksander Machniak | 808f374f42 | 5 years ago |
Aleksander Machniak | 15e924fd64 | 5 years ago |
Aleksander Machniak | c99e093f8a | 5 years ago |
Aleksander Machniak | 43f90d31c8 | 5 years ago |
Aleksander Machniak | 5666ae00a8 | 5 years ago |
PhilW | 2ba62d0c98 | 5 years ago |
Aleksander Machniak | 7c081d7d72 | 5 years ago |
Aleksander Machniak | a74a9e5fc2 | 5 years ago |
Aleksander Machniak | cd73ca05d8 | 5 years ago |
PhilW | 1bc41d3a5f | 5 years ago |
Aleksander Machniak | ae71f01b33 | 5 years ago |
Aleksander Machniak | 746ccb7fdf | 5 years ago |
Aleksander Machniak | 59af9944ea | 5 years ago |
dessert1 | 2005b895be | 5 years ago |
Aleksander Machniak | 734f97511a | 5 years ago |
Aleksander Machniak | ade470aac9 | 5 years ago |
Aleksander Machniak | a71b33f568 | 5 years ago |
Aleksander Machniak | 518d1aea71 | 5 years ago |
Aleksander Machniak | 3a32a1e246 | 5 years ago |
Aleksander Machniak | 7793386683 | 5 years ago |
Aleksander Machniak | edbcb03237 | 5 years ago |
Aleksander Machniak | 73e2b0584a | 5 years ago |
Aleksander Machniak | f0aafa98ee | 5 years ago |
Aleksander Machniak | 5de09e9f21 | 5 years ago |
Aleksander Machniak | 81e55f8033 | 5 years ago |
Aleksander Machniak | 1c5f83d41c | 5 years ago |
Aleksander Machniak | 233beea354 | 5 years ago |
Aleksander Machniak | 88660cd465 | 5 years ago |
Thomas Bruederli | 0c8b71059b | 5 years ago |
Thomas Bruederli | 273707f378 | 5 years ago |
Aleksander Machniak | 322ab30fb9 | 5 years ago |
Paul J. Dorn | 9cb796ee2b | 5 years ago |
Aleksander Machniak | 65d6a5aa51 | 5 years ago |
Aleksander Machniak | ab3220d046 | 5 years ago |
Aleksander Machniak | ea1260ea72 | 5 years ago |
Aleksander Machniak | bff226801d | 5 years ago |
Aleksander Machniak | b35bf87105 | 5 years ago |
Aleksander Machniak | 7f45e47f00 | 5 years ago |
Aleksander Machniak | 9d4638d94e | 5 years ago |
Aleksander Machniak | 3819e4e640 | 5 years ago |
Aleksander Machniak | 62ed219821 | 5 years ago |
Aleksander Machniak | f0dc915fd8 | 5 years ago |
Aleksander Machniak | 0aa724f73c | 5 years ago |
Max Bosse | 36aa132f51 | 5 years ago |
Aleksander Machniak | 5d68245fa5 | 5 years ago |
Aleksander Machniak | a3a260b613 | 5 years ago |
Aleksander Machniak | 229b9f5f2c | 5 years ago |
Aleksander Machniak | d14d0c5ab5 | 5 years ago |
Aleksander Machniak | 1723aa936f | 5 years ago |
Aleksander Machniak | adc08946ef | 5 years ago |
Aleksander Machniak | b470f5a9f3 | 5 years ago |
Aleksander Machniak | cd1859609b | 5 years ago |
Aleksander Machniak | fbc9219d72 | 5 years ago |
Aleksander Machniak | b5e76ab202 | 5 years ago |
Aleksander Machniak | c8ead80312 | 5 years ago |
Aleksander Machniak | ef13807f17 | 5 years ago |
Aleksander Machniak | 9ecf84e3bd | 5 years ago |
jelle van der Waa | 2edcf5b52c | 5 years ago |
Théo | b421de8416 | 5 years ago |
Aleksander Machniak | 348e557614 | 5 years ago |
Thomas Bruederli | 51b8137170 | 5 years ago |
Aleksander Machniak | 2fa6dd7ee5 | 5 years ago |
Aleksander Machniak | d6c80e4b79 | 5 years ago |
Aleksander Machniak | ca870f034e | 5 years ago |
Aleksander Machniak | 880452f84e | 5 years ago |
Aleksander Machniak | b25c649bb7 | 5 years ago |
Aleksander Machniak | d3bedca7f8 | 5 years ago |
Aleksander Machniak | 72959279e2 | 5 years ago |
Aleksander Machniak | 3bdcfc5623 | 5 years ago |
Aleksander Machniak | b47e38447c | 5 years ago |
Aleksander Machniak | d025351d64 | 5 years ago |
Aleksander Machniak | 906b223d30 | 5 years ago |
Aleksander Machniak | bd7c38be0b | 5 years ago |
Aleksander Machniak | eecd78c3a1 | 5 years ago |
Sebastiaan Lokhorst | 3a12de3fb6 | 5 years ago |
Aleksander Machniak | 5ec5ae57a5 | 5 years ago |
Aleksander Machniak | 58be50418d | 5 years ago |
Aleksander Machniak | 8127d2615f | 5 years ago |
Aleksander Machniak | 1fe448ce41 | 5 years ago |
Aleksander Machniak | e1dfd55185 | 5 years ago |
Aleksander Machniak | bd03cc4541 | 5 years ago |
Aleksander Machniak | 132be945bd | 5 years ago |
Aleksander Machniak | 38f1727515 | 5 years ago |
Aleksander Machniak | dd59b59478 | 5 years ago |
Aleksander Machniak | e0ae7765bc | 5 years ago |
Aleksander Machniak | e29d44dcc3 | 5 years ago |
Sebastiaan Lokhorst | 1800678a40 | 5 years ago |
Aleksander Machniak | a270cf593e | 5 years ago |
Aleksander Machniak | 03b3dd3389 | 5 years ago |
Aleksander Machniak | c084d69d06 | 5 years ago |
Aleksander Machniak | fbb39470d5 | 5 years ago |
Aleksander Machniak | 0e7295fce6 | 5 years ago |
Aleksander Machniak | 90bdd77ada | 5 years ago |
Aleksander Machniak | 09af79f637 | 5 years ago |
Aleksander Machniak | e25f352472 | 5 years ago |
Aleksander Machniak | a80da7f678 | 5 years ago |
Aleksander Machniak | 840437c460 | 5 years ago |
Aleksander Machniak | 55dbf40133 | 5 years ago |
johndoh | 8952e9dddb | 5 years ago |
Aleksander Machniak | 720a0a3173 | 5 years ago |
Aleksander Machniak | aeec47b9bd | 5 years ago |
Aleksander Machniak | b49d9f05aa | 5 years ago |
Aleksander Machniak | 8252bc3962 | 5 years ago |
Aleksander Machniak | 7e9405dc3e | 5 years ago |
PhilW | c7baf94531 | 5 years ago |
Thomas Bruederli | 0b1d6841f9 | 5 years ago |
Aleksander Machniak | fbc50b3791 | 5 years ago |
Aleksander Machniak | ac3ce1d713 | 5 years ago |
Aleksander Machniak | ae7429a287 | 5 years ago |
Aleksander Machniak | deee3442aa | 5 years ago |
Aleksander Machniak | ebfd0f53bf | 5 years ago |
Aleksander Machniak | 594a12b61e | 5 years ago |
Aleksander Machniak | 8ca4bf8a3a | 5 years ago |
Aleksander Machniak | 0c8e29fcbf | 5 years ago |
Aleksander Machniak | f50521a399 | 5 years ago |
Aleksander Machniak | 075803871a | 5 years ago |
Aleksander Machniak | 0467670533 | 5 years ago |
Aleksander Machniak | 90d1d58f8b | 5 years ago |
Aleksander Machniak | e3d18291ff | 5 years ago |
Aleksander Machniak | 71990b59d6 | 5 years ago |
Aleksander Machniak | 29e7c16b33 | 5 years ago |
Aleksander Machniak | 980f2b369f | 5 years ago |
Aleksander Machniak | cab4c8a39c | 5 years ago |
Aleksander Machniak | 659980923a | 5 years ago |
Aleksander Machniak | 35e41670e6 | 5 years ago |
Aleksander Machniak | 0ac39592fc | 5 years ago |
Aleksander Machniak | 392734f984 | 5 years ago |
Aleksander Machniak | 83289cce1e | 5 years ago |
Aleksander Machniak | 1ef912555d | 5 years ago |
Aleksander Machniak | 59ac1ddb64 | 5 years ago |
Aleksander Machniak | 17a6bd77a1 | 5 years ago |
Aleksander Machniak | 9a11d0e36c | 5 years ago |
Aleksander Machniak | 2464f5fed8 | 5 years ago |
Thomas Bruederli | fdbdaec998 | 5 years ago |
Thomas Bruederli | 579663e285 | 5 years ago |
Thomas Bruederli | e774209b41 | 5 years ago |
Aleksander Machniak | dba4988bbe | 5 years ago |
@ -0,0 +1,6 @@
|
||||
[submodule "plugins/postfixadmin-user-identities"]
|
||||
path = plugins/postfixadmin-user-identities
|
||||
url = git@git.banananet.work:banananetwork/roundcubemail-postfixadmin-user-identities.git
|
||||
[submodule "plugins/swipe"]
|
||||
path = plugins/swipe
|
||||
url = git@git.banananet.work:banananetwork/roundcubemail-swipe.git
|
Before Width: | Height: | Size: 653 B After Width: | Height: | Size: 653 B |
Before Width: | Height: | Size: 637 B After Width: | Height: | Size: 637 B |
Before Width: | Height: | Size: 565 B After Width: | Height: | Size: 565 B |
@ -0,0 +1,188 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/*
|
||||
+-----------------------------------------------------------------------+
|
||||
| This file is part of the Roundcube Webmail client |
|
||||
| |
|
||||
| Copyright (C) The Roundcube Dev Team |
|
||||
| Copyright (C) Kolab Systems AG |
|
||||
| |
|
||||
| Licensed under the GNU General Public License version 3 or |
|
||||
| any later version with exceptions for skins & plugins. |
|
||||
| See the README file for a full license statement. |
|
||||
| |
|
||||
| PURPOSE: |
|
||||
| Import keys from Enigma's homedir into database for multihost |
|
||||
| support. |
|
||||
+-----------------------------------------------------------------------+
|
||||
| Author: Aleksander Machniak <alec@alec.pl> |
|
||||
+-----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
define('INSTALL_PATH', realpath(__DIR__ . '/../../../') . '/');
|
||||
|
||||
require INSTALL_PATH . 'program/include/clisetup.php';
|
||||
|
||||
$rcmail = rcube::get_instance();
|
||||
|
||||
// get arguments
|
||||
$args = rcube_utils::get_opt(array(
|
||||
'u' => 'user',
|
||||
'h' => 'host',
|
||||
'd' => 'dir',
|
||||
'x' => 'dry-run',
|
||||
));
|
||||
|
||||
if ($_SERVER['argv'][1] == 'help') {
|
||||
print_usage();
|
||||
exit;
|
||||
}
|
||||
|
||||
if (empty($args['dir'])) {
|
||||
rcube::raise_error("--dir argument is required", true);
|
||||
}
|
||||
|
||||
$host = get_host($args);
|
||||
$dirs = array();
|
||||
|
||||
// Read the homedir and iterate over all subfolders (as users)
|
||||
if (empty($args['user'])) {
|
||||
if ($dh = opendir($args['dir'])) {
|
||||
while (($dir = readdir($dh)) !== false) {
|
||||
if ($dir != '.' && $dir != '..') {
|
||||
$dirs[$args['dir'] . '/' . $dir] = $dir;
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
}
|
||||
// a single user
|
||||
else {
|
||||
$dirs = array($args['dir'] => $args['user']);
|
||||
}
|
||||
|
||||
foreach ($dirs as $dir => $user) {
|
||||
echo "Importing keys from $dir\n";
|
||||
|
||||
if ($user_id = get_user_id($user, $host)) {
|
||||
reset_state($user_id, !empty($args['dry-run']));
|
||||
import_dir($user_id, $dir, !empty($args['dry-run']));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function print_usage()
|
||||
{
|
||||
print "Usage: import.sh [options]\n";
|
||||
print "Options:\n";
|
||||
print " --user=username User, if not set --dir subfolders will be iterated\n";
|
||||
print " --host=host The IMAP hostname or IP the given user is related to\n";
|
||||
print " --dir=path Location of the gpg homedir\n";
|
||||
print " --dry-run Do nothing, just list found user/files\n";
|
||||
}
|
||||
|
||||
function get_host($args)
|
||||
{
|
||||
global $rcmail;
|
||||
|
||||
if (empty($args['host'])) {
|
||||
$hosts = $rcmail->config->get('default_host', '');
|
||||
if (is_string($hosts)) {
|
||||
$args['host'] = $hosts;
|
||||
}
|
||||
else if (is_array($hosts) && count($hosts) == 1) {
|
||||
$args['host'] = reset($hosts);
|
||||
}
|
||||
else {
|
||||
rcube::raise_error("Specify a host name", true);
|
||||
}
|
||||
|
||||
// host can be a URL like tls://192.168.12.44
|
||||
$host_url = parse_url($args['host']);
|
||||
if ($host_url['host']) {
|
||||
$args['host'] = $host_url['host'];
|
||||
}
|
||||
}
|
||||
|
||||
return $args['host'];
|
||||
}
|
||||
|
||||
function get_user_id($username, $host)
|
||||
{
|
||||
global $rcmail;
|
||||
|
||||
$db = $rcmail->get_dbh();
|
||||
|
||||
// find user in local database
|
||||
$user = rcube_user::query($username, $host);
|
||||
|
||||
if (empty($user)) {
|
||||
rcube::raise_error("User does not exist: $username");
|
||||
}
|
||||
|
||||
return $user->ID;
|
||||
}
|
||||
|
||||
function reset_state($user_id, $dry_run = false)
|
||||
{
|
||||
global $rcmail;
|
||||
|
||||
if ($dry_run) {
|
||||
return;
|
||||
}
|
||||
|
||||
$db = $rcmail->get_dbh();
|
||||
|
||||
$db->query("DELETE FROM " . $db->table_name('filestore', true)
|
||||
. " WHERE `user_id` = ? AND `context` = ?",
|
||||
$user_id, 'enigma');
|
||||
}
|
||||
|
||||
function import_dir($user_id, $dir, $dry_run = false)
|
||||
{
|
||||
global $rcmail;
|
||||
|
||||
$db = $rcmail->get_dbh();
|
||||
$table = $db->table_name('filestore', true);
|
||||
$db_files = array('pubring.gpg', 'secring.gpg', 'pubring.kbx');
|
||||
$maxsize = min($db->get_variable('max_allowed_packet', 1048500), 4*1024*1024) - 2000;
|
||||
|
||||
foreach (glob("$dir/private-keys-v1.d/*.key") as $file) {
|
||||
$db_files[] = substr($file, strlen($dir) + 1);
|
||||
}
|
||||
|
||||
foreach ($db_files as $file) {
|
||||
if ($mtime = @filemtime("$dir/$file")) {
|
||||
$data = file_get_contents("$dir/$file");
|
||||
$data = base64_encode($data);
|
||||
$datasize = strlen($data);
|
||||
|
||||
if ($datasize > $maxsize) {
|
||||
rcube::raise_error(array(
|
||||
'code' => 605, 'line' => __LINE__, 'file' => __FILE__,
|
||||
'message' => "Enigma: Failed to save $file. Size exceeds max_allowed_packet."
|
||||
), true, false);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
echo "* $file\n";
|
||||
|
||||
if ($dry_run) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$result = $db->query(
|
||||
"INSERT INTO $table (`user_id`, `context`, `filename`, `mtime`, `data`)"
|
||||
. " VALUES(?, 'enigma', ?, ?, ?)",
|
||||
$user_id, $file, $mtime, $data);
|
||||
|
||||
if ($db->is_error($result)) {
|
||||
rcube::raise_error(array(
|
||||
'code' => 605, 'line' => __LINE__, 'file' => __FILE__,
|
||||
'message' => "Enigma: Failed to save $file into database."
|
||||
), true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+-----------------------------------------------------------------------+
|
||||
| plugins/hide_blockquote/localization/<lang>.inc |
|
||||
| |
|
||||
| Localization file of the Roundcube Webmail Hide-Blockquote plugin |
|
||||
| Copyright (C) 2012-2013, The Roundcube Dev Team |
|
||||
| |
|
||||
| Licensed under the GNU General Public License version 3 or |
|
||||
| any later version with exceptions for skins & plugins. |
|
||||
| See the README file for a full license statement. |
|
||||
| |
|
||||
+-----------------------------------------------------------------------+
|
||||
|
||||
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/
|
||||
*/
|
||||
$labels['hide'] = 'Ocultar';
|
||||
$labels['show'] = 'Mostrar';
|
||||
$labels['quotelimit'] = 'Ocultar cita cuando el número de líneas es mayor de';
|
||||
?>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue