From b985816baa96a905015084d6932cf2b0e23451a5 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Sun, 18 Aug 2013 18:40:57 +0000 Subject: [PATCH] fetchmail: add sslcertck, sslcertpath, sslfingerprint ADDITIONS/fetchmail.pl - add sslcertck, sslcertpath and sslfingerprint to fetchmail config - some whitespace fixes fetchmail.php - add sslcertck, sslcertpath, sslfingerprint fields (sslcertpath and sslfingerprint require $CONF[fetchmail_extra_options] because they don't have input validation) languages/*.lang - add new texts needed for the added fields templates/fetchmail.tpl: - add the new fields - also add extra_options and mda fields - they were not displayed yet upgrade.php - fix _db_add_field() to call _db_field_exists() with correct table name - upgrade_1519(): add sslcertck, sslcertpath, sslfingerprint fields to the fetchmail table Most parts of this commit are based on the work of Lars Engelhard (modified files sent on the mailinglist 2013-07-30) git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1519 a1433add-5e2c-0410-b055-b7f2511e0802 --- ADDITIONS/fetchmail.pl | 13 ++++++++----- fetchmail.php | 6 ++++++ languages/bg.lang | 3 +++ languages/ca.lang | 3 +++ languages/cn.lang | 3 +++ languages/cs.lang | 3 +++ languages/da.lang | 3 +++ languages/de.lang | 3 +++ languages/en.lang | 3 +++ languages/es.lang | 3 +++ languages/et.lang | 3 +++ languages/eu.lang | 3 +++ languages/fi.lang | 3 +++ languages/fo.lang | 3 +++ languages/fr.lang | 3 +++ languages/hr.lang | 3 +++ languages/hu.lang | 3 +++ languages/is.lang | 3 +++ languages/it.lang | 3 +++ languages/ja.lang | 3 +++ languages/lt.lang | 3 +++ languages/mk.lang | 3 +++ languages/nb.lang | 3 +++ languages/nl.lang | 3 +++ languages/nn.lang | 4 ++++ languages/pl.lang | 3 +++ languages/pt-br.lang | 3 +++ languages/ru.lang | 3 +++ languages/sk.lang | 3 +++ languages/sl.lang | 3 +++ languages/sv.lang | 3 +++ languages/tr.lang | 3 +++ languages/tw.lang | 3 +++ templates/fetchmail.tpl | 7 +++++++ upgrade.php | 8 +++++++- 35 files changed, 122 insertions(+), 6 deletions(-) diff --git a/ADDITIONS/fetchmail.pl b/ADDITIONS/fetchmail.pl index bc5554d7..05e89542 100644 --- a/ADDITIONS/fetchmail.pl +++ b/ADDITIONS/fetchmail.pl @@ -87,7 +87,7 @@ if($db_type eq "Pg") { } $sql = " - SELECT id,mailbox,src_server,src_auth,src_user,src_password,src_folder,fetchall,keep,protocol,mda,extra_options,usessl + SELECT id,mailbox,src_server,src_auth,src_user,src_password,src_folder,fetchall,keep,protocol,mda,extra_options,usessl, sslcertck, sslcertpath, sslfingerprint FROM fetchmail WHERE $sql_cond > poll_time*60 "; @@ -97,19 +97,22 @@ map{ my ($id,$mailbox,$src_server,$src_auth,$src_user,$src_password,$src_folder,$fetchall,$keep,$protocol,$mda,$extra_options,$usessl)=@$_; syslog("info","fetch ${src_user}@${src_server} for ${mailbox}"); - + $cmd="user '${src_user}' there with password '".decode_base64($src_password)."'"; $cmd.=" folder '${src_folder}'" if ($src_folder); $cmd.=" mda ".$mda if ($mda); # $cmd.=" mda \"/usr/local/libexec/dovecot/deliver -m ${mailbox}\""; $cmd.=" is '${mailbox}' here"; - + $cmd.=" keep" if ($keep); $cmd.=" fetchall" if ($fetchall); $cmd.=" ssl" if ($usessl); + $cmd.=" sslcertck" if($sslcertck); + $cmd.=" sslcertpath $sslcertpath" if ($sslcertck && $sslcertpath); + $cmd.=" sslfingerprint \"$sslfingerprint\"" if ($sslfingerprint); $cmd.=" ".$extra_options if ($extra_options); - + $text=< array(1, 1, 'bool' ), "protocol" => array(1, 1, 'enum' ), "usessl" => array(1, 1, 'bool' ), + "sslcertck" => array(1, 1, 'bool' ), + "sslcertpath" => array($extra_options, $extra_options, 'text' ), # TODO: input validation + "sslfingerprint" => array($extra_options, $extra_options, 'text' ), # TODO: input validation "extra_options" => array($extra_options, $extra_options, 'longtext' ), "mda" => array($extra_options, $extra_options, 'longtext' ), "date" => array(0, $display_status, 'text' ), @@ -215,6 +218,7 @@ if ($cancel) { # cancel $new or $edit $formvars['fetchall']=('t'==$formvars['fetchall']) ? 1 : 0; $formvars['keep']=('t'==$formvars['keep']) ? 1 : 0; $formvars['usessl']=('t'==$formvars['usessl']) ? 1 : 0; + $formvars['sslcertck']=('t'==$formvars['sslcertck']) ? 1: 0; } } elseif ($new) { # create entry form foreach (array_keys($fm_struct) as $value) { @@ -240,6 +244,7 @@ if ($edit + $new == 0) { # display list $row['fetchall']=('t'==$row['fetchall']) ? 1 : 0; $row['keep']=('t'==$row['keep']) ? 1 : 0; $row['usessl']=('t'==$row['usessl']) ? 1 : 0; + $row['sslcertck']=('t'==$row['sslcertck']) ? 1: 0; } $tFmail[] = $row; } @@ -391,6 +396,7 @@ $smarty->assign ('fetchmail_edit_row', fetchmail_edit_row($formvars),false); $smarty->assign ('headers', $headers); $smarty->assign ('user_domains', $user_domains); $smarty->assign ('tFmail', $tFmail); +$smarty->assign ('extra_options', $extra_options); $smarty->assign ('smarty_template', 'fetchmail'); $smarty->display ('index.tpl'); diff --git a/languages/bg.lang b/languages/bg.lang index 767fd7ee..a84d5cb6 100644 --- a/languages/bg.lang +++ b/languages/bg.lang @@ -309,6 +309,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX $PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX $PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Date'; # XXX diff --git a/languages/ca.lang b/languages/ca.lang index d6ee5d4e..04d5fdfc 100644 --- a/languages/ca.lang +++ b/languages/ca.lang @@ -308,6 +308,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX $PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX $PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Date'; # XXX diff --git a/languages/cn.lang b/languages/cn.lang index 2341b898..0b4f803a 100644 --- a/languages/cn.lang +++ b/languages/cn.lang @@ -308,6 +308,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX $PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX $PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Date'; # XXX diff --git a/languages/cs.lang b/languages/cs.lang index 6b736920..c3c09a5b 100644 --- a/languages/cs.lang +++ b/languages/cs.lang @@ -320,6 +320,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Stahovat vše'; $PALANG['pFetchmail_field_keep'] = 'Nemazat'; $PALANG['pFetchmail_field_protocol'] = 'Protokol'; $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Parametry'; $PALANG['pFetchmail_field_mda'] = 'MDA'; $PALANG['pFetchmail_field_date'] = 'Datum'; diff --git a/languages/da.lang b/languages/da.lang index 19c55990..7732e827 100644 --- a/languages/da.lang +++ b/languages/da.lang @@ -322,6 +322,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Hent alle'; $PALANG['pFetchmail_field_keep'] = 'Behold'; $PALANG['pFetchmail_field_protocol'] = 'Protokol'; $PALANG['pFetchmail_field_usessl'] = 'SSL aktiv'; +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Ekstra tilvalg'; $PALANG['pFetchmail_field_mda'] = 'MDA (Mail Delivery Agent)'; $PALANG['pFetchmail_field_date'] = 'Dato'; diff --git a/languages/de.lang b/languages/de.lang index 2d8ec2f2..695d8fba 100644 --- a/languages/de.lang +++ b/languages/de.lang @@ -320,6 +320,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Alle abholen'; $PALANG['pFetchmail_field_keep'] = 'Behalten'; $PALANG['pFetchmail_field_protocol'] = 'Protokoll'; $PALANG['pFetchmail_field_usessl'] = 'SSL aktiv'; +$PALANG['pFetchmail_field_sslcertck'] = 'SSL Zertifikatsprüfung'; +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL Pfad der Zertifikate'; +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; $PALANG['pFetchmail_field_extra_options'] = 'Zusätzliche Optionen'; $PALANG['pFetchmail_field_mda'] = 'MDA'; $PALANG['pFetchmail_field_date'] = 'Datum'; diff --git a/languages/en.lang b/languages/en.lang index 6613f460..26e9211f 100644 --- a/languages/en.lang +++ b/languages/en.lang @@ -323,6 +323,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; $PALANG['pFetchmail_field_keep'] = 'Keep'; $PALANG['pFetchmail_field_protocol'] = 'Protocol'; $PALANG['pFetchmail_field_usessl'] = 'SSL active'; +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; $PALANG['pFetchmail_field_mda'] = 'MDA'; $PALANG['pFetchmail_field_date'] = 'Date'; diff --git a/languages/es.lang b/languages/es.lang index cc3fd212..dc460dd0 100644 --- a/languages/es.lang +++ b/languages/es.lang @@ -310,6 +310,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Obtener todo'; $PALANG['pFetchmail_field_keep'] = 'Conservar'; $PALANG['pFetchmail_field_protocol'] = 'Protocolo'; $PALANG['pFetchmail_field_usessl'] = 'SSL activado'; +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Opciones extras'; $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Fecha'; diff --git a/languages/et.lang b/languages/et.lang index 7b4699f7..bc40328f 100644 --- a/languages/et.lang +++ b/languages/et.lang @@ -312,6 +312,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX $PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX $PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Date'; # XXX diff --git a/languages/eu.lang b/languages/eu.lang index f72cd841..8bfedb77 100644 --- a/languages/eu.lang +++ b/languages/eu.lang @@ -307,6 +307,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX $PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX $PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Date'; # XXX diff --git a/languages/fi.lang b/languages/fi.lang index d65bfd18..fcd0e2c6 100644 --- a/languages/fi.lang +++ b/languages/fi.lang @@ -308,6 +308,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Hae kaikki'; $PALANG['pFetchmail_field_keep'] = 'Pidä'; $PALANG['pFetchmail_field_protocol'] = 'Protokolla'; $PALANG['pFetchmail_field_usessl'] = 'SSL aktiivinen'; +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Lisämääritteet'; $PALANG['pFetchmail_field_mda'] = 'MDA'; $PALANG['pFetchmail_field_date'] = 'Päivämäärä'; diff --git a/languages/fo.lang b/languages/fo.lang index 27ec55b6..9c0f9334 100644 --- a/languages/fo.lang +++ b/languages/fo.lang @@ -313,6 +313,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX $PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX $PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Date'; # XXX diff --git a/languages/fr.lang b/languages/fr.lang index 3c542b70..c0c645eb 100644 --- a/languages/fr.lang +++ b/languages/fr.lang @@ -310,6 +310,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Tout récupérer'; $PALANG['pFetchmail_field_keep'] = 'Conserver'; $PALANG['pFetchmail_field_protocol'] = 'Protocole'; $PALANG['pFetchmail_field_usessl'] = 'SSL activé'; +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Options supplémentaires'; $PALANG['pFetchmail_field_mda'] = 'MDA'; $PALANG['pFetchmail_field_date'] = 'Date'; diff --git a/languages/hr.lang b/languages/hr.lang index bb655b48..3c626b5e 100644 --- a/languages/hr.lang +++ b/languages/hr.lang @@ -307,6 +307,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX $PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX $PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Date'; # XXX diff --git a/languages/hu.lang b/languages/hu.lang index 1c0c6fc9..88ec8477 100644 --- a/languages/hu.lang +++ b/languages/hu.lang @@ -321,6 +321,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX $PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX $PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Date'; # XXX diff --git a/languages/is.lang b/languages/is.lang index d83c81b7..904bf101 100644 --- a/languages/is.lang +++ b/languages/is.lang @@ -308,6 +308,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX $PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX $PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Date'; # XXX diff --git a/languages/it.lang b/languages/it.lang index eba71adb..7ad1bb7c 100644 --- a/languages/it.lang +++ b/languages/it.lang @@ -309,6 +309,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Ricevi tutto'; $PALANG['pFetchmail_field_keep'] = 'Conserva'; $PALANG['pFetchmail_field_protocol'] = 'Protocollo'; $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra'; $PALANG['pFetchmail_field_mda'] = 'MDA'; $PALANG['pFetchmail_field_date'] = 'Data'; diff --git a/languages/ja.lang b/languages/ja.lang index 6cf65a4c..09f67870 100644 --- a/languages/ja.lang +++ b/languages/ja.lang @@ -319,6 +319,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'すべて取得'; $PALANG['pFetchmail_field_keep'] = '残す'; $PALANG['pFetchmail_field_protocol'] = 'プロトコル'; $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = '追加オプション'; $PALANG['pFetchmail_field_mda'] = 'MDA'; $PALANG['pFetchmail_field_date'] = '日付'; diff --git a/languages/lt.lang b/languages/lt.lang index 35195948..921e25df 100644 --- a/languages/lt.lang +++ b/languages/lt.lang @@ -314,6 +314,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX $PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX $PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Date'; # XXX diff --git a/languages/mk.lang b/languages/mk.lang index 393c5e93..ca16dac4 100644 --- a/languages/mk.lang +++ b/languages/mk.lang @@ -309,6 +309,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX $PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX $PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Date'; # XXX diff --git a/languages/nb.lang b/languages/nb.lang index 6bdad79b..cdf9d1c9 100644 --- a/languages/nb.lang +++ b/languages/nb.lang @@ -309,6 +309,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Hent alt'; $PALANG['pFetchmail_field_keep'] = 'Behold'; $PALANG['pFetchmail_field_protocol'] = 'Protokoll'; $PALANG['pFetchmail_field_usessl'] = 'Bruk SSL'; +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Ekstra alternativer'; $PALANG['pFetchmail_field_mda'] = 'MDA'; $PALANG['pFetchmail_field_date'] = 'Dato'; diff --git a/languages/nl.lang b/languages/nl.lang index bb515150..c5d87a25 100644 --- a/languages/nl.lang +++ b/languages/nl.lang @@ -312,6 +312,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'alle berichten ophalen'; $PALANG['pFetchmail_field_keep'] = 'behouden'; $PALANG['pFetchmail_field_protocol'] = 'protocol'; $PALANG['pFetchmail_field_usessl'] = 'SSL actief'; +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'extra opties'; $PALANG['pFetchmail_field_mda'] = 'MD'; $PALANG['pFetchmail_field_date'] = 'datum'; diff --git a/languages/nn.lang b/languages/nn.lang index d621dee4..d175d2d0 100644 --- a/languages/nn.lang +++ b/languages/nn.lang @@ -231,6 +231,7 @@ $PALANG['pAdminEdit_domain_result_error'] = 'Klarte ikke å oppdatere domenet!'; $PALANG['pAdminCreate_admin_welcome'] = 'Legg til ny domene-administrator'; $PALANG['pAdminCreate_admin_username_text'] = 'E-postadresse'; $PALANG['pAdminCreate_admin_username_text_error1'] = 'Administrator er ikke gyldig adresse!'; +$PALANG['pAdminCreate_admin_username_text_error2'] = 'The admin already exists or is not valid'; # XXX $PALANG['pAdminCreate_admin_button'] = 'Legg til en administrator'; $PALANG['pAdminCreate_admin_result_error'] = 'Klarte ikke å legge til administratoren!'; $PALANG['pAdminCreate_admin_result_success'] = 'Administratoren er lagt til!'; @@ -307,6 +308,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX $PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX $PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Date'; # XXX diff --git a/languages/pl.lang b/languages/pl.lang index 7bca518e..0e1ed91a 100644 --- a/languages/pl.lang +++ b/languages/pl.lang @@ -314,6 +314,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Pobierz wszystkie'; $PALANG['pFetchmail_field_keep'] = 'Pozostaw'; $PALANG['pFetchmail_field_protocol'] = 'Protokół'; $PALANG['pFetchmail_field_usessl'] = 'Aktywne SSL'; +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Dodatkowe opcje'; $PALANG['pFetchmail_field_mda'] = 'MDA'; $PALANG['pFetchmail_field_date'] = 'Data'; diff --git a/languages/pt-br.lang b/languages/pt-br.lang index a9845cf3..fa052221 100644 --- a/languages/pt-br.lang +++ b/languages/pt-br.lang @@ -321,6 +321,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Recuperar todas'; $PALANG['pFetchmail_field_keep'] = 'Manter'; $PALANG['pFetchmail_field_protocol'] = 'Protocolo'; $PALANG['pFetchmail_field_usessl'] = 'SSL habilitado'; +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Opções extra'; $PALANG['pFetchmail_field_mda'] = 'MDA'; $PALANG['pFetchmail_field_date'] = 'Data'; diff --git a/languages/ru.lang b/languages/ru.lang index a11c7768..cc5db6d3 100644 --- a/languages/ru.lang +++ b/languages/ru.lang @@ -321,6 +321,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Скачивать все'; $PALANG['pFetchmail_field_keep'] = 'Не удалять'; $PALANG['pFetchmail_field_protocol'] = 'Протокол'; $PALANG['pFetchmail_field_usessl'] = 'Включить SSL'; +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Дополнительные параметры'; $PALANG['pFetchmail_field_mda'] = 'MDA'; $PALANG['pFetchmail_field_date'] = 'Дата'; diff --git a/languages/sk.lang b/languages/sk.lang index fe0e08bb..5f60e0cf 100644 --- a/languages/sk.lang +++ b/languages/sk.lang @@ -309,6 +309,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Staré'; $PALANG['pFetchmail_field_keep'] = 'Ponechať'; $PALANG['pFetchmail_field_protocol'] = 'Protokol'; $PALANG['pFetchmail_field_usessl'] = 'SSL'; +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Parametre'; $PALANG['pFetchmail_field_mda'] = 'MDA'; $PALANG['pFetchmail_field_date'] = 'Dátum'; diff --git a/languages/sl.lang b/languages/sl.lang index 08f2a712..37aebd06 100644 --- a/languages/sl.lang +++ b/languages/sl.lang @@ -308,6 +308,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX $PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX $PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Date'; # XXX diff --git a/languages/sv.lang b/languages/sv.lang index 45b5ab3c..7996897d 100644 --- a/languages/sv.lang +++ b/languages/sv.lang @@ -310,6 +310,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Hämta samtliga'; $PALANG['pFetchmail_field_keep'] = 'Behåll'; $PALANG['pFetchmail_field_protocol'] = 'Protokoll'; $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra inställningsmöjligheter'; $PALANG['pFetchmail_field_mda'] = 'MDA'; $PALANG['pFetchmail_field_date'] = 'Datum'; diff --git a/languages/tr.lang b/languages/tr.lang index b80d2a23..b1fd7698 100644 --- a/languages/tr.lang +++ b/languages/tr.lang @@ -308,6 +308,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX $PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX $PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Date'; # XXX diff --git a/languages/tw.lang b/languages/tw.lang index daba4097..6925fa1a 100644 --- a/languages/tw.lang +++ b/languages/tw.lang @@ -308,6 +308,9 @@ $PALANG['pFetchmail_field_fetchall'] = 'Fetch All'; # XXX $PALANG['pFetchmail_field_keep'] = 'Keep'; # XXX $PALANG['pFetchmail_field_protocol'] = 'Protocol'; # XXX $PALANG['pFetchmail_field_usessl'] = 'SSL active'; # XXX +$PALANG['pFetchmail_field_sslcertck'] = 'SSL certificate check'; # XXX +$PALANG['pFetchmail_field_sslcertpath'] = 'SSL path to certificates'; # XXX +$PALANG['pFetchmail_field_sslfingerprint'] = 'SSL fingerprint (md5)'; # XXX $PALANG['pFetchmail_field_extra_options'] = 'Extra Options'; # XXX $PALANG['pFetchmail_field_mda'] = 'MDA'; # XXX $PALANG['pFetchmail_field_date'] = 'Date'; # XXX diff --git a/templates/fetchmail.tpl b/templates/fetchmail.tpl index e38d3009..0db31759 100644 --- a/templates/fetchmail.tpl +++ b/templates/fetchmail.tpl @@ -29,6 +29,13 @@ {$row.keep}  {$row.protocol}  {$row.usessl}  + {$row.sslcertck}  +{if $extra_options} + {$row.sslcertpath}  + {$row.sslfingerprint}  + {$row.extra_options}  + {$row.mda}  +{/if} {$row.date}  {$row.returned_text}--x--  {$PALANG.edit} diff --git a/upgrade.php b/upgrade.php index bbeb0ad1..a90e9bb6 100644 --- a/upgrade.php +++ b/upgrade.php @@ -80,7 +80,7 @@ function _db_add_field($table, $field, $fieldtype, $after) { $query .= " AFTER $after "; # PgSQL does not support to specify where to add the column, MySQL does } - if(! _db_field_exists($table, $field)) { + if(! _db_field_exists(table_by_key($table), $field)) { $result = db_query_parsed($query); } else { printdebug ("field already exists: $table.$field"); @@ -1328,6 +1328,12 @@ function upgrade_1345_mysql() { db_query_parsed("ALTER TABLE `$table_vacation` ADD `interval_time` INT NOT NULL DEFAULT '0' AFTER `reply_type` "); } +function upgrade_1519() { + _db_add_field('fetchmail', 'sslcertck', '{BOOLEAN}', 'usessl' ); + _db_add_field('fetchmail', 'sslcertpath', "VARCHAR(255) {UTF-8} DEFAULT ''", 'sslcertck' ); + _db_add_field('fetchmail', 'sslfingerprint', "VARCHAR(255) {LATIN1} DEFAULT ''", 'sslcertpath'); +} + # TODO MySQL: # - various varchar fields do not have a default value