From 12c8ab9e497f72e82f43cb3240632c3ab804b47a Mon Sep 17 00:00:00 2001 From: mguessan Date: Wed, 7 Apr 2010 20:23:48 +0000 Subject: [PATCH] Add a new setting to disable startup notification window (contribution from jsquyres) git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@991 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/DavGateway.java | 451 ++++----- src/java/davmail/Settings.java | 19 +- src/java/davmail/ui/SettingsFrame.java | 1277 ++++++++++++------------ src/java/davmailmessages.properties | 504 +++++----- src/java/davmailmessages_fr.properties | 4 +- src/site/xdoc/gettingstarted.xml | 5 + 6 files changed, 1149 insertions(+), 1111 deletions(-) diff --git a/src/java/davmail/DavGateway.java b/src/java/davmail/DavGateway.java index d04cdbad..6a316718 100644 --- a/src/java/davmail/DavGateway.java +++ b/src/java/davmail/DavGateway.java @@ -1,223 +1,228 @@ -/* - * DavMail POP/IMAP/SMTP/CalDav/LDAP Exchange Gateway - * Copyright (C) 2009 Mickael Guessant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package davmail; - -import davmail.caldav.CaldavServer; -import davmail.exception.DavMailException; -import davmail.exchange.ExchangeSessionFactory; -import davmail.http.DavGatewayHttpClientFacade; -import davmail.http.DavGatewaySSLProtocolSocketFactory; -import davmail.imap.ImapServer; -import davmail.ldap.LdapServer; -import davmail.pop.PopServer; -import davmail.smtp.SmtpServer; -import davmail.ui.tray.DavGatewayTray; -import org.apache.commons.httpclient.HttpClient; -import org.apache.commons.httpclient.HttpStatus; -import org.apache.commons.httpclient.methods.GetMethod; -import org.apache.log4j.Logger; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.util.ArrayList; - -/** - * DavGateway main class - */ -public final class DavGateway { - private static final Logger LOGGER = Logger.getLogger(DavGateway.class); - private static final String HTTP_DAVMAIL_SOURCEFORGE_NET_VERSION_TXT = "http://davmail.sourceforge.net/version.txt"; - - private static boolean stopped; - - private DavGateway() { - } - - private static final ArrayList SERVER_LIST = new ArrayList(); - - /** - * Start the gateway, listen on specified smtp and pop3 ports - * - * @param args command line parameter config file path - */ - public static void main(String[] args) { - - if (args.length >= 1) { - Settings.setConfigFilePath(args[0]); - } - - Settings.load(); - DavGatewayTray.init(); - - start(); - - // server mode: all threads are daemon threads, do not let main stop - if (Settings.getBooleanProperty("davmail.server")) { - Runtime.getRuntime().addShutdownHook(new Thread("Shutdown") { - @Override - public void run() { - DavGatewayTray.debug(new BundleMessage("LOG_GATEWAY_INTERRUPTED")); - DavGateway.stop(); - DavGatewayTray.debug(new BundleMessage("LOG_GATEWAY_STOP")); - stopped = true; - } - }); - - try { - while (!stopped) { - Thread.sleep(1000); - } - } catch (InterruptedException e) { - DavGatewayTray.debug(new BundleMessage("LOG_GATEWAY_INTERRUPTED")); - stop(); - DavGatewayTray.debug(new BundleMessage("LOG_GATEWAY_STOP")); - } - - } - } - - /** - * Start DavMail listeners. - */ - public static void start() { - // register custom SSL Socket factory - DavGatewaySSLProtocolSocketFactory.register(); - - // prepare HTTP connection pool - DavGatewayHttpClientFacade.start(); - - SERVER_LIST.clear(); - - int smtpPort = Settings.getIntProperty("davmail.smtpPort"); - if (smtpPort != 0) { - SERVER_LIST.add(new SmtpServer(smtpPort)); - } - int popPort = Settings.getIntProperty("davmail.popPort"); - if (popPort != 0) { - SERVER_LIST.add(new PopServer(popPort)); - } - int imapPort = Settings.getIntProperty("davmail.imapPort"); - if (imapPort != 0) { - SERVER_LIST.add(new ImapServer(imapPort)); - } - int caldavPort = Settings.getIntProperty("davmail.caldavPort"); - if (caldavPort != 0) { - SERVER_LIST.add(new CaldavServer(caldavPort)); - } - int ldapPort = Settings.getIntProperty("davmail.ldapPort"); - if (ldapPort != 0) { - SERVER_LIST.add(new LdapServer(ldapPort)); - } - - BundleMessage.BundleMessageList messages = new BundleMessage.BundleMessageList(); - BundleMessage.BundleMessageList errorMessages = new BundleMessage.BundleMessageList(); - for (AbstractServer server : SERVER_LIST) { - try { - server.bind(); - server.start(); - messages.add(new BundleMessage("LOG_PROTOCOL_PORT", server.getProtocolName(), server.getPort())); - } catch (DavMailException e) { - errorMessages.add(e.getBundleMessage()); - } catch (IOException e) { - errorMessages.add(new BundleMessage("LOG_SOCKET_BIND_FAILED", server.getProtocolName(), server.getPort())); - } - } - - final String currentVersion = getCurrentVersion(); - DavGatewayTray.info(new BundleMessage("LOG_DAVMAIL_GATEWAY_LISTENING", - currentVersion == null ? "" : currentVersion, messages)); - if (!errorMessages.isEmpty()) { - DavGatewayTray.error(new BundleMessage("LOG_MESSAGE", errorMessages)); - } - - // check for new version in a separate thread - new Thread("CheckRelease") { - @Override - public void run() { - String releasedVersion = getReleasedVersion(); - if (currentVersion != null && releasedVersion != null && currentVersion.compareTo(releasedVersion) < 0) { - DavGatewayTray.info(new BundleMessage("LOG_NEW_VERSION_AVAILABLE", releasedVersion)); - } - - } - }.start(); - - } - - /** - * Stop all listeners, shutdown connection pool and clear session cache. - */ - public static void stop() { - for (AbstractServer server : SERVER_LIST) { - server.close(); - try { - server.join(); - } catch (InterruptedException e) { - DavGatewayTray.warn(new BundleMessage("LOG_EXCEPTION_WAITING_SERVER_THREAD_DIE"), e); - } - } - // close pooled connections - DavGatewayHttpClientFacade.stop(); - // clear session cache - ExchangeSessionFactory.reset(); - } - - /** - * Get current DavMail version. - * @return current version - */ - public static String getCurrentVersion() { - Package davmailPackage = DavGateway.class.getPackage(); - return davmailPackage.getImplementationVersion(); - } - - /** - * Get latest released version from SourceForge. - * @return latest version - */ - public static String getReleasedVersion() { - String version = null; - if (!Settings.getBooleanProperty("davmail.disableUpdateCheck")) { - BufferedReader versionReader = null; - GetMethod getMethod = new GetMethod(HTTP_DAVMAIL_SOURCEFORGE_NET_VERSION_TXT); - try { - HttpClient httpClient = DavGatewayHttpClientFacade.getInstance(HTTP_DAVMAIL_SOURCEFORGE_NET_VERSION_TXT); - int status = httpClient.executeMethod(getMethod); - if (status == HttpStatus.SC_OK) { - versionReader = new BufferedReader(new InputStreamReader(getMethod.getResponseBodyAsStream())); - version = versionReader.readLine(); - LOGGER.debug("DavMail released version: "+version); - } - } catch (IOException e) { - DavGatewayTray.debug(new BundleMessage("LOG_UNABLE_TO_GET_RELEASED_VERSION")); - } finally { - if (versionReader != null) { - try { - versionReader.close(); - } catch (IOException e) { - // ignore - } - } - getMethod.releaseConnection(); - } - } - return version; - } -} +/* + * DavMail POP/IMAP/SMTP/CalDav/LDAP Exchange Gateway + * Copyright (C) 2009 Mickael Guessant + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package davmail; + +import davmail.caldav.CaldavServer; +import davmail.exception.DavMailException; +import davmail.exchange.ExchangeSessionFactory; +import davmail.http.DavGatewayHttpClientFacade; +import davmail.http.DavGatewaySSLProtocolSocketFactory; +import davmail.imap.ImapServer; +import davmail.ldap.LdapServer; +import davmail.pop.PopServer; +import davmail.smtp.SmtpServer; +import davmail.ui.tray.DavGatewayTray; +import org.apache.commons.httpclient.HttpClient; +import org.apache.commons.httpclient.HttpStatus; +import org.apache.commons.httpclient.methods.GetMethod; +import org.apache.log4j.Logger; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.ArrayList; + +/** + * DavGateway main class + */ +public final class DavGateway { + private static final Logger LOGGER = Logger.getLogger(DavGateway.class); + private static final String HTTP_DAVMAIL_SOURCEFORGE_NET_VERSION_TXT = "http://davmail.sourceforge.net/version.txt"; + + private static boolean stopped; + + private DavGateway() { + } + + private static final ArrayList SERVER_LIST = new ArrayList(); + + /** + * Start the gateway, listen on specified smtp and pop3 ports + * + * @param args command line parameter config file path + */ + public static void main(String[] args) { + + if (args.length >= 1) { + Settings.setConfigFilePath(args[0]); + } + + Settings.load(); + DavGatewayTray.init(); + + start(); + + // server mode: all threads are daemon threads, do not let main stop + if (Settings.getBooleanProperty("davmail.server")) { + Runtime.getRuntime().addShutdownHook(new Thread("Shutdown") { + @Override + public void run() { + DavGatewayTray.debug(new BundleMessage("LOG_GATEWAY_INTERRUPTED")); + DavGateway.stop(); + DavGatewayTray.debug(new BundleMessage("LOG_GATEWAY_STOP")); + stopped = true; + } + }); + + try { + while (!stopped) { + Thread.sleep(1000); + } + } catch (InterruptedException e) { + DavGatewayTray.debug(new BundleMessage("LOG_GATEWAY_INTERRUPTED")); + stop(); + DavGatewayTray.debug(new BundleMessage("LOG_GATEWAY_STOP")); + } + + } + } + + /** + * Start DavMail listeners. + */ + public static void start() { + // register custom SSL Socket factory + DavGatewaySSLProtocolSocketFactory.register(); + + // prepare HTTP connection pool + DavGatewayHttpClientFacade.start(); + + SERVER_LIST.clear(); + + int smtpPort = Settings.getIntProperty("davmail.smtpPort"); + if (smtpPort != 0) { + SERVER_LIST.add(new SmtpServer(smtpPort)); + } + int popPort = Settings.getIntProperty("davmail.popPort"); + if (popPort != 0) { + SERVER_LIST.add(new PopServer(popPort)); + } + int imapPort = Settings.getIntProperty("davmail.imapPort"); + if (imapPort != 0) { + SERVER_LIST.add(new ImapServer(imapPort)); + } + int caldavPort = Settings.getIntProperty("davmail.caldavPort"); + if (caldavPort != 0) { + SERVER_LIST.add(new CaldavServer(caldavPort)); + } + int ldapPort = Settings.getIntProperty("davmail.ldapPort"); + if (ldapPort != 0) { + SERVER_LIST.add(new LdapServer(ldapPort)); + } + + BundleMessage.BundleMessageList messages = new BundleMessage.BundleMessageList(); + BundleMessage.BundleMessageList errorMessages = new BundleMessage.BundleMessageList(); + for (AbstractServer server : SERVER_LIST) { + try { + server.bind(); + server.start(); + messages.add(new BundleMessage("LOG_PROTOCOL_PORT", server.getProtocolName(), server.getPort())); + } catch (DavMailException e) { + errorMessages.add(e.getBundleMessage()); + } catch (IOException e) { + errorMessages.add(new BundleMessage("LOG_SOCKET_BIND_FAILED", server.getProtocolName(), server.getPort())); + } + } + + final String currentVersion = getCurrentVersion(); + boolean showStartupBanner = Settings.getBooleanProperty("davmail.showStartupBanner", true); + if (showStartupBanner) { + DavGatewayTray.info(new BundleMessage("LOG_DAVMAIL_GATEWAY_LISTENING", + currentVersion == null ? "" : currentVersion, messages)); + } + if (!errorMessages.isEmpty()) { + DavGatewayTray.error(new BundleMessage("LOG_MESSAGE", errorMessages)); + } + + // check for new version in a separate thread + new Thread("CheckRelease") { + @Override + public void run() { + String releasedVersion = getReleasedVersion(); + if (currentVersion != null && releasedVersion != null && currentVersion.compareTo(releasedVersion) < 0) { + DavGatewayTray.info(new BundleMessage("LOG_NEW_VERSION_AVAILABLE", releasedVersion)); + } + + } + }.start(); + + } + + /** + * Stop all listeners, shutdown connection pool and clear session cache. + */ + public static void stop() { + for (AbstractServer server : SERVER_LIST) { + server.close(); + try { + server.join(); + } catch (InterruptedException e) { + DavGatewayTray.warn(new BundleMessage("LOG_EXCEPTION_WAITING_SERVER_THREAD_DIE"), e); + } + } + // close pooled connections + DavGatewayHttpClientFacade.stop(); + // clear session cache + ExchangeSessionFactory.reset(); + } + + /** + * Get current DavMail version. + * + * @return current version + */ + public static String getCurrentVersion() { + Package davmailPackage = DavGateway.class.getPackage(); + return davmailPackage.getImplementationVersion(); + } + + /** + * Get latest released version from SourceForge. + * + * @return latest version + */ + public static String getReleasedVersion() { + String version = null; + if (!Settings.getBooleanProperty("davmail.disableUpdateCheck")) { + BufferedReader versionReader = null; + GetMethod getMethod = new GetMethod(HTTP_DAVMAIL_SOURCEFORGE_NET_VERSION_TXT); + try { + HttpClient httpClient = DavGatewayHttpClientFacade.getInstance(HTTP_DAVMAIL_SOURCEFORGE_NET_VERSION_TXT); + int status = httpClient.executeMethod(getMethod); + if (status == HttpStatus.SC_OK) { + versionReader = new BufferedReader(new InputStreamReader(getMethod.getResponseBodyAsStream())); + version = versionReader.readLine(); + LOGGER.debug("DavMail released version: " + version); + } + } catch (IOException e) { + DavGatewayTray.debug(new BundleMessage("LOG_UNABLE_TO_GET_RELEASED_VERSION")); + } finally { + if (versionReader != null) { + try { + versionReader.close(); + } catch (IOException e) { + // ignore + } + } + getMethod.releaseConnection(); + } + } + return version; + } +} diff --git a/src/java/davmail/Settings.java b/src/java/davmail/Settings.java index 2bf0cfd3..03e20bd2 100644 --- a/src/java/davmail/Settings.java +++ b/src/java/davmail/Settings.java @@ -148,7 +148,8 @@ public final class Settings { SETTINGS.put("davmail.server", Boolean.FALSE.toString()); SETTINGS.put("davmail.server.certificate.hash", ""); SETTINGS.put("davmail.caldavAlarmSound", ""); - SETTINGS.put("davmail.forceActiveSyncUpdate", "Boolean.FALSE.toString()"); + SETTINGS.put("davmail.forceActiveSyncUpdate", Boolean.FALSE.toString()); + SETTINGS.put("davmail.showStartupBanner", Boolean.TRUE.toString()); SETTINGS.put("davmail.ssl.keystoreType", ""); SETTINGS.put("davmail.ssl.keystoreFile", ""); SETTINGS.put("davmail.ssl.keystorePass", ""); @@ -344,6 +345,22 @@ public final class Settings { return Boolean.parseBoolean(propertyValue); } + /** + * Get a property value as boolean. + * + * @param property property name + * @param defaultValue default property value + * @return property value + */ + public static synchronized boolean getBooleanProperty(String property, boolean defaultValue) { + boolean value = defaultValue; + String propertyValue = SETTINGS.getProperty(property); + if (propertyValue != null && propertyValue.length() > 0) { + value = Boolean.parseBoolean(propertyValue); + } + return value; + } + /** * Build logging properties prefix. * diff --git a/src/java/davmail/ui/SettingsFrame.java b/src/java/davmail/ui/SettingsFrame.java index 5bf8b9cf..e12db9c4 100644 --- a/src/java/davmail/ui/SettingsFrame.java +++ b/src/java/davmail/ui/SettingsFrame.java @@ -1,635 +1,642 @@ -/* - * DavMail POP/IMAP/SMTP/CalDav/LDAP Exchange Gateway - * Copyright (C) 2009 Mickael Guessant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package davmail.ui; - -import davmail.BundleMessage; -import davmail.DavGateway; -import davmail.Settings; -import davmail.ui.tray.DavGatewayTray; -import davmail.ui.browser.DesktopBrowser; -import org.apache.log4j.Level; - -import javax.swing.*; -import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; - -/** - * DavMail settings frame - */ -public class SettingsFrame extends JFrame { - static final Level[] LOG_LEVELS = {Level.OFF, Level.FATAL, Level.ERROR, Level.WARN, Level.INFO, Level.DEBUG, Level.ALL}; - - protected JTextField urlField; - protected JTextField popPortField; - protected JCheckBox popPortCheckBox; - protected JTextField imapPortField; - protected JCheckBox imapPortCheckBox; - protected JTextField smtpPortField; - protected JCheckBox smtpPortCheckBox; - protected JTextField caldavPortField; - protected JCheckBox caldavPortCheckBox; - protected JTextField ldapPortField; - protected JCheckBox ldapPortCheckBox; - protected JTextField keepDelayField; - protected JTextField sentKeepDelayField; - protected JTextField caldavPastDelayField; - - JCheckBox useSystemProxiesField; - JCheckBox enableProxyField; - JTextField httpProxyField; - JTextField httpProxyPortField; - JTextField httpProxyUserField; - JTextField httpProxyPasswordField; - - JCheckBox allowRemoteField; - JTextField bindAddressField; - JTextField certHashField; - JCheckBox disableUpdateCheck; - - JComboBox keystoreTypeCombo; - JTextField keystoreFileField; - JPasswordField keystorePassField; - JPasswordField keyPassField; - - JComboBox clientKeystoreTypeCombo; - JTextField clientKeystoreFileField; - JPasswordField clientKeystorePassField; - JTextField pkcs11LibraryField; - JTextArea pkcs11ConfigField; - - JComboBox rootLoggingLevelField; - JComboBox davmailLoggingLevelField; - JComboBox httpclientLoggingLevelField; - JComboBox wireLoggingLevelField; - JTextField logFilePathField; - - JTextField caldavAlarmSoundField; - JCheckBox forceActiveSyncUpdateField; - JTextField defaultDomainField; - - protected void addSettingComponent(JPanel panel, String label, JComponent component) { - addSettingComponent(panel, label, component, null); - } - - protected void addSettingComponent(JPanel panel, String label, JComponent component, String toolTipText) { - JLabel fieldLabel = new JLabel(label); - fieldLabel.setHorizontalAlignment(SwingConstants.RIGHT); - fieldLabel.setVerticalAlignment(SwingConstants.CENTER); - panel.add(fieldLabel); - component.setMaximumSize(component.getPreferredSize()); - JPanel innerPanel = new JPanel(); - innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.X_AXIS)); - innerPanel.add(component); - panel.add(innerPanel); - if (toolTipText != null) { - fieldLabel.setToolTipText(toolTipText); - component.setToolTipText(toolTipText); - } - } - - protected void addPortSettingComponent(JPanel panel, String label, JComponent component, JComponent checkboxComponent, String toolTipText) { - JLabel fieldLabel = new JLabel(label); - fieldLabel.setHorizontalAlignment(SwingConstants.RIGHT); - fieldLabel.setVerticalAlignment(SwingConstants.CENTER); - panel.add(fieldLabel); - component.setMaximumSize(component.getPreferredSize()); - JPanel innerPanel = new JPanel(); - innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.X_AXIS)); - innerPanel.add(checkboxComponent); - innerPanel.add(component); - panel.add(innerPanel); - if (toolTipText != null) { - fieldLabel.setToolTipText(toolTipText); - component.setToolTipText(toolTipText); - } - } - - protected JPanel getSettingsPanel() { - JPanel settingsPanel = new JPanel(new GridLayout(6, 2)); - settingsPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_GATEWAY"))); - - urlField = new JTextField(Settings.getProperty("davmail.url"), 17); - popPortField = new JTextField(Settings.getProperty("davmail.popPort"), 4); - popPortCheckBox = new JCheckBox(); - popPortCheckBox.setSelected(Settings.getProperty("davmail.popPort") != null && Settings.getProperty("davmail.popPort").length() > 0); - popPortField.setEnabled(popPortCheckBox.isSelected()); - popPortCheckBox.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { - popPortField.setEnabled(popPortCheckBox.isSelected()); - } - }); - - imapPortField = new JTextField(Settings.getProperty("davmail.imapPort"), 4); - imapPortCheckBox = new JCheckBox(); - imapPortCheckBox.setSelected(Settings.getProperty("davmail.imapPort") != null && Settings.getProperty("davmail.imapPort").length() > 0); - imapPortField.setEnabled(imapPortCheckBox.isSelected()); - imapPortCheckBox.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { - imapPortField.setEnabled(imapPortCheckBox.isSelected()); - } - }); - - smtpPortField = new JTextField(Settings.getProperty("davmail.smtpPort"), 4); - smtpPortCheckBox = new JCheckBox(); - smtpPortCheckBox.setSelected(Settings.getProperty("davmail.smtpPort") != null && Settings.getProperty("davmail.smtpPort").length() > 0); - smtpPortField.setEnabled(smtpPortCheckBox.isSelected()); - smtpPortCheckBox.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { - smtpPortField.setEnabled(smtpPortCheckBox.isSelected()); - } - }); - - caldavPortField = new JTextField(Settings.getProperty("davmail.caldavPort"), 4); - caldavPortCheckBox = new JCheckBox(); - caldavPortCheckBox.setSelected(Settings.getProperty("davmail.caldavPort") != null && Settings.getProperty("davmail.caldavPort").length() > 0); - caldavPortField.setEnabled(caldavPortCheckBox.isSelected()); - caldavPortCheckBox.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { - caldavPortField.setEnabled(caldavPortCheckBox.isSelected()); - } - }); - - ldapPortField = new JTextField(Settings.getProperty("davmail.ldapPort"), 4); - ldapPortCheckBox = new JCheckBox(); - ldapPortCheckBox.setSelected(Settings.getProperty("davmail.ldapPort") != null && Settings.getProperty("davmail.ldapPort").length() > 0); - ldapPortField.setEnabled(ldapPortCheckBox.isSelected()); - ldapPortCheckBox.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { - ldapPortField.setEnabled(ldapPortCheckBox.isSelected()); - } - }); - - addSettingComponent(settingsPanel, BundleMessage.format("UI_OWA_URL"), urlField, BundleMessage.format("UI_OWA_URL_HELP")); - addPortSettingComponent(settingsPanel, BundleMessage.format("UI_POP_PORT"), popPortField, popPortCheckBox, - BundleMessage.format("UI_POP_PORT_HELP")); - addPortSettingComponent(settingsPanel, BundleMessage.format("UI_IMAP_PORT"), imapPortField, imapPortCheckBox, - BundleMessage.format("UI_IMAP_PORT_HELP")); - addPortSettingComponent(settingsPanel, BundleMessage.format("UI_SMTP_PORT"), smtpPortField, smtpPortCheckBox, - BundleMessage.format("UI_SMTP_PORT_HELP")); - addPortSettingComponent(settingsPanel, BundleMessage.format("UI_CALDAV_PORT"), caldavPortField, caldavPortCheckBox, - BundleMessage.format("UI_CALDAV_PORT_HELP")); - addPortSettingComponent(settingsPanel, BundleMessage.format("UI_LDAP_PORT"), ldapPortField, ldapPortCheckBox, - BundleMessage.format("UI_LDAP_PORT_HELP")); - return settingsPanel; - } - - protected JPanel getDelaysPanel() { - JPanel delaysPanel = new JPanel(new GridLayout(3, 2)); - delaysPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_DELAYS"))); - - keepDelayField = new JTextField(Settings.getProperty("davmail.keepDelay"), 4); - sentKeepDelayField = new JTextField(Settings.getProperty("davmail.sentKeepDelay"), 4); - caldavPastDelayField = new JTextField(Settings.getProperty("davmail.caldavPastDelay"), 4); - - addSettingComponent(delaysPanel, BundleMessage.format("UI_KEEP_DELAY"), keepDelayField, - BundleMessage.format("UI_KEEP_DELAY_HELP")); - addSettingComponent(delaysPanel, BundleMessage.format("UI_SENT_KEEP_DELAY"), sentKeepDelayField, - BundleMessage.format("UI_SENT_KEEP_DELAY_HELP")); - addSettingComponent(delaysPanel, BundleMessage.format("UI_CALENDAR_PAST_EVENTS"), caldavPastDelayField, - BundleMessage.format("UI_CALENDAR_PAST_EVENTS_HELP")); - return delaysPanel; - } - - protected JPanel getProxyPanel() { - JPanel proxyPanel = new JPanel(new GridLayout(6, 2)); - proxyPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_PROXY"))); - - boolean useSystemProxies = Settings.getBooleanProperty("davmail.useSystemProxies"); - boolean enableProxy = Settings.getBooleanProperty("davmail.enableProxy"); - useSystemProxiesField = new JCheckBox(); - useSystemProxiesField.setSelected(useSystemProxies); - enableProxyField = new JCheckBox(); - enableProxyField.setSelected(enableProxy); - httpProxyField = new JTextField(Settings.getProperty("davmail.proxyHost"), 15); - httpProxyPortField = new JTextField(Settings.getProperty("davmail.proxyPort"), 4); - httpProxyUserField = new JTextField(Settings.getProperty("davmail.proxyUser"), 10); - httpProxyPasswordField = new JPasswordField(Settings.getProperty("davmail.proxyPassword"), 10); - - enableProxyField.setEnabled(!useSystemProxies); - httpProxyField.setEnabled(enableProxy); - httpProxyPortField.setEnabled(enableProxy); - httpProxyUserField.setEnabled(enableProxy || useSystemProxies); - httpProxyPasswordField.setEnabled(enableProxy || useSystemProxies); - - useSystemProxiesField.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { - boolean newUseSystemProxies = useSystemProxiesField.isSelected(); - boolean newEnableProxy = enableProxyField.isSelected(); - enableProxyField.setEnabled(!newUseSystemProxies); - httpProxyField.setEnabled(!newUseSystemProxies && newEnableProxy); - httpProxyPortField.setEnabled(!newUseSystemProxies && newEnableProxy); - httpProxyUserField.setEnabled(newUseSystemProxies || newEnableProxy); - httpProxyPasswordField.setEnabled(newUseSystemProxies || newEnableProxy); - } - }); - enableProxyField.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { - boolean newEnableProxy = enableProxyField.isSelected(); - httpProxyField.setEnabled(newEnableProxy); - httpProxyPortField.setEnabled(newEnableProxy); - httpProxyUserField.setEnabled(newEnableProxy); - httpProxyPasswordField.setEnabled(newEnableProxy); - } - }); - - addSettingComponent(proxyPanel, BundleMessage.format("UI_USE_SYSTEM_PROXIES"), useSystemProxiesField); - addSettingComponent(proxyPanel, BundleMessage.format("UI_ENABLE_PROXY"), enableProxyField); - addSettingComponent(proxyPanel, BundleMessage.format("UI_PROXY_SERVER"), httpProxyField); - addSettingComponent(proxyPanel, BundleMessage.format("UI_PROXY_PORT"), httpProxyPortField); - addSettingComponent(proxyPanel, BundleMessage.format("UI_PROXY_USER"), httpProxyUserField); - addSettingComponent(proxyPanel, BundleMessage.format("UI_PROXY_PASSWORD"), httpProxyPasswordField); - updateMaximumSize(proxyPanel); - return proxyPanel; - } - - protected JPanel getKeystorePanel() { - JPanel keyStorePanel = new JPanel(new GridLayout(4, 2)); - keyStorePanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_SERVER_CERTIFICATE"))); - - keystoreTypeCombo = new JComboBox(new String[]{"JKS", "PKCS12"}); - keystoreTypeCombo.setSelectedItem(Settings.getProperty("davmail.ssl.keystoreType")); - keystoreFileField = new JTextField(Settings.getProperty("davmail.ssl.keystoreFile"), 17); - keystorePassField = new JPasswordField(Settings.getProperty("davmail.ssl.keystorePass"), 15); - keyPassField = new JPasswordField(Settings.getProperty("davmail.ssl.keyPass"), 15); - - addSettingComponent(keyStorePanel, BundleMessage.format("UI_KEY_STORE_TYPE"), keystoreTypeCombo, - BundleMessage.format("UI_KEY_STORE_TYPE_HELP")); - addSettingComponent(keyStorePanel, BundleMessage.format("UI_KEY_STORE"), keystoreFileField, - BundleMessage.format("UI_KEY_STORE_HELP")); - addSettingComponent(keyStorePanel, BundleMessage.format("UI_KEY_STORE_PASSWORD"), keystorePassField, - BundleMessage.format("UI_KEY_STORE_PASSWORD_HELP")); - addSettingComponent(keyStorePanel, BundleMessage.format("UI_KEY_PASSWORD"), keyPassField, - BundleMessage.format("UI_KEY_PASSWORD_HELP")); - updateMaximumSize(keyStorePanel); - return keyStorePanel; - } - - protected JPanel getSmartCardPanel() { - JPanel clientKeystorePanel = new JPanel(new GridLayout(2, 1)); - clientKeystorePanel.setLayout(new BoxLayout(clientKeystorePanel, BoxLayout.Y_AXIS)); - clientKeystorePanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_CLIENT_CERTIFICATE"))); - - clientKeystoreTypeCombo = new JComboBox(new String[]{"PKCS11", "JKS", "PKCS12"}); - clientKeystoreTypeCombo.setSelectedItem(Settings.getProperty("davmail.ssl.clientKeystoreType")); - clientKeystoreFileField = new JTextField(Settings.getProperty("davmail.ssl.clientKeystoreFile"), 17); - clientKeystorePassField = new JPasswordField(Settings.getProperty("davmail.ssl.clientKeystorePass"), 15); - - pkcs11LibraryField = new JTextField(Settings.getProperty("davmail.ssl.pkcs11Library"), 17); - pkcs11ConfigField = new JTextArea(2, 17); - pkcs11ConfigField.setText(Settings.getProperty("davmail.ssl.pkcs11Config")); - pkcs11ConfigField.setBorder(pkcs11LibraryField.getBorder()); - pkcs11ConfigField.setFont(pkcs11LibraryField.getFont()); - - JPanel clientKeystoreTypePanel = new JPanel(new GridLayout(1, 2)); - addSettingComponent(clientKeystoreTypePanel, BundleMessage.format("UI_CLIENT_KEY_STORE_TYPE"), clientKeystoreTypeCombo, - BundleMessage.format("UI_CLIENT_KEY_STORE_TYPE_HELP")); - clientKeystorePanel.add(clientKeystoreTypePanel); - - final JPanel cardPanel = new JPanel(new CardLayout()); - clientKeystorePanel.add(cardPanel); - - JPanel clientKeystoreFilePanel = new JPanel(new GridLayout(2, 2)); - addSettingComponent(clientKeystoreFilePanel, BundleMessage.format("UI_CLIENT_KEY_STORE"), clientKeystoreFileField, - BundleMessage.format("UI_CLIENT_KEY_STORE_HELP")); - addSettingComponent(clientKeystoreFilePanel, BundleMessage.format("UI_CLIENT_KEY_STORE_PASSWORD"), clientKeystorePassField, - BundleMessage.format("UI_CLIENT_KEY_STORE_PASSWORD_HELP")); - cardPanel.add(clientKeystoreFilePanel, "FILE"); - - JPanel pkcs11Panel = new JPanel(new GridLayout(2, 2)); - addSettingComponent(pkcs11Panel, BundleMessage.format("UI_PKCS11_LIBRARY"), pkcs11LibraryField, - BundleMessage.format("UI_PKCS11_LIBRARY_HELP")); - addSettingComponent(pkcs11Panel, BundleMessage.format("UI_PKCS11_CONFIG"), pkcs11ConfigField, - BundleMessage.format("UI_PKCS11_CONFIG_HELP")); - cardPanel.add(pkcs11Panel, "PKCS11"); - - ((CardLayout) cardPanel.getLayout()).show(cardPanel, (String) clientKeystoreTypeCombo.getSelectedItem()); - - clientKeystoreTypeCombo.addItemListener(new ItemListener() { - public void itemStateChanged(ItemEvent event) { - CardLayout cardLayout = (CardLayout) (cardPanel.getLayout()); - if ("PKCS11".equals(event.getItem())) { - cardLayout.show(cardPanel, "PKCS11"); - } else { - cardLayout.show(cardPanel, "FILE"); - } - } - }); - updateMaximumSize(clientKeystorePanel); - return clientKeystorePanel; - } - - protected JPanel getNetworkSettingsPanel() { - JPanel networkSettingsPanel = new JPanel(new GridLayout(4, 2)); - networkSettingsPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_NETWORK"))); - - allowRemoteField = new JCheckBox(); - allowRemoteField.setSelected(Settings.getBooleanProperty("davmail.allowRemote")); - - bindAddressField = new JTextField(Settings.getProperty("davmail.bindAddress"), 15); - - certHashField = new JTextField(Settings.getProperty("davmail.server.certificate.hash"), 15); - - disableUpdateCheck = new JCheckBox(); - disableUpdateCheck.setSelected(Settings.getBooleanProperty("davmail.disableUpdateCheck")); - - addSettingComponent(networkSettingsPanel, BundleMessage.format("UI_BIND_ADDRESS"), bindAddressField, - BundleMessage.format("UI_BIND_ADDRESS_HELP")); - addSettingComponent(networkSettingsPanel, BundleMessage.format("UI_ALLOW_REMOTE_CONNECTION"), allowRemoteField, - BundleMessage.format("UI_ALLOW_REMOTE_CONNECTION_HELP")); - addSettingComponent(networkSettingsPanel, BundleMessage.format("UI_SERVER_CERTIFICATE_HASH"), certHashField, - BundleMessage.format("UI_SERVER_CERTIFICATE_HASH_HELP")); - addSettingComponent(networkSettingsPanel, BundleMessage.format("UI_DISABLE_UPDATE_CHECK"), disableUpdateCheck, - BundleMessage.format("UI_DISABLE_UPDATE_CHECK_HELP")); - updateMaximumSize(networkSettingsPanel); - return networkSettingsPanel; - } - - protected JPanel getOtherSettingsPanel() { - JPanel otherSettingsPanel = new JPanel(new GridLayout(3, 2)); - otherSettingsPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_OTHER"))); - - caldavAlarmSoundField = new JTextField(Settings.getProperty("davmail.caldavAlarmSound"), 15); - forceActiveSyncUpdateField = new JCheckBox(); - forceActiveSyncUpdateField.setSelected(Settings.getBooleanProperty("davmail.forceActiveSyncUpdate")); - defaultDomainField = new JTextField(Settings.getProperty("davmail.defaultDomain"), 15); - - addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_CALDAV_ALARM_SOUND"), caldavAlarmSoundField, - BundleMessage.format("UI_CALDAV_ALARM_SOUND_HELP")); - addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_FORCE_ACTIVESYNC_UPDATE"), forceActiveSyncUpdateField, - BundleMessage.format("UI_FORCE_ACTIVESYNC_UPDATE_HELP")); - addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_DEFAULT_DOMAIN"), defaultDomainField, - BundleMessage.format("UI_DEFAULT_DOMAIN_HELP")); - - Dimension preferredSize = otherSettingsPanel.getPreferredSize(); - preferredSize.width = Integer.MAX_VALUE; - updateMaximumSize(otherSettingsPanel); - return otherSettingsPanel; - } - - protected JPanel getLoggingSettingsPanel() { - JPanel loggingLevelPanel = new JPanel(); - JPanel leftLoggingPanel = new JPanel(new GridLayout(2, 2)); - JPanel rightLoggingPanel = new JPanel(new GridLayout(2, 2)); - loggingLevelPanel.add(leftLoggingPanel); - loggingLevelPanel.add(rightLoggingPanel); - - rootLoggingLevelField = new JComboBox(LOG_LEVELS); - davmailLoggingLevelField = new JComboBox(LOG_LEVELS); - httpclientLoggingLevelField = new JComboBox(LOG_LEVELS); - wireLoggingLevelField = new JComboBox(LOG_LEVELS); - logFilePathField = new JTextField(Settings.getProperty("davmail.logFilePath"), 15); - - rootLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("rootLogger")); - davmailLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("davmail")); - httpclientLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("org.apache.commons.httpclient")); - wireLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("httpclient.wire")); - - addSettingComponent(leftLoggingPanel, BundleMessage.format("UI_LOG_DEFAULT"), rootLoggingLevelField); - addSettingComponent(leftLoggingPanel, BundleMessage.format("UI_LOG_DAVMAIL"), davmailLoggingLevelField); - addSettingComponent(rightLoggingPanel, BundleMessage.format("UI_LOG_HTTPCLIENT"), httpclientLoggingLevelField); - addSettingComponent(rightLoggingPanel, BundleMessage.format("UI_LOG_WIRE"), wireLoggingLevelField); - - JPanel logFilePathPanel = new JPanel(); - addSettingComponent(logFilePathPanel, BundleMessage.format("UI_LOG_FILE_PATH"), logFilePathField); - - JPanel loggingPanel = new JPanel(); - loggingPanel.setLayout(new BoxLayout(loggingPanel, BoxLayout.Y_AXIS)); - loggingPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_LOGGING_LEVELS"))); - loggingPanel.add(logFilePathPanel); - loggingPanel.add(loggingLevelPanel); - - updateMaximumSize(loggingPanel); - return loggingPanel; - } - - protected void updateMaximumSize(JPanel panel) { - Dimension preferredSize = panel.getPreferredSize(); - preferredSize.width = Integer.MAX_VALUE; - panel.setMaximumSize(preferredSize); - } - - /** - * Reload settings from properties. - */ - public void reload() { - // reload settings in form - urlField.setText(Settings.getProperty("davmail.url")); - popPortField.setText(Settings.getProperty("davmail.popPort")); - popPortCheckBox.setSelected(Settings.getProperty("davmail.popPort") != null && Settings.getProperty("davmail.popPort").length() > 0); - imapPortField.setText(Settings.getProperty("davmail.imapPort")); - imapPortCheckBox.setSelected(Settings.getProperty("davmail.imapPort") != null && Settings.getProperty("davmail.imapPort").length() > 0); - smtpPortField.setText(Settings.getProperty("davmail.smtpPort")); - smtpPortCheckBox.setSelected(Settings.getProperty("davmail.smtpPort") != null && Settings.getProperty("davmail.smtpPort").length() > 0); - caldavPortField.setText(Settings.getProperty("davmail.caldavPort")); - caldavPortCheckBox.setSelected(Settings.getProperty("davmail.caldavPort") != null && Settings.getProperty("davmail.caldavPort").length() > 0); - ldapPortField.setText(Settings.getProperty("davmail.ldapPort")); - ldapPortCheckBox.setSelected(Settings.getProperty("davmail.ldapPort") != null && Settings.getProperty("davmail.ldapPort").length() > 0); - keepDelayField.setText(Settings.getProperty("davmail.keepDelay")); - sentKeepDelayField.setText(Settings.getProperty("davmail.sentKeepDelay")); - caldavPastDelayField.setText(Settings.getProperty("davmail.caldavPastDelay")); - boolean useSystemProxies = Settings.getBooleanProperty("davmail.useSystemProxies"); - useSystemProxiesField.setSelected(useSystemProxies); - boolean enableProxy = Settings.getBooleanProperty("davmail.enableProxy"); - enableProxyField.setSelected(enableProxy); - enableProxyField.setEnabled(!useSystemProxies); - httpProxyField.setEnabled(!useSystemProxies && enableProxy); - httpProxyPortField.setEnabled(!useSystemProxies && enableProxy); - httpProxyUserField.setEnabled(useSystemProxies ||enableProxy); - httpProxyPasswordField.setEnabled(useSystemProxies || enableProxy); - httpProxyField.setText(Settings.getProperty("davmail.proxyHost")); - httpProxyPortField.setText(Settings.getProperty("davmail.proxyPort")); - httpProxyUserField.setText(Settings.getProperty("davmail.proxyUser")); - httpProxyPasswordField.setText(Settings.getProperty("davmail.proxyPassword")); - - bindAddressField.setText(Settings.getProperty("davmail.bindAddress")); - allowRemoteField.setSelected(Settings.getBooleanProperty(("davmail.allowRemote"))); - certHashField.setText(Settings.getProperty("davmail.server.certificate.hash")); - disableUpdateCheck.setSelected(Settings.getBooleanProperty(("davmail.disableUpdateCheck"))); - - caldavAlarmSoundField.setText(Settings.getProperty("davmail.caldavAlarmSound")); - forceActiveSyncUpdateField.setSelected(Settings.getBooleanProperty("davmail.forceActiveSyncUpdate")); - defaultDomainField.setText(Settings.getProperty("davmail.defaultDomain")); - - keystoreTypeCombo.setSelectedItem(Settings.getProperty("davmail.ssl.keystoreType")); - keystoreFileField.setText(Settings.getProperty("davmail.ssl.keystoreFile")); - keystorePassField.setText(Settings.getProperty("davmail.ssl.keystorePass")); - keyPassField.setText(Settings.getProperty("davmail.ssl.keyPass")); - - clientKeystoreTypeCombo.setSelectedItem(Settings.getProperty("davmail.ssl.clientKeystoreType")); - pkcs11LibraryField.setText(Settings.getProperty("davmail.ssl.pkcs11Library")); - pkcs11ConfigField.setText(Settings.getProperty("davmail.ssl.pkcs11Config")); - - rootLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("rootLogger")); - davmailLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("davmail")); - httpclientLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("org.apache.commons.httpclient")); - wireLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("httpclient.wire")); - logFilePathField.setText(Settings.getProperty("davmail.logFilePath")); - } - - /** - * DavMail settings frame. - */ - public SettingsFrame() { - setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); - setTitle(BundleMessage.format("UI_DAVMAIL_SETTINGS")); - setIconImage(DavGatewayTray.getFrameIcon()); - - JTabbedPane tabbedPane = new JTabbedPane(); - // add help (F1 handler) - tabbedPane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("F1"), - "help"); - tabbedPane.getActionMap().put("help", new AbstractAction() { - public void actionPerformed(ActionEvent e) { - DesktopBrowser.browse("http://davmail.sourceforge.net"); - } - }); - - JPanel mainPanel = new JPanel(); - mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS)); - mainPanel.add(getSettingsPanel()); - mainPanel.add(getDelaysPanel()); - mainPanel.add(Box.createVerticalGlue()); - - tabbedPane.add(BundleMessage.format("UI_TAB_MAIN"), mainPanel); - - JPanel proxyPanel = new JPanel(); - proxyPanel.setLayout(new BoxLayout(proxyPanel, BoxLayout.Y_AXIS)); - proxyPanel.add(getProxyPanel()); - // empty panel - proxyPanel.add(new JPanel()); - tabbedPane.add(BundleMessage.format("UI_TAB_PROXY"), proxyPanel); - - JPanel encryptionPanel = new JPanel(); - encryptionPanel.setLayout(new BoxLayout(encryptionPanel, BoxLayout.Y_AXIS)); - encryptionPanel.add(getKeystorePanel()); - encryptionPanel.add(getSmartCardPanel()); - // empty panel - encryptionPanel.add(new JPanel()); - tabbedPane.add(BundleMessage.format("UI_TAB_ENCRYPTION"), encryptionPanel); - - JPanel loggingPanel = new JPanel(); - loggingPanel.setLayout(new BoxLayout(loggingPanel, BoxLayout.Y_AXIS)); - loggingPanel.add(getLoggingSettingsPanel()); - // empty panel - loggingPanel.add(new JPanel()); - - tabbedPane.add(BundleMessage.format("UI_TAB_LOGGING"), loggingPanel); - - JPanel advancedPanel = new JPanel(); - advancedPanel.setLayout(new BoxLayout(advancedPanel, BoxLayout.Y_AXIS)); - - advancedPanel.add(getNetworkSettingsPanel()); - advancedPanel.add(getOtherSettingsPanel()); - // empty panel - advancedPanel.add(new JPanel()); - - tabbedPane.add(BundleMessage.format("UI_TAB_ADVANCED"), advancedPanel); - - add(BorderLayout.CENTER, tabbedPane); - - JPanel buttonPanel = new JPanel(); - JButton cancel = new JButton(BundleMessage.format("UI_BUTTON_CANCEL")); - JButton ok = new JButton(BundleMessage.format("UI_BUTTON_SAVE")); - JButton help = new JButton(BundleMessage.format("UI_BUTTON_HELP")); - ActionListener save = new ActionListener() { - public void actionPerformed(ActionEvent evt) { - // save options - Settings.setProperty("davmail.url", urlField.getText()); - Settings.setProperty("davmail.popPort", popPortCheckBox.isSelected() ? popPortField.getText() : ""); - Settings.setProperty("davmail.imapPort", imapPortCheckBox.isSelected() ? imapPortField.getText() : ""); - Settings.setProperty("davmail.smtpPort", smtpPortCheckBox.isSelected() ? smtpPortField.getText() : ""); - Settings.setProperty("davmail.caldavPort", caldavPortCheckBox.isSelected() ? caldavPortField.getText() : ""); - Settings.setProperty("davmail.ldapPort", ldapPortCheckBox.isSelected() ? ldapPortField.getText() : ""); - Settings.setProperty("davmail.keepDelay", keepDelayField.getText()); - Settings.setProperty("davmail.sentKeepDelay", sentKeepDelayField.getText()); - Settings.setProperty("davmail.caldavPastDelay", caldavPastDelayField.getText()); - Settings.setProperty("davmail.useSystemProxies", String.valueOf(useSystemProxiesField.isSelected())); - Settings.setProperty("davmail.enableProxy", String.valueOf(enableProxyField.isSelected())); - Settings.setProperty("davmail.proxyHost", httpProxyField.getText()); - Settings.setProperty("davmail.proxyPort", httpProxyPortField.getText()); - Settings.setProperty("davmail.proxyUser", httpProxyUserField.getText()); - Settings.setProperty("davmail.proxyPassword", httpProxyPasswordField.getText()); - - Settings.setProperty("davmail.bindAddress", bindAddressField.getText()); - Settings.setProperty("davmail.allowRemote", String.valueOf(allowRemoteField.isSelected())); - Settings.setProperty("davmail.server.certificate.hash", certHashField.getText()); - Settings.setProperty("davmail.disableUpdateCheck", String.valueOf(disableUpdateCheck.isSelected())); - - Settings.setProperty("davmail.caldavAlarmSound", String.valueOf(caldavAlarmSoundField.getText())); - Settings.setProperty("davmail.forceActiveSyncUpdate", String.valueOf(forceActiveSyncUpdateField.isSelected())); - Settings.setProperty("davmail.defaultDomain", String.valueOf(defaultDomainField.getText())); - - Settings.setProperty("davmail.ssl.keystoreType", (String) keystoreTypeCombo.getSelectedItem()); - Settings.setProperty("davmail.ssl.keystoreFile", keystoreFileField.getText()); - Settings.setProperty("davmail.ssl.keystorePass", String.valueOf(keystorePassField.getPassword())); - Settings.setProperty("davmail.ssl.keyPass", String.valueOf(keyPassField.getPassword())); - - Settings.setProperty("davmail.ssl.clientKeystoreType", (String) clientKeystoreTypeCombo.getSelectedItem()); - Settings.setProperty("davmail.ssl.clientKeystoreFile", clientKeystoreFileField.getText()); - Settings.setProperty("davmail.ssl.clientKeystorePass", String.valueOf(clientKeystorePassField.getPassword())); - Settings.setProperty("davmail.ssl.pkcs11Library", pkcs11LibraryField.getText()); - Settings.setProperty("davmail.ssl.pkcs11Config", pkcs11ConfigField.getText()); - - Settings.setLoggingLevel("rootLogger", (Level) rootLoggingLevelField.getSelectedItem()); - Settings.setLoggingLevel("davmail", (Level) davmailLoggingLevelField.getSelectedItem()); - Settings.setLoggingLevel("org.apache.commons.httpclient", (Level) httpclientLoggingLevelField.getSelectedItem()); - Settings.setLoggingLevel("httpclient.wire", (Level) wireLoggingLevelField.getSelectedItem()); - Settings.setProperty("davmail.logFilePath", logFilePathField.getText()); - - dispose(); - Settings.save(); - // restart listeners with new config - DavGateway.stop(); - DavGateway.start(); - } - }; - ok.addActionListener(save); - - cancel.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { - reload(); - dispose(); - } - }); - - help.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - DesktopBrowser.browse("http://davmail.sourceforge.net"); - } - }); - - buttonPanel.add(ok); - buttonPanel.add(cancel); - buttonPanel.add(help); - - add(BorderLayout.SOUTH, buttonPanel); - - pack(); - //setResizable(false); - // center frame - setLocation(getToolkit().getScreenSize().width / 2 - - getSize().width / 2, - getToolkit().getScreenSize().height / 2 - - getSize().height / 2); - urlField.requestFocus(); - } -} +/* + * DavMail POP/IMAP/SMTP/CalDav/LDAP Exchange Gateway + * Copyright (C) 2009 Mickael Guessant + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package davmail.ui; + +import davmail.BundleMessage; +import davmail.DavGateway; +import davmail.Settings; +import davmail.ui.tray.DavGatewayTray; +import davmail.ui.browser.DesktopBrowser; +import org.apache.log4j.Level; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; + +/** + * DavMail settings frame + */ +public class SettingsFrame extends JFrame { + static final Level[] LOG_LEVELS = {Level.OFF, Level.FATAL, Level.ERROR, Level.WARN, Level.INFO, Level.DEBUG, Level.ALL}; + + protected JTextField urlField; + protected JTextField popPortField; + protected JCheckBox popPortCheckBox; + protected JTextField imapPortField; + protected JCheckBox imapPortCheckBox; + protected JTextField smtpPortField; + protected JCheckBox smtpPortCheckBox; + protected JTextField caldavPortField; + protected JCheckBox caldavPortCheckBox; + protected JTextField ldapPortField; + protected JCheckBox ldapPortCheckBox; + protected JTextField keepDelayField; + protected JTextField sentKeepDelayField; + protected JTextField caldavPastDelayField; + + JCheckBox useSystemProxiesField; + JCheckBox enableProxyField; + JTextField httpProxyField; + JTextField httpProxyPortField; + JTextField httpProxyUserField; + JTextField httpProxyPasswordField; + + JCheckBox allowRemoteField; + JTextField bindAddressField; + JTextField certHashField; + JCheckBox disableUpdateCheck; + + JComboBox keystoreTypeCombo; + JTextField keystoreFileField; + JPasswordField keystorePassField; + JPasswordField keyPassField; + + JComboBox clientKeystoreTypeCombo; + JTextField clientKeystoreFileField; + JPasswordField clientKeystorePassField; + JTextField pkcs11LibraryField; + JTextArea pkcs11ConfigField; + + JComboBox rootLoggingLevelField; + JComboBox davmailLoggingLevelField; + JComboBox httpclientLoggingLevelField; + JComboBox wireLoggingLevelField; + JTextField logFilePathField; + + JTextField caldavAlarmSoundField; + JCheckBox forceActiveSyncUpdateCheckBox; + JTextField defaultDomainField; + JCheckBox showStartupBannerCheckBox; + + protected void addSettingComponent(JPanel panel, String label, JComponent component) { + addSettingComponent(panel, label, component, null); + } + + protected void addSettingComponent(JPanel panel, String label, JComponent component, String toolTipText) { + JLabel fieldLabel = new JLabel(label); + fieldLabel.setHorizontalAlignment(SwingConstants.RIGHT); + fieldLabel.setVerticalAlignment(SwingConstants.CENTER); + panel.add(fieldLabel); + component.setMaximumSize(component.getPreferredSize()); + JPanel innerPanel = new JPanel(); + innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.X_AXIS)); + innerPanel.add(component); + panel.add(innerPanel); + if (toolTipText != null) { + fieldLabel.setToolTipText(toolTipText); + component.setToolTipText(toolTipText); + } + } + + protected void addPortSettingComponent(JPanel panel, String label, JComponent component, JComponent checkboxComponent, String toolTipText) { + JLabel fieldLabel = new JLabel(label); + fieldLabel.setHorizontalAlignment(SwingConstants.RIGHT); + fieldLabel.setVerticalAlignment(SwingConstants.CENTER); + panel.add(fieldLabel); + component.setMaximumSize(component.getPreferredSize()); + JPanel innerPanel = new JPanel(); + innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.X_AXIS)); + innerPanel.add(checkboxComponent); + innerPanel.add(component); + panel.add(innerPanel); + if (toolTipText != null) { + fieldLabel.setToolTipText(toolTipText); + component.setToolTipText(toolTipText); + } + } + + protected JPanel getSettingsPanel() { + JPanel settingsPanel = new JPanel(new GridLayout(6, 2)); + settingsPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_GATEWAY"))); + + urlField = new JTextField(Settings.getProperty("davmail.url"), 17); + popPortField = new JTextField(Settings.getProperty("davmail.popPort"), 4); + popPortCheckBox = new JCheckBox(); + popPortCheckBox.setSelected(Settings.getProperty("davmail.popPort") != null && Settings.getProperty("davmail.popPort").length() > 0); + popPortField.setEnabled(popPortCheckBox.isSelected()); + popPortCheckBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent evt) { + popPortField.setEnabled(popPortCheckBox.isSelected()); + } + }); + + imapPortField = new JTextField(Settings.getProperty("davmail.imapPort"), 4); + imapPortCheckBox = new JCheckBox(); + imapPortCheckBox.setSelected(Settings.getProperty("davmail.imapPort") != null && Settings.getProperty("davmail.imapPort").length() > 0); + imapPortField.setEnabled(imapPortCheckBox.isSelected()); + imapPortCheckBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent evt) { + imapPortField.setEnabled(imapPortCheckBox.isSelected()); + } + }); + + smtpPortField = new JTextField(Settings.getProperty("davmail.smtpPort"), 4); + smtpPortCheckBox = new JCheckBox(); + smtpPortCheckBox.setSelected(Settings.getProperty("davmail.smtpPort") != null && Settings.getProperty("davmail.smtpPort").length() > 0); + smtpPortField.setEnabled(smtpPortCheckBox.isSelected()); + smtpPortCheckBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent evt) { + smtpPortField.setEnabled(smtpPortCheckBox.isSelected()); + } + }); + + caldavPortField = new JTextField(Settings.getProperty("davmail.caldavPort"), 4); + caldavPortCheckBox = new JCheckBox(); + caldavPortCheckBox.setSelected(Settings.getProperty("davmail.caldavPort") != null && Settings.getProperty("davmail.caldavPort").length() > 0); + caldavPortField.setEnabled(caldavPortCheckBox.isSelected()); + caldavPortCheckBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent evt) { + caldavPortField.setEnabled(caldavPortCheckBox.isSelected()); + } + }); + + ldapPortField = new JTextField(Settings.getProperty("davmail.ldapPort"), 4); + ldapPortCheckBox = new JCheckBox(); + ldapPortCheckBox.setSelected(Settings.getProperty("davmail.ldapPort") != null && Settings.getProperty("davmail.ldapPort").length() > 0); + ldapPortField.setEnabled(ldapPortCheckBox.isSelected()); + ldapPortCheckBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent evt) { + ldapPortField.setEnabled(ldapPortCheckBox.isSelected()); + } + }); + + addSettingComponent(settingsPanel, BundleMessage.format("UI_OWA_URL"), urlField, BundleMessage.format("UI_OWA_URL_HELP")); + addPortSettingComponent(settingsPanel, BundleMessage.format("UI_POP_PORT"), popPortField, popPortCheckBox, + BundleMessage.format("UI_POP_PORT_HELP")); + addPortSettingComponent(settingsPanel, BundleMessage.format("UI_IMAP_PORT"), imapPortField, imapPortCheckBox, + BundleMessage.format("UI_IMAP_PORT_HELP")); + addPortSettingComponent(settingsPanel, BundleMessage.format("UI_SMTP_PORT"), smtpPortField, smtpPortCheckBox, + BundleMessage.format("UI_SMTP_PORT_HELP")); + addPortSettingComponent(settingsPanel, BundleMessage.format("UI_CALDAV_PORT"), caldavPortField, caldavPortCheckBox, + BundleMessage.format("UI_CALDAV_PORT_HELP")); + addPortSettingComponent(settingsPanel, BundleMessage.format("UI_LDAP_PORT"), ldapPortField, ldapPortCheckBox, + BundleMessage.format("UI_LDAP_PORT_HELP")); + return settingsPanel; + } + + protected JPanel getDelaysPanel() { + JPanel delaysPanel = new JPanel(new GridLayout(3, 2)); + delaysPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_DELAYS"))); + + keepDelayField = new JTextField(Settings.getProperty("davmail.keepDelay"), 4); + sentKeepDelayField = new JTextField(Settings.getProperty("davmail.sentKeepDelay"), 4); + caldavPastDelayField = new JTextField(Settings.getProperty("davmail.caldavPastDelay"), 4); + + addSettingComponent(delaysPanel, BundleMessage.format("UI_KEEP_DELAY"), keepDelayField, + BundleMessage.format("UI_KEEP_DELAY_HELP")); + addSettingComponent(delaysPanel, BundleMessage.format("UI_SENT_KEEP_DELAY"), sentKeepDelayField, + BundleMessage.format("UI_SENT_KEEP_DELAY_HELP")); + addSettingComponent(delaysPanel, BundleMessage.format("UI_CALENDAR_PAST_EVENTS"), caldavPastDelayField, + BundleMessage.format("UI_CALENDAR_PAST_EVENTS_HELP")); + return delaysPanel; + } + + protected JPanel getProxyPanel() { + JPanel proxyPanel = new JPanel(new GridLayout(6, 2)); + proxyPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_PROXY"))); + + boolean useSystemProxies = Settings.getBooleanProperty("davmail.useSystemProxies"); + boolean enableProxy = Settings.getBooleanProperty("davmail.enableProxy"); + useSystemProxiesField = new JCheckBox(); + useSystemProxiesField.setSelected(useSystemProxies); + enableProxyField = new JCheckBox(); + enableProxyField.setSelected(enableProxy); + httpProxyField = new JTextField(Settings.getProperty("davmail.proxyHost"), 15); + httpProxyPortField = new JTextField(Settings.getProperty("davmail.proxyPort"), 4); + httpProxyUserField = new JTextField(Settings.getProperty("davmail.proxyUser"), 10); + httpProxyPasswordField = new JPasswordField(Settings.getProperty("davmail.proxyPassword"), 10); + + enableProxyField.setEnabled(!useSystemProxies); + httpProxyField.setEnabled(enableProxy); + httpProxyPortField.setEnabled(enableProxy); + httpProxyUserField.setEnabled(enableProxy || useSystemProxies); + httpProxyPasswordField.setEnabled(enableProxy || useSystemProxies); + + useSystemProxiesField.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent evt) { + boolean newUseSystemProxies = useSystemProxiesField.isSelected(); + boolean newEnableProxy = enableProxyField.isSelected(); + enableProxyField.setEnabled(!newUseSystemProxies); + httpProxyField.setEnabled(!newUseSystemProxies && newEnableProxy); + httpProxyPortField.setEnabled(!newUseSystemProxies && newEnableProxy); + httpProxyUserField.setEnabled(newUseSystemProxies || newEnableProxy); + httpProxyPasswordField.setEnabled(newUseSystemProxies || newEnableProxy); + } + }); + enableProxyField.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent evt) { + boolean newEnableProxy = enableProxyField.isSelected(); + httpProxyField.setEnabled(newEnableProxy); + httpProxyPortField.setEnabled(newEnableProxy); + httpProxyUserField.setEnabled(newEnableProxy); + httpProxyPasswordField.setEnabled(newEnableProxy); + } + }); + + addSettingComponent(proxyPanel, BundleMessage.format("UI_USE_SYSTEM_PROXIES"), useSystemProxiesField); + addSettingComponent(proxyPanel, BundleMessage.format("UI_ENABLE_PROXY"), enableProxyField); + addSettingComponent(proxyPanel, BundleMessage.format("UI_PROXY_SERVER"), httpProxyField); + addSettingComponent(proxyPanel, BundleMessage.format("UI_PROXY_PORT"), httpProxyPortField); + addSettingComponent(proxyPanel, BundleMessage.format("UI_PROXY_USER"), httpProxyUserField); + addSettingComponent(proxyPanel, BundleMessage.format("UI_PROXY_PASSWORD"), httpProxyPasswordField); + updateMaximumSize(proxyPanel); + return proxyPanel; + } + + protected JPanel getKeystorePanel() { + JPanel keyStorePanel = new JPanel(new GridLayout(4, 2)); + keyStorePanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_SERVER_CERTIFICATE"))); + + keystoreTypeCombo = new JComboBox(new String[]{"JKS", "PKCS12"}); + keystoreTypeCombo.setSelectedItem(Settings.getProperty("davmail.ssl.keystoreType")); + keystoreFileField = new JTextField(Settings.getProperty("davmail.ssl.keystoreFile"), 17); + keystorePassField = new JPasswordField(Settings.getProperty("davmail.ssl.keystorePass"), 15); + keyPassField = new JPasswordField(Settings.getProperty("davmail.ssl.keyPass"), 15); + + addSettingComponent(keyStorePanel, BundleMessage.format("UI_KEY_STORE_TYPE"), keystoreTypeCombo, + BundleMessage.format("UI_KEY_STORE_TYPE_HELP")); + addSettingComponent(keyStorePanel, BundleMessage.format("UI_KEY_STORE"), keystoreFileField, + BundleMessage.format("UI_KEY_STORE_HELP")); + addSettingComponent(keyStorePanel, BundleMessage.format("UI_KEY_STORE_PASSWORD"), keystorePassField, + BundleMessage.format("UI_KEY_STORE_PASSWORD_HELP")); + addSettingComponent(keyStorePanel, BundleMessage.format("UI_KEY_PASSWORD"), keyPassField, + BundleMessage.format("UI_KEY_PASSWORD_HELP")); + updateMaximumSize(keyStorePanel); + return keyStorePanel; + } + + protected JPanel getSmartCardPanel() { + JPanel clientKeystorePanel = new JPanel(new GridLayout(2, 1)); + clientKeystorePanel.setLayout(new BoxLayout(clientKeystorePanel, BoxLayout.Y_AXIS)); + clientKeystorePanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_CLIENT_CERTIFICATE"))); + + clientKeystoreTypeCombo = new JComboBox(new String[]{"PKCS11", "JKS", "PKCS12"}); + clientKeystoreTypeCombo.setSelectedItem(Settings.getProperty("davmail.ssl.clientKeystoreType")); + clientKeystoreFileField = new JTextField(Settings.getProperty("davmail.ssl.clientKeystoreFile"), 17); + clientKeystorePassField = new JPasswordField(Settings.getProperty("davmail.ssl.clientKeystorePass"), 15); + + pkcs11LibraryField = new JTextField(Settings.getProperty("davmail.ssl.pkcs11Library"), 17); + pkcs11ConfigField = new JTextArea(2, 17); + pkcs11ConfigField.setText(Settings.getProperty("davmail.ssl.pkcs11Config")); + pkcs11ConfigField.setBorder(pkcs11LibraryField.getBorder()); + pkcs11ConfigField.setFont(pkcs11LibraryField.getFont()); + + JPanel clientKeystoreTypePanel = new JPanel(new GridLayout(1, 2)); + addSettingComponent(clientKeystoreTypePanel, BundleMessage.format("UI_CLIENT_KEY_STORE_TYPE"), clientKeystoreTypeCombo, + BundleMessage.format("UI_CLIENT_KEY_STORE_TYPE_HELP")); + clientKeystorePanel.add(clientKeystoreTypePanel); + + final JPanel cardPanel = new JPanel(new CardLayout()); + clientKeystorePanel.add(cardPanel); + + JPanel clientKeystoreFilePanel = new JPanel(new GridLayout(2, 2)); + addSettingComponent(clientKeystoreFilePanel, BundleMessage.format("UI_CLIENT_KEY_STORE"), clientKeystoreFileField, + BundleMessage.format("UI_CLIENT_KEY_STORE_HELP")); + addSettingComponent(clientKeystoreFilePanel, BundleMessage.format("UI_CLIENT_KEY_STORE_PASSWORD"), clientKeystorePassField, + BundleMessage.format("UI_CLIENT_KEY_STORE_PASSWORD_HELP")); + cardPanel.add(clientKeystoreFilePanel, "FILE"); + + JPanel pkcs11Panel = new JPanel(new GridLayout(2, 2)); + addSettingComponent(pkcs11Panel, BundleMessage.format("UI_PKCS11_LIBRARY"), pkcs11LibraryField, + BundleMessage.format("UI_PKCS11_LIBRARY_HELP")); + addSettingComponent(pkcs11Panel, BundleMessage.format("UI_PKCS11_CONFIG"), pkcs11ConfigField, + BundleMessage.format("UI_PKCS11_CONFIG_HELP")); + cardPanel.add(pkcs11Panel, "PKCS11"); + + ((CardLayout) cardPanel.getLayout()).show(cardPanel, (String) clientKeystoreTypeCombo.getSelectedItem()); + + clientKeystoreTypeCombo.addItemListener(new ItemListener() { + public void itemStateChanged(ItemEvent event) { + CardLayout cardLayout = (CardLayout) (cardPanel.getLayout()); + if ("PKCS11".equals(event.getItem())) { + cardLayout.show(cardPanel, "PKCS11"); + } else { + cardLayout.show(cardPanel, "FILE"); + } + } + }); + updateMaximumSize(clientKeystorePanel); + return clientKeystorePanel; + } + + protected JPanel getNetworkSettingsPanel() { + JPanel networkSettingsPanel = new JPanel(new GridLayout(4, 2)); + networkSettingsPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_NETWORK"))); + + allowRemoteField = new JCheckBox(); + allowRemoteField.setSelected(Settings.getBooleanProperty("davmail.allowRemote")); + + bindAddressField = new JTextField(Settings.getProperty("davmail.bindAddress"), 15); + + certHashField = new JTextField(Settings.getProperty("davmail.server.certificate.hash"), 15); + + disableUpdateCheck = new JCheckBox(); + disableUpdateCheck.setSelected(Settings.getBooleanProperty("davmail.disableUpdateCheck")); + + addSettingComponent(networkSettingsPanel, BundleMessage.format("UI_BIND_ADDRESS"), bindAddressField, + BundleMessage.format("UI_BIND_ADDRESS_HELP")); + addSettingComponent(networkSettingsPanel, BundleMessage.format("UI_ALLOW_REMOTE_CONNECTION"), allowRemoteField, + BundleMessage.format("UI_ALLOW_REMOTE_CONNECTION_HELP")); + addSettingComponent(networkSettingsPanel, BundleMessage.format("UI_SERVER_CERTIFICATE_HASH"), certHashField, + BundleMessage.format("UI_SERVER_CERTIFICATE_HASH_HELP")); + addSettingComponent(networkSettingsPanel, BundleMessage.format("UI_DISABLE_UPDATE_CHECK"), disableUpdateCheck, + BundleMessage.format("UI_DISABLE_UPDATE_CHECK_HELP")); + updateMaximumSize(networkSettingsPanel); + return networkSettingsPanel; + } + + protected JPanel getOtherSettingsPanel() { + JPanel otherSettingsPanel = new JPanel(new GridLayout(4, 2)); + otherSettingsPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_OTHER"))); + + caldavAlarmSoundField = new JTextField(Settings.getProperty("davmail.caldavAlarmSound"), 15); + forceActiveSyncUpdateCheckBox = new JCheckBox(); + forceActiveSyncUpdateCheckBox.setSelected(Settings.getBooleanProperty("davmail.forceActiveSyncUpdate")); + defaultDomainField = new JTextField(Settings.getProperty("davmail.defaultDomain"), 15); + showStartupBannerCheckBox = new JCheckBox(); + showStartupBannerCheckBox.setSelected(Settings.getBooleanProperty("davmail.showStartupBanner", true)); + + addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_CALDAV_ALARM_SOUND"), caldavAlarmSoundField, + BundleMessage.format("UI_CALDAV_ALARM_SOUND_HELP")); + addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_FORCE_ACTIVESYNC_UPDATE"), forceActiveSyncUpdateCheckBox, + BundleMessage.format("UI_FORCE_ACTIVESYNC_UPDATE_HELP")); + addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_DEFAULT_DOMAIN"), defaultDomainField, + BundleMessage.format("UI_DEFAULT_DOMAIN_HELP")); + addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_SHOW_STARTUP_BANNER"), showStartupBannerCheckBox, + BundleMessage.format("UI_SHOW_STARTUP_BANNER_HELP")); + + Dimension preferredSize = otherSettingsPanel.getPreferredSize(); + preferredSize.width = Integer.MAX_VALUE; + updateMaximumSize(otherSettingsPanel); + return otherSettingsPanel; + } + + protected JPanel getLoggingSettingsPanel() { + JPanel loggingLevelPanel = new JPanel(); + JPanel leftLoggingPanel = new JPanel(new GridLayout(2, 2)); + JPanel rightLoggingPanel = new JPanel(new GridLayout(2, 2)); + loggingLevelPanel.add(leftLoggingPanel); + loggingLevelPanel.add(rightLoggingPanel); + + rootLoggingLevelField = new JComboBox(LOG_LEVELS); + davmailLoggingLevelField = new JComboBox(LOG_LEVELS); + httpclientLoggingLevelField = new JComboBox(LOG_LEVELS); + wireLoggingLevelField = new JComboBox(LOG_LEVELS); + logFilePathField = new JTextField(Settings.getProperty("davmail.logFilePath"), 15); + + rootLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("rootLogger")); + davmailLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("davmail")); + httpclientLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("org.apache.commons.httpclient")); + wireLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("httpclient.wire")); + + addSettingComponent(leftLoggingPanel, BundleMessage.format("UI_LOG_DEFAULT"), rootLoggingLevelField); + addSettingComponent(leftLoggingPanel, BundleMessage.format("UI_LOG_DAVMAIL"), davmailLoggingLevelField); + addSettingComponent(rightLoggingPanel, BundleMessage.format("UI_LOG_HTTPCLIENT"), httpclientLoggingLevelField); + addSettingComponent(rightLoggingPanel, BundleMessage.format("UI_LOG_WIRE"), wireLoggingLevelField); + + JPanel logFilePathPanel = new JPanel(); + addSettingComponent(logFilePathPanel, BundleMessage.format("UI_LOG_FILE_PATH"), logFilePathField); + + JPanel loggingPanel = new JPanel(); + loggingPanel.setLayout(new BoxLayout(loggingPanel, BoxLayout.Y_AXIS)); + loggingPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_LOGGING_LEVELS"))); + loggingPanel.add(logFilePathPanel); + loggingPanel.add(loggingLevelPanel); + + updateMaximumSize(loggingPanel); + return loggingPanel; + } + + protected void updateMaximumSize(JPanel panel) { + Dimension preferredSize = panel.getPreferredSize(); + preferredSize.width = Integer.MAX_VALUE; + panel.setMaximumSize(preferredSize); + } + + /** + * Reload settings from properties. + */ + public void reload() { + // reload settings in form + urlField.setText(Settings.getProperty("davmail.url")); + popPortField.setText(Settings.getProperty("davmail.popPort")); + popPortCheckBox.setSelected(Settings.getProperty("davmail.popPort") != null && Settings.getProperty("davmail.popPort").length() > 0); + imapPortField.setText(Settings.getProperty("davmail.imapPort")); + imapPortCheckBox.setSelected(Settings.getProperty("davmail.imapPort") != null && Settings.getProperty("davmail.imapPort").length() > 0); + smtpPortField.setText(Settings.getProperty("davmail.smtpPort")); + smtpPortCheckBox.setSelected(Settings.getProperty("davmail.smtpPort") != null && Settings.getProperty("davmail.smtpPort").length() > 0); + caldavPortField.setText(Settings.getProperty("davmail.caldavPort")); + caldavPortCheckBox.setSelected(Settings.getProperty("davmail.caldavPort") != null && Settings.getProperty("davmail.caldavPort").length() > 0); + ldapPortField.setText(Settings.getProperty("davmail.ldapPort")); + ldapPortCheckBox.setSelected(Settings.getProperty("davmail.ldapPort") != null && Settings.getProperty("davmail.ldapPort").length() > 0); + keepDelayField.setText(Settings.getProperty("davmail.keepDelay")); + sentKeepDelayField.setText(Settings.getProperty("davmail.sentKeepDelay")); + caldavPastDelayField.setText(Settings.getProperty("davmail.caldavPastDelay")); + boolean useSystemProxies = Settings.getBooleanProperty("davmail.useSystemProxies"); + useSystemProxiesField.setSelected(useSystemProxies); + boolean enableProxy = Settings.getBooleanProperty("davmail.enableProxy"); + enableProxyField.setSelected(enableProxy); + enableProxyField.setEnabled(!useSystemProxies); + httpProxyField.setEnabled(!useSystemProxies && enableProxy); + httpProxyPortField.setEnabled(!useSystemProxies && enableProxy); + httpProxyUserField.setEnabled(useSystemProxies ||enableProxy); + httpProxyPasswordField.setEnabled(useSystemProxies || enableProxy); + httpProxyField.setText(Settings.getProperty("davmail.proxyHost")); + httpProxyPortField.setText(Settings.getProperty("davmail.proxyPort")); + httpProxyUserField.setText(Settings.getProperty("davmail.proxyUser")); + httpProxyPasswordField.setText(Settings.getProperty("davmail.proxyPassword")); + + bindAddressField.setText(Settings.getProperty("davmail.bindAddress")); + allowRemoteField.setSelected(Settings.getBooleanProperty(("davmail.allowRemote"))); + certHashField.setText(Settings.getProperty("davmail.server.certificate.hash")); + disableUpdateCheck.setSelected(Settings.getBooleanProperty(("davmail.disableUpdateCheck"))); + + caldavAlarmSoundField.setText(Settings.getProperty("davmail.caldavAlarmSound")); + forceActiveSyncUpdateCheckBox.setSelected(Settings.getBooleanProperty("davmail.forceActiveSyncUpdate")); + defaultDomainField.setText(Settings.getProperty("davmail.defaultDomain")); + showStartupBannerCheckBox.setSelected(Settings.getBooleanProperty("davmail.showStartupBanner", true)); + + keystoreTypeCombo.setSelectedItem(Settings.getProperty("davmail.ssl.keystoreType")); + keystoreFileField.setText(Settings.getProperty("davmail.ssl.keystoreFile")); + keystorePassField.setText(Settings.getProperty("davmail.ssl.keystorePass")); + keyPassField.setText(Settings.getProperty("davmail.ssl.keyPass")); + + clientKeystoreTypeCombo.setSelectedItem(Settings.getProperty("davmail.ssl.clientKeystoreType")); + pkcs11LibraryField.setText(Settings.getProperty("davmail.ssl.pkcs11Library")); + pkcs11ConfigField.setText(Settings.getProperty("davmail.ssl.pkcs11Config")); + + rootLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("rootLogger")); + davmailLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("davmail")); + httpclientLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("org.apache.commons.httpclient")); + wireLoggingLevelField.setSelectedItem(Settings.getLoggingLevel("httpclient.wire")); + logFilePathField.setText(Settings.getProperty("davmail.logFilePath")); + } + + /** + * DavMail settings frame. + */ + public SettingsFrame() { + setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); + setTitle(BundleMessage.format("UI_DAVMAIL_SETTINGS")); + setIconImage(DavGatewayTray.getFrameIcon()); + + JTabbedPane tabbedPane = new JTabbedPane(); + // add help (F1 handler) + tabbedPane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("F1"), + "help"); + tabbedPane.getActionMap().put("help", new AbstractAction() { + public void actionPerformed(ActionEvent e) { + DesktopBrowser.browse("http://davmail.sourceforge.net"); + } + }); + + JPanel mainPanel = new JPanel(); + mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS)); + mainPanel.add(getSettingsPanel()); + mainPanel.add(getDelaysPanel()); + mainPanel.add(Box.createVerticalGlue()); + + tabbedPane.add(BundleMessage.format("UI_TAB_MAIN"), mainPanel); + + JPanel proxyPanel = new JPanel(); + proxyPanel.setLayout(new BoxLayout(proxyPanel, BoxLayout.Y_AXIS)); + proxyPanel.add(getProxyPanel()); + // empty panel + proxyPanel.add(new JPanel()); + tabbedPane.add(BundleMessage.format("UI_TAB_PROXY"), proxyPanel); + + JPanel encryptionPanel = new JPanel(); + encryptionPanel.setLayout(new BoxLayout(encryptionPanel, BoxLayout.Y_AXIS)); + encryptionPanel.add(getKeystorePanel()); + encryptionPanel.add(getSmartCardPanel()); + // empty panel + encryptionPanel.add(new JPanel()); + tabbedPane.add(BundleMessage.format("UI_TAB_ENCRYPTION"), encryptionPanel); + + JPanel loggingPanel = new JPanel(); + loggingPanel.setLayout(new BoxLayout(loggingPanel, BoxLayout.Y_AXIS)); + loggingPanel.add(getLoggingSettingsPanel()); + // empty panel + loggingPanel.add(new JPanel()); + + tabbedPane.add(BundleMessage.format("UI_TAB_LOGGING"), loggingPanel); + + JPanel advancedPanel = new JPanel(); + advancedPanel.setLayout(new BoxLayout(advancedPanel, BoxLayout.Y_AXIS)); + + advancedPanel.add(getNetworkSettingsPanel()); + advancedPanel.add(getOtherSettingsPanel()); + // empty panel + advancedPanel.add(new JPanel()); + + tabbedPane.add(BundleMessage.format("UI_TAB_ADVANCED"), advancedPanel); + + add(BorderLayout.CENTER, tabbedPane); + + JPanel buttonPanel = new JPanel(); + JButton cancel = new JButton(BundleMessage.format("UI_BUTTON_CANCEL")); + JButton ok = new JButton(BundleMessage.format("UI_BUTTON_SAVE")); + JButton help = new JButton(BundleMessage.format("UI_BUTTON_HELP")); + ActionListener save = new ActionListener() { + public void actionPerformed(ActionEvent evt) { + // save options + Settings.setProperty("davmail.url", urlField.getText()); + Settings.setProperty("davmail.popPort", popPortCheckBox.isSelected() ? popPortField.getText() : ""); + Settings.setProperty("davmail.imapPort", imapPortCheckBox.isSelected() ? imapPortField.getText() : ""); + Settings.setProperty("davmail.smtpPort", smtpPortCheckBox.isSelected() ? smtpPortField.getText() : ""); + Settings.setProperty("davmail.caldavPort", caldavPortCheckBox.isSelected() ? caldavPortField.getText() : ""); + Settings.setProperty("davmail.ldapPort", ldapPortCheckBox.isSelected() ? ldapPortField.getText() : ""); + Settings.setProperty("davmail.keepDelay", keepDelayField.getText()); + Settings.setProperty("davmail.sentKeepDelay", sentKeepDelayField.getText()); + Settings.setProperty("davmail.caldavPastDelay", caldavPastDelayField.getText()); + Settings.setProperty("davmail.useSystemProxies", String.valueOf(useSystemProxiesField.isSelected())); + Settings.setProperty("davmail.enableProxy", String.valueOf(enableProxyField.isSelected())); + Settings.setProperty("davmail.proxyHost", httpProxyField.getText()); + Settings.setProperty("davmail.proxyPort", httpProxyPortField.getText()); + Settings.setProperty("davmail.proxyUser", httpProxyUserField.getText()); + Settings.setProperty("davmail.proxyPassword", httpProxyPasswordField.getText()); + + Settings.setProperty("davmail.bindAddress", bindAddressField.getText()); + Settings.setProperty("davmail.allowRemote", String.valueOf(allowRemoteField.isSelected())); + Settings.setProperty("davmail.server.certificate.hash", certHashField.getText()); + Settings.setProperty("davmail.disableUpdateCheck", String.valueOf(disableUpdateCheck.isSelected())); + + Settings.setProperty("davmail.caldavAlarmSound", String.valueOf(caldavAlarmSoundField.getText())); + Settings.setProperty("davmail.forceActiveSyncUpdate", String.valueOf(forceActiveSyncUpdateCheckBox.isSelected())); + Settings.setProperty("davmail.defaultDomain", String.valueOf(defaultDomainField.getText())); + Settings.setProperty("davmail.showStartupBanner", String.valueOf(showStartupBannerCheckBox.isSelected())); + + Settings.setProperty("davmail.ssl.keystoreType", (String) keystoreTypeCombo.getSelectedItem()); + Settings.setProperty("davmail.ssl.keystoreFile", keystoreFileField.getText()); + Settings.setProperty("davmail.ssl.keystorePass", String.valueOf(keystorePassField.getPassword())); + Settings.setProperty("davmail.ssl.keyPass", String.valueOf(keyPassField.getPassword())); + + Settings.setProperty("davmail.ssl.clientKeystoreType", (String) clientKeystoreTypeCombo.getSelectedItem()); + Settings.setProperty("davmail.ssl.clientKeystoreFile", clientKeystoreFileField.getText()); + Settings.setProperty("davmail.ssl.clientKeystorePass", String.valueOf(clientKeystorePassField.getPassword())); + Settings.setProperty("davmail.ssl.pkcs11Library", pkcs11LibraryField.getText()); + Settings.setProperty("davmail.ssl.pkcs11Config", pkcs11ConfigField.getText()); + + Settings.setLoggingLevel("rootLogger", (Level) rootLoggingLevelField.getSelectedItem()); + Settings.setLoggingLevel("davmail", (Level) davmailLoggingLevelField.getSelectedItem()); + Settings.setLoggingLevel("org.apache.commons.httpclient", (Level) httpclientLoggingLevelField.getSelectedItem()); + Settings.setLoggingLevel("httpclient.wire", (Level) wireLoggingLevelField.getSelectedItem()); + Settings.setProperty("davmail.logFilePath", logFilePathField.getText()); + + dispose(); + Settings.save(); + // restart listeners with new config + DavGateway.stop(); + DavGateway.start(); + } + }; + ok.addActionListener(save); + + cancel.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent evt) { + reload(); + dispose(); + } + }); + + help.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + DesktopBrowser.browse("http://davmail.sourceforge.net"); + } + }); + + buttonPanel.add(ok); + buttonPanel.add(cancel); + buttonPanel.add(help); + + add(BorderLayout.SOUTH, buttonPanel); + + pack(); + //setResizable(false); + // center frame + setLocation(getToolkit().getScreenSize().width / 2 - + getSize().width / 2, + getToolkit().getScreenSize().height / 2 - + getSize().height / 2); + urlField.requestFocus(); + } +} diff --git a/src/java/davmailmessages.properties b/src/java/davmailmessages.properties index b8312dd3..dedd0a01 100644 --- a/src/java/davmailmessages.properties +++ b/src/java/davmailmessages.properties @@ -1,251 +1,253 @@ -EXCEPTION_AUTHENTICATION_FAILED=Authentication failed: invalid user or password -EXCEPTION_AUTHENTICATION_FAILED_PASSWORD_EXPIRED=Authentication failed: password expired ? -EXCEPTION_AUTHENTICATION_FAILED_RETRY=Authentication failed: invalid user or password, retry with domain\\user -EXCEPTION_AUTHENTICATION_FORM_NOT_FOUND=Authentication form not found at {0} -EXCEPTION_CONNECTION_FAILED=Unable to connect to OWA at {0}, status code {1}, check configuration -EXCEPTION_DAVMAIL_CONFIGURATION=DavMail configuration exception:\n{0} -EXCEPTION_END_OF_STREAM=End of stream reached reading content -EXCEPTION_EVENT_NOT_FOUND=Calendar event not found -EXCEPTION_EXCHANGE_LOGIN_FAILED=Exchange login exception: {0} -EXCEPTION_SESSION_EXPIRED=Exchange session expired -EXCEPTION_INVALID_CALDAV_REQUEST=Invalid Caldav request: {0} -EXCEPTION_INVALID_CONTENT_LENGTH=Invalid content length: {0} -EXCEPTION_INVALID_CONTENT_TYPE=Invalid content type: {0} -EXCEPTION_INVALID_CREDENTIALS=Invalid credentials -EXCEPTION_INVALID_DATE=Invalid date: {0} -EXCEPTION_INVALID_DATES=Invalid dates: {0} -EXCEPTION_INVALID_FOLDER_URL=Invalid folder URL: {0} -EXCEPTION_INVALID_HEADER=Invalid header: {0}, HTTPS connection to an HTTP listener ? -EXCEPTION_INVALID_ICS_LINE=Invalid ICS line: {0} -EXCEPTION_INVALID_KEEPALIVE=Invalid Keep-Alive: {0} -EXCEPTION_INVALID_MAIL_PATH=Invalid mail path: {0} -EXCEPTION_INVALID_MESSAGE_CONTENT=Invalid message content: {0} -EXCEPTION_INVALID_MESSAGE_URL=Invalid message URL: {0} -EXCEPTION_INVALID_RECIPIENT=Invalid recipient: {0} -EXCEPTION_INVALID_REQUEST=Invalid request: {0} -EXCEPTION_INVALID_SEARCH_PARAMETERS=Invalid search parameters: {0} -EXCEPTION_UNSUPPORTED_PARAMETER=Unsupported parameter: {0} -EXCEPTION_INVALID_PARAMETER=Invalid parameter: {0} -EXCEPTION_NETWORK_DOWN=All network interfaces down or host unreachable ! -EXCEPTION_UNABLE_TO_CREATE_MESSAGE=Unable to create message {0}: {1}{2}{3} -EXCEPTION_UNABLE_TO_GET_FOLDER=Unable to get folder at {0} -EXCEPTION_UNABLE_TO_GET_MAIL_FOLDER=Unable to get mail folder at {0} -EXCEPTION_UNABLE_TO_GET_PROPERTY=Unable to get property {0} -EXCEPTION_UNABLE_TO_MOVE_FOLDER=Unable to move folder, target already exists -EXCEPTION_UNABLE_TO_COPY_MESSAGE=Unable to copy message, target already exists -EXCEPTION_UNABLE_TO_PATCH_MESSAGE=Unable to patch message {0}: {1}{2}{3} -EXCEPTION_UNABLE_TO_UPDATE_MESSAGE=Unable to update message properties -EXCEPTION_CONNECT=Connect exception: {0} {1} -EXCEPTION_UNSUPPORTED_AUTHORIZATION_MODE=Unsupported authorization mode: {0} -EXCEPTION_UNSUPPORTED_VALUE=Unsupported value: {0} -LOG_CLIENT_CLOSED_CONNECTION=Client closed connection -LOG_CLOSE_CONNECTION_ON_TIMEOUT=Closing connection on timeout -LOG_CONNECTION_CLOSED=Connection closed -LOG_CONNECTION_FROM=Connection from {0} on port {1,number,#} -LOG_DAVMAIL_GATEWAY_LISTENING=DavMail Gateway {0} listening on {1} -LOG_DAVMAIL_STARTED=DavMail Gateway started -LOG_ERROR_CLOSING_CONFIG_FILE=Error closing configuration file -LOG_ERROR_LOADING_OSXADAPTER=Error while loading the OSXAdapter -LOG_ERROR_LOADING_SETTINGS=Error loading settings -LOG_ERROR_RETRIEVING_MESSAGE=Error retreiving message -LOG_ERROR_WAITING_FOR_SWT_INIT=Error waiting for SWT init -LOG_EVENT_NOT_AVAILABLE=Event {0} not available: {1} -LOG_EXCEPTION_CLOSING_CLIENT_INPUT_STREAM=Exception closing client input stream -LOG_EXCEPTION_CLOSING_CLIENT_OUTPUT_STREAM=Exception closing client output stream -LOG_EXCEPTION_CLOSING_CLIENT_SOCKET=Exception closing client socket -LOG_EXCEPTION_CLOSING_CONNECTION_ON_TIMEOUT=Exception closing connection on timeout -LOG_EXCEPTION_CLOSING_SERVER_SOCKET=Exception closing server socket -LOG_EXCEPTION_CREATING_SERVER_SOCKET=Exception creating server socket -LOG_EXCEPTION_CREATING_SSL_SERVER_SOCKET=Unable to bind server socket for {0} on port {1,number,#}: Exception creating secured server socket : {2} -LOG_EXCEPTION_GETTING_SOCKET_STREAMS=Exception while getting socket streams -LOG_EXCEPTION_LISTENING_FOR_CONNECTIONS=Exception while listening for connections -LOG_EXCEPTION_SENDING_ERROR_TO_CLIENT=Exception sending error to client -LOG_EXCEPTION_WAITING_SERVER_THREAD_DIE=Exception waiting for server thread to die -LOG_EXECUTE_FOLLOW_REDIRECTS=executeFollowRedirects({0}) -LOG_EXECUTE_FOLLOW_REDIRECTS_COUNT=executeFollowRedirects: {0} redirectCount:{1} -LOG_EXTERNAL_CONNECTION_REFUSED=Connection from external client refused -LOG_FOUND_ACCEPTED_CERTIFICATE=Found permanently accepted certificate, hash {0} -LOG_FOUND_CALENDAR_EVENTS=Found {0} calendar events -LOG_FOUND_CALENDAR_MESSAGES=Found {0} calendar messages -LOG_IMAP_COMMAND={0} on {1} -LOG_INVALID_DEPTH=Invalid depth value: {0} -LOG_INVALID_SETTING_VALUE=Invalid setting value in {0} -LOG_INVALID_URL=Invalid URL: {0} -LOG_JAVA6_DESKTOP_UNAVAILABLE=Java 6 Desktop class not available -LOG_LDAP_IGNORE_FILTER_ATTRIBUTE=Ignoring filter attribute: {0}= {1} -LOG_LDAP_REPLACED_UID_FILTER=Replaced {0} with {1} in uid filter -LOG_LDAP_REQ_ABANDON_SEARCH=LDAP_REQ_ABANDON {0} for search {1} -LOG_LDAP_REQ_UNBIND=LDAP_REQ_UNBIND {0} -LOG_LDAP_REQ_BIND_ANONYMOUS=LDAP_REQ_BIND {0} anonymous -LOG_LDAP_REQ_BIND_USER=LDAP_REQ_BIND {0} {1} -LOG_LDAP_REQ_BIND_SUCCESS=LOG_LDAP_REQ_BIND Success -LOG_LDAP_REQ_BIND_INVALID_CREDENTIALS=LDAP_REQ_BIND Invalid credentials -LOG_LDAP_REQ_SEARCH=LDAP_REQ_SEARCH {0} base={1} scope: {2} sizelimit: {3} timelimit: {4} filter: {5} returning attributes: {6} -LOG_LDAP_REQ_SEARCH_ANONYMOUS_ACCESS_FORBIDDEN=LDAP_REQ_SEARCH {0} Anonymous access to {1} forbidden -LOG_LDAP_REQ_SEARCH_END=LDAP_REQ_SEARCH {0} end -LOG_LDAP_REQ_SEARCH_FOUND_RESULTS=LDAP_REQ_SEARCH {0} found {1} results -LOG_LDAP_REQ_SEARCH_INVALID_DN=LDAP_REQ_SEARCH {0} unrecognized dn {1} -LOG_LDAP_REQ_SEARCH_SEND_PERSON=LDAP_REQ_SEARCH {0} send uid={1}{2} {3} -LOG_LDAP_REQ_SEARCH_SIZE_LIMIT_EXCEEDED=LDAP_REQ_SEARCH {0} size limit exceeded -LOG_LDAP_REQ_SEARCH_SUCCESS=LDAP_REQ_SEARCH {0} success -LOG_LDAP_SEND_COMPUTER_CONTEXT=Sending computer context {0} {1} -LOG_LDAP_SEND_ROOT_DSE=Sending root DSE -LOG_LDAP_UNSUPPORTED_FILTER=Unsupported filter: {0} -LOG_LDAP_UNSUPPORTED_FILTER_ATTRIBUTE=Unsupported filter attribute: {0}= {1} -LOG_LDAP_UNSUPPORTED_FILTER_VALUE=Unsupported filter value -LOG_LDAP_UNSUPPORTED_OPERATION=Unsupported operation: {0} -LOG_LISTING_EVENT=Listing event {0}/{1} -LOG_MESSAGE={0} -LOG_NEW_VERSION_AVAILABLE=A new version ({0}) of DavMail Gateway is available ! -LOG_OPEN_LINK_NOT_SUPPORTED=Open link not supported (tried AWT Desktop and SWT Program) -LOG_PROTOCOL_PORT={0} port {1,number,# } -LOG_READ_CLIENT_AUTHORIZATION=< Authorization: ******** -LOG_READ_CLIENT_AUTH_PLAIN=< AUTH PLAIN ******** -LOG_READ_CLIENT_LINE=< {0} -LOG_READ_CLIENT_LOGIN=< LOGIN ******** -LOG_READ_CLIENT_PASS=< PASS ******** -LOG_READ_CLIENT_PASSWORD=< ******** -LOG_REPORT_EVENT=Report event {0}/{1} -LOG_GATEWAY_INTERRUPTED=Stopping DavMail gateway -LOG_GATEWAY_STOP=DavMail gateway stopped -LOG_SEARCHING_CALENDAR_EVENTS=Searching calendar events at {0} ... -LOG_SEARCHING_CALENDAR_MESSAGES=Searching calendar messages... -LOG_SEARCH_QUERY=Search: {0} -LOG_SEND_CLIENT_MESSAGE=> {0} -LOG_SEND_CLIENT_PREFIX_MESSAGE=> {0}{1} -LOG_SET_SOCKET_TIMEOUT=Set socket timeout to {0} seconds -LOG_SOCKET_BIND_FAILED=Unable to bind server socket for {0} on port {1,number,#}: port not allowed or in use by another process\n -LOG_STARTING_DAVMAIL=Starting DavMail Gateway... -LOG_STOPPING_DAVMAIL=Stopping DavMail Gateway... -LOG_SWT_NOT_AVAILABLE=SWT not available, fallback to JDK 1.6 system tray support -LOG_SYSTEM_TRAY_NOT_AVAILABLE=JDK 1.6 needed for system tray support -LOG_UNABLE_TO_CREATE_ICON=Unable to create icon -LOG_UNABLE_TO_CREATE_LOG_FILE_DIR=Unable to create log file directory -LOG_UNABLE_TO_CREATE_TRAY=Unable to create tray -LOG_UNABLE_TO_GET_PARSEINTWITHTAG=Unable to get BerDecoder.parseIntWithTag method -LOG_UNABLE_TO_GET_RELEASED_VERSION=Unable to get released version -LOG_UNABLE_TO_LOAD_IMAGE=Unable to load image -LOG_UNABLE_TO_LOAD_SETTINGS=Unable to load settings: -LOG_UNABLE_TO_OPEN_LINK=Unable to open link -LOG_UNABLE_TO_SET_ICON_IMAGE=Unable to set JDialog icon image (not available under Java 1.5) -LOG_UNABLE_TO_SET_LOG_FILE_PATH=Unable to set log file path -LOG_UNABLE_TO_SET_LOOK_AND_FEEL=Unable to set look and feel -LOG_UNABLE_TO_SET_SYSTEM_LOOK_AND_FEEL=Unable to set system look and feel -LOG_UNABLE_TO_STORE_SETTINGS=Unable to store settings: -LOG_UNSUPPORTED_REQUEST=Unsupported request: {0} -LOG_INVALID_TIMEZONE=Invalid timezone: {0} -LOG_ACCESS_FORBIDDEN=Access to {0} forbidden: {1} -UI_ABOUT=About... -UI_ABOUT_DAVMAIL=About DavMail Gateway -UI_ABOUT_DAVMAIL_AUTHOR=DavMail Gateway
By Mickaël Guessant

-UI_ACCEPT_CERTIFICATE=DavMail: Accept certificate ? -UI_ALLOW_REMOTE_CONNECTION=Allow Remote Connections: -UI_ALLOW_REMOTE_CONNECTION_HELP=Allow remote connections to the gateway (server mode) -UI_PASSWORD_PROMPT=DavMail: Enter password -UI_ANSWER_NO=n -UI_ANSWER_YES=y -UI_BIND_ADDRESS=Bind address: -UI_BIND_ADDRESS_HELP=Bind only to the specified network address -UI_BUTTON_ACCEPT=Accept -UI_BUTTON_CANCEL=Cancel -UI_BUTTON_DENY=Deny -UI_BUTTON_HELP=Help -UI_BUTTON_OK=OK -UI_BUTTON_SAVE=Save -UI_CALDAV_PORT=Caldav HTTP port: -UI_CALDAV_PORT_HELP=Local Caldav server port to configure in Caldav (calendar) client -UI_CALENDAR_PAST_EVENTS=Calendar past events: -UI_CALENDAR_PAST_EVENTS_HELP=Get events in the past not older than specified days count, leave empty for no limits -UI_CURRENT_VERSION=Current version: {0}
-UI_DAVMAIL_GATEWAY=DavMail Gateway -UI_DAVMAIL_SETTINGS=DavMail Gateway Settings -UI_DELAYS=Delays -UI_DISABLE_UPDATE_CHECK=Disable update check: -UI_DISABLE_UPDATE_CHECK_HELP=Disable DavMail check for new version -UI_ENABLE_PROXY=Enable proxy: -UI_ERROR_WAITING_FOR_CERTIFICATE_CHECK=Error waiting for certificate check -UI_EXIT=Exit -UI_FINGERPRINT=FingerPrint -UI_GATEWAY=Gateway -UI_HELP_INSTRUCTIONS=
Help and setup instructions available at:
http://davmail.sourceforge.net

To send comments or report bugs,
use DavMail Sourceforge trackers
or contact me at mguessan@free.fr -UI_IMAP_PORT=Local IMAP port: -UI_IMAP_PORT_HELP=Local IMAP server port to configure in mail client -UI_ISSUED_BY=Issued by -UI_ISSUED_TO=Issued to -UI_KEEP_DELAY=Trash keep delay: -UI_KEEP_DELAY_HELP=Number of days to keep messages in trash -UI_KEY_PASSWORD=Key password: -UI_KEY_PASSWORD_HELP=SSL key password inside key store -UI_KEY_STORE=Key store: -UI_KEY_STORE_HELP=SSL certificate key store file path -UI_KEY_STORE_PASSWORD=Key store password: -UI_KEY_STORE_PASSWORD_HELP=Key store password -UI_KEY_STORE_TYPE=Key store type: -UI_KEY_STORE_TYPE_HELP=Choose key store type -UI_CLIENT_KEY_STORE=Client key store: -UI_CLIENT_KEY_STORE_HELP=SSL client certificate key store file path -UI_CLIENT_KEY_STORE_PASSWORD=Client key store password: -UI_CLIENT_KEY_STORE_PASSWORD_HELP=Client key store password, leave empty for runtime prompt -UI_CLIENT_KEY_STORE_TYPE=Client key store type: -UI_CLIENT_KEY_STORE_TYPE_HELP=Choose client certificate key store type, choose PKCS11 for smartcard -UI_CLIENT_CERTIFICATE=Client Certificate -UI_PKCS11_LIBRARY=PKCS11 library: -UI_PKCS11_LIBRARY_HELP=PKCS11 (smartcard) library path (.so or .dll) -UI_PKCS11_CONFIG=PKCS11 config: -UI_PKCS11_CONFIG_HELP=Optional additional PKCS11 settings (slot, nssArgs, ...) -UI_LAST_LOG=Last log -UI_LAST_MESSAGE=Last message -UI_LATEST_VERSION=Latest version available: {0}
A new version of DavMail Gateway is available.
Download latest version
-UI_LDAP_PORT=Local LDAP port: -UI_LDAP_PORT_HELP=Local LDAP server port to configure in directory (addresse book) client -UI_LOGGING_LEVELS=Logging levels -UI_LOGS=Logs -UI_LOG_DAVMAIL=DavMail: -UI_LOG_DEFAULT=Default: -UI_LOG_HTTPCLIENT=HttpClient: -UI_LOG_WIRE=Wire: -UI_LOG_FILE_PATH=Log file path: -UI_NETWORK=Network -UI_OWA_URL=OWA (Exchange) URL: -UI_OWA_URL_HELP=Base Outlook Web Access URL -UI_POP_PORT=Local POP port: -UI_POP_PORT_HELP=Local POP server port to configure in mail client -UI_PROXY=Proxy -UI_PROXY_PASSWORD=Proxy password: -UI_PROXY_PORT=Proxy port: -UI_PROXY_SERVER=Proxy server: -UI_PROXY_USER=Proxy user: -UI_SENT_KEEP_DELAY=Sent keep delay: -UI_SENT_KEEP_DELAY_HELP=Number of days to keep messages in sent folder -UI_SERIAL=Serial -UI_SERVER_CERTIFICATE=Server Certificate -UI_SERVER_CERTIFICATE_HASH=Server certificate hash: -UI_SERVER_CERTIFICATE_HASH_HELP=Manually accepted server certificate hash -UI_SETTINGS=Settings... -UI_SHOW_LOGS=Show logs... -UI_SMTP_PORT=Local SMTP port: -UI_SMTP_PORT_HELP=Local SMTP server port to configure in mail client -UI_TAB_ADVANCED=Advanced -UI_TAB_ENCRYPTION=Encryption -UI_TAB_MAIN=Main -UI_TAB_PROXY=Proxy -UI_UNTRUSTED_CERTIFICATE=Server provided an untrusted certificate,\n you can choose to accept or deny access.\n Accept certificate (y/n)? -UI_UNTRUSTED_CERTIFICATE_HTML=Server provided an untrusted certificate,
you can choose to accept or deny access
-UI_VALID_FROM=Valid from -UI_VALID_UNTIL=Valid until -MEETING_REQUEST=Meeting request -LOG_EXCEPTION_CLOSING_KEYSTORE_INPUT_STREAM=Exception closing keystore input stream -LOG_SUBFOLDER_ACCESS_FORBIDDEN=Subfolder access forbidden to {0} -LOG_FOLDER_NOT_FOUND=Folder {0} not found -LOG_FOLDER_ACCESS_FORBIDDEN=Folder access to {0} forbidden -LOG_FOLDER_ACCESS_ERROR=Folder access to {0} error: {1} -UI_OTP_PASSWORD_PROMPT=One Time (token) Password: -UI_TAB_LOGGING=Logging -UI_OTHER=Other -UI_CALDAV_ALARM_SOUND=Caldav alarm sound: -UI_CALDAV_ALARM_SOUND_HELP=Convert Caldav alarm to sound alarm supported by iCal, e.g. Basso -UI_FORCE_ACTIVESYNC_UPDATE=Force ActiveSync update: -UI_FORCE_ACTIVESYNC_UPDATE_HELP=Force update of Caldav events for ActiveSync connected devices -UI_DEFAULT_DOMAIN=Default domain: -UI_DEFAULT_DOMAIN_HELP=Default windows domain name -UI_USE_SYSTEM_PROXIES=Use system proxy settings : \ No newline at end of file +EXCEPTION_AUTHENTICATION_FAILED=Authentication failed: invalid user or password +EXCEPTION_AUTHENTICATION_FAILED_PASSWORD_EXPIRED=Authentication failed: password expired ? +EXCEPTION_AUTHENTICATION_FAILED_RETRY=Authentication failed: invalid user or password, retry with domain\\user +EXCEPTION_AUTHENTICATION_FORM_NOT_FOUND=Authentication form not found at {0} +EXCEPTION_CONNECTION_FAILED=Unable to connect to OWA at {0}, status code {1}, check configuration +EXCEPTION_DAVMAIL_CONFIGURATION=DavMail configuration exception:\n{0} +EXCEPTION_END_OF_STREAM=End of stream reached reading content +EXCEPTION_EVENT_NOT_FOUND=Calendar event not found +EXCEPTION_EXCHANGE_LOGIN_FAILED=Exchange login exception: {0} +EXCEPTION_SESSION_EXPIRED=Exchange session expired +EXCEPTION_INVALID_CALDAV_REQUEST=Invalid Caldav request: {0} +EXCEPTION_INVALID_CONTENT_LENGTH=Invalid content length: {0} +EXCEPTION_INVALID_CONTENT_TYPE=Invalid content type: {0} +EXCEPTION_INVALID_CREDENTIALS=Invalid credentials +EXCEPTION_INVALID_DATE=Invalid date: {0} +EXCEPTION_INVALID_DATES=Invalid dates: {0} +EXCEPTION_INVALID_FOLDER_URL=Invalid folder URL: {0} +EXCEPTION_INVALID_HEADER=Invalid header: {0}, HTTPS connection to an HTTP listener ? +EXCEPTION_INVALID_ICS_LINE=Invalid ICS line: {0} +EXCEPTION_INVALID_KEEPALIVE=Invalid Keep-Alive: {0} +EXCEPTION_INVALID_MAIL_PATH=Invalid mail path: {0} +EXCEPTION_INVALID_MESSAGE_CONTENT=Invalid message content: {0} +EXCEPTION_INVALID_MESSAGE_URL=Invalid message URL: {0} +EXCEPTION_INVALID_RECIPIENT=Invalid recipient: {0} +EXCEPTION_INVALID_REQUEST=Invalid request: {0} +EXCEPTION_INVALID_SEARCH_PARAMETERS=Invalid search parameters: {0} +EXCEPTION_UNSUPPORTED_PARAMETER=Unsupported parameter: {0} +EXCEPTION_INVALID_PARAMETER=Invalid parameter: {0} +EXCEPTION_NETWORK_DOWN=All network interfaces down or host unreachable ! +EXCEPTION_UNABLE_TO_CREATE_MESSAGE=Unable to create message {0}: {1}{2}{3} +EXCEPTION_UNABLE_TO_GET_FOLDER=Unable to get folder at {0} +EXCEPTION_UNABLE_TO_GET_MAIL_FOLDER=Unable to get mail folder at {0} +EXCEPTION_UNABLE_TO_GET_PROPERTY=Unable to get property {0} +EXCEPTION_UNABLE_TO_MOVE_FOLDER=Unable to move folder, target already exists +EXCEPTION_UNABLE_TO_COPY_MESSAGE=Unable to copy message, target already exists +EXCEPTION_UNABLE_TO_PATCH_MESSAGE=Unable to patch message {0}: {1}{2}{3} +EXCEPTION_UNABLE_TO_UPDATE_MESSAGE=Unable to update message properties +EXCEPTION_CONNECT=Connect exception: {0} {1} +EXCEPTION_UNSUPPORTED_AUTHORIZATION_MODE=Unsupported authorization mode: {0} +EXCEPTION_UNSUPPORTED_VALUE=Unsupported value: {0} +LOG_CLIENT_CLOSED_CONNECTION=Client closed connection +LOG_CLOSE_CONNECTION_ON_TIMEOUT=Closing connection on timeout +LOG_CONNECTION_CLOSED=Connection closed +LOG_CONNECTION_FROM=Connection from {0} on port {1,number,#} +LOG_DAVMAIL_GATEWAY_LISTENING=DavMail Gateway {0} listening on {1} +LOG_DAVMAIL_STARTED=DavMail Gateway started +LOG_ERROR_CLOSING_CONFIG_FILE=Error closing configuration file +LOG_ERROR_LOADING_OSXADAPTER=Error while loading the OSXAdapter +LOG_ERROR_LOADING_SETTINGS=Error loading settings +LOG_ERROR_RETRIEVING_MESSAGE=Error retreiving message +LOG_ERROR_WAITING_FOR_SWT_INIT=Error waiting for SWT init +LOG_EVENT_NOT_AVAILABLE=Event {0} not available: {1} +LOG_EXCEPTION_CLOSING_CLIENT_INPUT_STREAM=Exception closing client input stream +LOG_EXCEPTION_CLOSING_CLIENT_OUTPUT_STREAM=Exception closing client output stream +LOG_EXCEPTION_CLOSING_CLIENT_SOCKET=Exception closing client socket +LOG_EXCEPTION_CLOSING_CONNECTION_ON_TIMEOUT=Exception closing connection on timeout +LOG_EXCEPTION_CLOSING_SERVER_SOCKET=Exception closing server socket +LOG_EXCEPTION_CREATING_SERVER_SOCKET=Exception creating server socket +LOG_EXCEPTION_CREATING_SSL_SERVER_SOCKET=Unable to bind server socket for {0} on port {1,number,#}: Exception creating secured server socket : {2} +LOG_EXCEPTION_GETTING_SOCKET_STREAMS=Exception while getting socket streams +LOG_EXCEPTION_LISTENING_FOR_CONNECTIONS=Exception while listening for connections +LOG_EXCEPTION_SENDING_ERROR_TO_CLIENT=Exception sending error to client +LOG_EXCEPTION_WAITING_SERVER_THREAD_DIE=Exception waiting for server thread to die +LOG_EXECUTE_FOLLOW_REDIRECTS=executeFollowRedirects({0}) +LOG_EXECUTE_FOLLOW_REDIRECTS_COUNT=executeFollowRedirects: {0} redirectCount:{1} +LOG_EXTERNAL_CONNECTION_REFUSED=Connection from external client refused +LOG_FOUND_ACCEPTED_CERTIFICATE=Found permanently accepted certificate, hash {0} +LOG_FOUND_CALENDAR_EVENTS=Found {0} calendar events +LOG_FOUND_CALENDAR_MESSAGES=Found {0} calendar messages +LOG_IMAP_COMMAND={0} on {1} +LOG_INVALID_DEPTH=Invalid depth value: {0} +LOG_INVALID_SETTING_VALUE=Invalid setting value in {0} +LOG_INVALID_URL=Invalid URL: {0} +LOG_JAVA6_DESKTOP_UNAVAILABLE=Java 6 Desktop class not available +LOG_LDAP_IGNORE_FILTER_ATTRIBUTE=Ignoring filter attribute: {0}= {1} +LOG_LDAP_REPLACED_UID_FILTER=Replaced {0} with {1} in uid filter +LOG_LDAP_REQ_ABANDON_SEARCH=LDAP_REQ_ABANDON {0} for search {1} +LOG_LDAP_REQ_UNBIND=LDAP_REQ_UNBIND {0} +LOG_LDAP_REQ_BIND_ANONYMOUS=LDAP_REQ_BIND {0} anonymous +LOG_LDAP_REQ_BIND_USER=LDAP_REQ_BIND {0} {1} +LOG_LDAP_REQ_BIND_SUCCESS=LOG_LDAP_REQ_BIND Success +LOG_LDAP_REQ_BIND_INVALID_CREDENTIALS=LDAP_REQ_BIND Invalid credentials +LOG_LDAP_REQ_SEARCH=LDAP_REQ_SEARCH {0} base={1} scope: {2} sizelimit: {3} timelimit: {4} filter: {5} returning attributes: {6} +LOG_LDAP_REQ_SEARCH_ANONYMOUS_ACCESS_FORBIDDEN=LDAP_REQ_SEARCH {0} Anonymous access to {1} forbidden +LOG_LDAP_REQ_SEARCH_END=LDAP_REQ_SEARCH {0} end +LOG_LDAP_REQ_SEARCH_FOUND_RESULTS=LDAP_REQ_SEARCH {0} found {1} results +LOG_LDAP_REQ_SEARCH_INVALID_DN=LDAP_REQ_SEARCH {0} unrecognized dn {1} +LOG_LDAP_REQ_SEARCH_SEND_PERSON=LDAP_REQ_SEARCH {0} send uid={1}{2} {3} +LOG_LDAP_REQ_SEARCH_SIZE_LIMIT_EXCEEDED=LDAP_REQ_SEARCH {0} size limit exceeded +LOG_LDAP_REQ_SEARCH_SUCCESS=LDAP_REQ_SEARCH {0} success +LOG_LDAP_SEND_COMPUTER_CONTEXT=Sending computer context {0} {1} +LOG_LDAP_SEND_ROOT_DSE=Sending root DSE +LOG_LDAP_UNSUPPORTED_FILTER=Unsupported filter: {0} +LOG_LDAP_UNSUPPORTED_FILTER_ATTRIBUTE=Unsupported filter attribute: {0}= {1} +LOG_LDAP_UNSUPPORTED_FILTER_VALUE=Unsupported filter value +LOG_LDAP_UNSUPPORTED_OPERATION=Unsupported operation: {0} +LOG_LISTING_EVENT=Listing event {0}/{1} +LOG_MESSAGE={0} +LOG_NEW_VERSION_AVAILABLE=A new version ({0}) of DavMail Gateway is available ! +LOG_OPEN_LINK_NOT_SUPPORTED=Open link not supported (tried AWT Desktop and SWT Program) +LOG_PROTOCOL_PORT={0} port {1,number,# } +LOG_READ_CLIENT_AUTHORIZATION=< Authorization: ******** +LOG_READ_CLIENT_AUTH_PLAIN=< AUTH PLAIN ******** +LOG_READ_CLIENT_LINE=< {0} +LOG_READ_CLIENT_LOGIN=< LOGIN ******** +LOG_READ_CLIENT_PASS=< PASS ******** +LOG_READ_CLIENT_PASSWORD=< ******** +LOG_REPORT_EVENT=Report event {0}/{1} +LOG_GATEWAY_INTERRUPTED=Stopping DavMail gateway +LOG_GATEWAY_STOP=DavMail gateway stopped +LOG_SEARCHING_CALENDAR_EVENTS=Searching calendar events at {0} ... +LOG_SEARCHING_CALENDAR_MESSAGES=Searching calendar messages... +LOG_SEARCH_QUERY=Search: {0} +LOG_SEND_CLIENT_MESSAGE=> {0} +LOG_SEND_CLIENT_PREFIX_MESSAGE=> {0}{1} +LOG_SET_SOCKET_TIMEOUT=Set socket timeout to {0} seconds +LOG_SOCKET_BIND_FAILED=Unable to bind server socket for {0} on port {1,number,#}: port not allowed or in use by another process\n +LOG_STARTING_DAVMAIL=Starting DavMail Gateway... +LOG_STOPPING_DAVMAIL=Stopping DavMail Gateway... +LOG_SWT_NOT_AVAILABLE=SWT not available, fallback to JDK 1.6 system tray support +LOG_SYSTEM_TRAY_NOT_AVAILABLE=JDK 1.6 needed for system tray support +LOG_UNABLE_TO_CREATE_ICON=Unable to create icon +LOG_UNABLE_TO_CREATE_LOG_FILE_DIR=Unable to create log file directory +LOG_UNABLE_TO_CREATE_TRAY=Unable to create tray +LOG_UNABLE_TO_GET_PARSEINTWITHTAG=Unable to get BerDecoder.parseIntWithTag method +LOG_UNABLE_TO_GET_RELEASED_VERSION=Unable to get released version +LOG_UNABLE_TO_LOAD_IMAGE=Unable to load image +LOG_UNABLE_TO_LOAD_SETTINGS=Unable to load settings: +LOG_UNABLE_TO_OPEN_LINK=Unable to open link +LOG_UNABLE_TO_SET_ICON_IMAGE=Unable to set JDialog icon image (not available under Java 1.5) +LOG_UNABLE_TO_SET_LOG_FILE_PATH=Unable to set log file path +LOG_UNABLE_TO_SET_LOOK_AND_FEEL=Unable to set look and feel +LOG_UNABLE_TO_SET_SYSTEM_LOOK_AND_FEEL=Unable to set system look and feel +LOG_UNABLE_TO_STORE_SETTINGS=Unable to store settings: +LOG_UNSUPPORTED_REQUEST=Unsupported request: {0} +LOG_INVALID_TIMEZONE=Invalid timezone: {0} +LOG_ACCESS_FORBIDDEN=Access to {0} forbidden: {1} +UI_ABOUT=About... +UI_ABOUT_DAVMAIL=About DavMail Gateway +UI_ABOUT_DAVMAIL_AUTHOR=DavMail Gateway
By Mickaël Guessant

+UI_ACCEPT_CERTIFICATE=DavMail: Accept certificate ? +UI_ALLOW_REMOTE_CONNECTION=Allow Remote Connections: +UI_ALLOW_REMOTE_CONNECTION_HELP=Allow remote connections to the gateway (server mode) +UI_PASSWORD_PROMPT=DavMail: Enter password +UI_ANSWER_NO=n +UI_ANSWER_YES=y +UI_BIND_ADDRESS=Bind address: +UI_BIND_ADDRESS_HELP=Bind only to the specified network address +UI_BUTTON_ACCEPT=Accept +UI_BUTTON_CANCEL=Cancel +UI_BUTTON_DENY=Deny +UI_BUTTON_HELP=Help +UI_BUTTON_OK=OK +UI_BUTTON_SAVE=Save +UI_CALDAV_PORT=Caldav HTTP port: +UI_CALDAV_PORT_HELP=Local Caldav server port to configure in Caldav (calendar) client +UI_CALENDAR_PAST_EVENTS=Calendar past events: +UI_CALENDAR_PAST_EVENTS_HELP=Get events in the past not older than specified days count, leave empty for no limits +UI_CURRENT_VERSION=Current version: {0}
+UI_DAVMAIL_GATEWAY=DavMail Gateway +UI_DAVMAIL_SETTINGS=DavMail Gateway Settings +UI_DELAYS=Delays +UI_DISABLE_UPDATE_CHECK=Disable update check: +UI_DISABLE_UPDATE_CHECK_HELP=Disable DavMail check for new version +UI_ENABLE_PROXY=Enable proxy: +UI_ERROR_WAITING_FOR_CERTIFICATE_CHECK=Error waiting for certificate check +UI_EXIT=Exit +UI_FINGERPRINT=FingerPrint +UI_GATEWAY=Gateway +UI_HELP_INSTRUCTIONS=
Help and setup instructions available at:
http://davmail.sourceforge.net

To send comments or report bugs,
use DavMail Sourceforge trackers
or contact me at mguessan@free.fr +UI_IMAP_PORT=Local IMAP port: +UI_IMAP_PORT_HELP=Local IMAP server port to configure in mail client +UI_ISSUED_BY=Issued by +UI_ISSUED_TO=Issued to +UI_KEEP_DELAY=Trash keep delay: +UI_KEEP_DELAY_HELP=Number of days to keep messages in trash +UI_KEY_PASSWORD=Key password: +UI_KEY_PASSWORD_HELP=SSL key password inside key store +UI_KEY_STORE=Key store: +UI_KEY_STORE_HELP=SSL certificate key store file path +UI_KEY_STORE_PASSWORD=Key store password: +UI_KEY_STORE_PASSWORD_HELP=Key store password +UI_KEY_STORE_TYPE=Key store type: +UI_KEY_STORE_TYPE_HELP=Choose key store type +UI_CLIENT_KEY_STORE=Client key store: +UI_CLIENT_KEY_STORE_HELP=SSL client certificate key store file path +UI_CLIENT_KEY_STORE_PASSWORD=Client key store password: +UI_CLIENT_KEY_STORE_PASSWORD_HELP=Client key store password, leave empty for runtime prompt +UI_CLIENT_KEY_STORE_TYPE=Client key store type: +UI_CLIENT_KEY_STORE_TYPE_HELP=Choose client certificate key store type, choose PKCS11 for smartcard +UI_CLIENT_CERTIFICATE=Client Certificate +UI_PKCS11_LIBRARY=PKCS11 library: +UI_PKCS11_LIBRARY_HELP=PKCS11 (smartcard) library path (.so or .dll) +UI_PKCS11_CONFIG=PKCS11 config: +UI_PKCS11_CONFIG_HELP=Optional additional PKCS11 settings (slot, nssArgs, ...) +UI_LAST_LOG=Last log +UI_LAST_MESSAGE=Last message +UI_LATEST_VERSION=Latest version available: {0}
A new version of DavMail Gateway is available.
Download latest version
+UI_LDAP_PORT=Local LDAP port: +UI_LDAP_PORT_HELP=Local LDAP server port to configure in directory (addresse book) client +UI_LOGGING_LEVELS=Logging levels +UI_LOGS=Logs +UI_LOG_DAVMAIL=DavMail: +UI_LOG_DEFAULT=Default: +UI_LOG_HTTPCLIENT=HttpClient: +UI_LOG_WIRE=Wire: +UI_LOG_FILE_PATH=Log file path: +UI_NETWORK=Network +UI_OWA_URL=OWA (Exchange) URL: +UI_OWA_URL_HELP=Base Outlook Web Access URL +UI_POP_PORT=Local POP port: +UI_POP_PORT_HELP=Local POP server port to configure in mail client +UI_PROXY=Proxy +UI_PROXY_PASSWORD=Proxy password: +UI_PROXY_PORT=Proxy port: +UI_PROXY_SERVER=Proxy server: +UI_PROXY_USER=Proxy user: +UI_SENT_KEEP_DELAY=Sent keep delay: +UI_SENT_KEEP_DELAY_HELP=Number of days to keep messages in sent folder +UI_SERIAL=Serial +UI_SERVER_CERTIFICATE=Server Certificate +UI_SERVER_CERTIFICATE_HASH=Server certificate hash: +UI_SERVER_CERTIFICATE_HASH_HELP=Manually accepted server certificate hash +UI_SETTINGS=Settings... +UI_SHOW_LOGS=Show logs... +UI_SMTP_PORT=Local SMTP port: +UI_SMTP_PORT_HELP=Local SMTP server port to configure in mail client +UI_TAB_ADVANCED=Advanced +UI_TAB_ENCRYPTION=Encryption +UI_TAB_MAIN=Main +UI_TAB_PROXY=Proxy +UI_UNTRUSTED_CERTIFICATE=Server provided an untrusted certificate,\n you can choose to accept or deny access.\n Accept certificate (y/n)? +UI_UNTRUSTED_CERTIFICATE_HTML=Server provided an untrusted certificate,
you can choose to accept or deny access
+UI_VALID_FROM=Valid from +UI_VALID_UNTIL=Valid until +MEETING_REQUEST=Meeting request +LOG_EXCEPTION_CLOSING_KEYSTORE_INPUT_STREAM=Exception closing keystore input stream +LOG_SUBFOLDER_ACCESS_FORBIDDEN=Subfolder access forbidden to {0} +LOG_FOLDER_NOT_FOUND=Folder {0} not found +LOG_FOLDER_ACCESS_FORBIDDEN=Folder access to {0} forbidden +LOG_FOLDER_ACCESS_ERROR=Folder access to {0} error: {1} +UI_OTP_PASSWORD_PROMPT=One Time (token) Password: +UI_TAB_LOGGING=Logging +UI_OTHER=Other +UI_CALDAV_ALARM_SOUND=Caldav alarm sound: +UI_CALDAV_ALARM_SOUND_HELP=Convert Caldav alarm to sound alarm supported by iCal, e.g. Basso +UI_FORCE_ACTIVESYNC_UPDATE=Force ActiveSync update: +UI_FORCE_ACTIVESYNC_UPDATE_HELP=Force update of Caldav events for ActiveSync connected devices +UI_DEFAULT_DOMAIN=Default domain: +UI_DEFAULT_DOMAIN_HELP=Default windows domain name +UI_USE_SYSTEM_PROXIES=Use system proxy settings : +UI_SHOW_STARTUP_BANNER=Display startup banner +UI_SHOW_STARTUP_BANNER_HELP=Whether to show the initial startup notification window or not diff --git a/src/java/davmailmessages_fr.properties b/src/java/davmailmessages_fr.properties index d67bf993..d6ebd18e 100644 --- a/src/java/davmailmessages_fr.properties +++ b/src/java/davmailmessages_fr.properties @@ -248,4 +248,6 @@ UI_DEFAULT_DOMAIN=Domaine par d UI_DEFAULT_DOMAIN_HELP=Nom du domaine windows par défaut EXCEPTION_UNSUPPORTED_PARAMETER=Paramètre non supporté : {0} EXCEPTION_INVALID_PARAMETER=Paramètre invalide : {0} -UI_USE_SYSTEM_PROXIES=Utiliser la configuration système : \ No newline at end of file +UI_USE_SYSTEM_PROXIES=Utiliser la configuration système : +UI_SHOW_STARTUP_BANNER=Notification au lancement +UI_SHOW_STARTUP_BANNER_HELP=Afficher ou non la fenêtre de notification au démarrage \ No newline at end of file diff --git a/src/site/xdoc/gettingstarted.xml b/src/site/xdoc/gettingstarted.xml index 2facf982..5cc9d9fa 100644 --- a/src/site/xdoc/gettingstarted.xml +++ b/src/site/xdoc/gettingstarted.xml @@ -81,6 +81,11 @@ Use double event update to trigger ActiveSync mobile phones sync false + + Display startup banner + Whether to show the initial startup notification window or not + true + Caldav alarm sound Convert Caldav alarm to sound alarm supported by iCal, e.g. Basso. Leave empty for no conversion