Merge patch 3053324: Implement per service SSL flag (patch provided by scairt)

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1396 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-08-29 20:19:35 +00:00
parent aab2e1b682
commit 350fb74b18
10 changed files with 1274 additions and 1204 deletions

View File

@ -1,205 +1,206 @@
/*
* 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.exception.DavMailException;
import davmail.ui.tray.DavGatewayTray;
import javax.net.ServerSocketFactory;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.Inet4Address;
import java.net.ServerSocket;
import java.net.Socket;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
/**
* Generic abstract server common to SMTP and POP3 implementations
*/
public abstract class AbstractServer extends Thread {
private final int port;
private ServerSocket serverSocket;
/**
* Get server protocol name (SMTP, POP, IMAP, ...).
*
* @return server protocol name
*/
public abstract String getProtocolName();
/**
* Server socket TCP port
*
* @return port
*/
public int getPort() {
return port;
}
/**
* Create a ServerSocket to listen for connections.
* Start the thread.
*
* @param name thread name
* @param port tcp socket chosen port
* @param defaultPort tcp socket default port
*/
public AbstractServer(String name, int port, int defaultPort) {
super(name);
setDaemon(true);
if (port == 0) {
this.port = defaultPort;
} else {
this.port = port;
}
}
/**
* Bind server socket on defined port.
*
* @throws DavMailException unable to create server socket
*/
public void bind() throws DavMailException {
String bindAddress = Settings.getProperty("davmail.bindAddress");
String keystoreFile = Settings.getProperty("davmail.ssl.keystoreFile");
ServerSocketFactory serverSocketFactory;
if (keystoreFile == null || keystoreFile.length() == 0) {
serverSocketFactory = ServerSocketFactory.getDefault();
} else {
FileInputStream keyStoreInputStream = null;
try {
keyStoreInputStream = new FileInputStream(keystoreFile);
// keystore for keys and certificates
// keystore and private keys should be password protected...
KeyStore keystore = KeyStore.getInstance(Settings.getProperty("davmail.ssl.keystoreType"));
keystore.load(keyStoreInputStream, Settings.getCharArrayProperty("davmail.ssl.keystorePass"));
// KeyManagerFactory to create key managers
KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
// initialize KMF to work with keystore
kmf.init(keystore, Settings.getCharArrayProperty("davmail.ssl.keyPass"));
// SSLContext is environment for implementing JSSE...
// create ServerSocketFactory
SSLContext sslContext = SSLContext.getInstance("SSLv3");
// initialize sslContext to work with key managers
sslContext.init(kmf.getKeyManagers(), null, null);
// create ServerSocketFactory from sslContext
serverSocketFactory = sslContext.getServerSocketFactory();
} catch (IOException ex) {
throw new DavMailException("LOG_EXCEPTION_CREATING_SSL_SERVER_SOCKET", getProtocolName(), port, ex.getMessage() == null ? ex.toString() : ex.getMessage());
} catch (GeneralSecurityException ex) {
throw new DavMailException("LOG_EXCEPTION_CREATING_SSL_SERVER_SOCKET", getProtocolName(), port, ex.getMessage() == null ? ex.toString() : ex.getMessage());
} finally {
if (keyStoreInputStream != null) {
try {
keyStoreInputStream.close();
} catch (IOException exc) {
DavGatewayTray.warn(new BundleMessage("LOG_EXCEPTION_CLOSING_KEYSTORE_INPUT_STREAM"), exc);
}
}
}
}
try {
// create the server socket
if (bindAddress == null || bindAddress.length() == 0) {
serverSocket = serverSocketFactory.createServerSocket(port);
} else {
serverSocket = serverSocketFactory.createServerSocket(port, 0, Inet4Address.getByName(bindAddress));
}
} catch (IOException e) {
throw new DavMailException("LOG_SOCKET_BIND_FAILED", getProtocolName(), port);
}
}
/**
* The body of the server thread. Loop forever, listening for and
* accepting connections from clients. For each connection,
* create a Connection object to handle communication through the
* new Socket.
*/
@Override
public void run() {
Socket clientSocket = null;
AbstractConnection connection = null;
try {
//noinspection InfiniteLoopStatement
while (true) {
clientSocket = serverSocket.accept();
// set default timeout to 5 minutes
clientSocket.setSoTimeout(300000);
DavGatewayTray.debug(new BundleMessage("LOG_CONNECTION_FROM", clientSocket.getInetAddress(), port));
// only accept localhost connections for security reasons
if (Settings.getBooleanProperty("davmail.allowRemote") ||
clientSocket.getInetAddress().isLoopbackAddress()) {
connection = createConnectionHandler(clientSocket);
connection.start();
} else {
clientSocket.close();
DavGatewayTray.warn(new BundleMessage("LOG_EXTERNAL_CONNECTION_REFUSED"));
}
}
} catch (IOException e) {
// do not warn if exception on socket close (gateway restart)
if (!serverSocket.isClosed()) {
DavGatewayTray.warn(new BundleMessage("LOG_EXCEPTION_LISTENING_FOR_CONNECTIONS"), e);
}
} finally {
try {
if (clientSocket != null) {
clientSocket.close();
}
} catch (IOException e) {
DavGatewayTray.warn(new BundleMessage("LOG_EXCEPTION_CLOSING_CLIENT_SOCKET"), e);
}
if (connection != null) {
connection.close();
}
}
}
/**
* Create a connection handler for the current listener.
*
* @param clientSocket client socket
* @return connection handler
*/
public abstract AbstractConnection createConnectionHandler(Socket clientSocket);
/**
* Close server socket
*/
public void close() {
try {
if (serverSocket != null) {
serverSocket.close();
}
} catch (IOException e) {
DavGatewayTray.warn(new BundleMessage("LOG_EXCEPTION_CLOSING_SERVER_SOCKET"), e);
}
}
}
/*
* 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.exception.DavMailException;
import davmail.ui.tray.DavGatewayTray;
import javax.net.ServerSocketFactory;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.Inet4Address;
import java.net.ServerSocket;
import java.net.Socket;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
/**
* Generic abstract server common to SMTP and POP3 implementations
*/
public abstract class AbstractServer extends Thread {
protected boolean nosslFlag = false; // will cause same behavior as before with unchanged config files
private final int port;
private ServerSocket serverSocket;
/**
* Get server protocol name (SMTP, POP, IMAP, ...).
*
* @return server protocol name
*/
public abstract String getProtocolName();
/**
* Server socket TCP port
*
* @return port
*/
public int getPort() {
return port;
}
/**
* Create a ServerSocket to listen for connections.
* Start the thread.
*
* @param name thread name
* @param port tcp socket chosen port
* @param defaultPort tcp socket default port
*/
public AbstractServer(String name, int port, int defaultPort) {
super(name);
setDaemon(true);
if (port == 0) {
this.port = defaultPort;
} else {
this.port = port;
}
}
/**
* Bind server socket on defined port.
*
* @throws DavMailException unable to create server socket
*/
public void bind() throws DavMailException {
String bindAddress = Settings.getProperty("davmail.bindAddress");
String keystoreFile = Settings.getProperty("davmail.ssl.keystoreFile");
ServerSocketFactory serverSocketFactory;
if (keystoreFile == null || keystoreFile.length() == 0 || nosslFlag) {
serverSocketFactory = ServerSocketFactory.getDefault();
} else {
FileInputStream keyStoreInputStream = null;
try {
keyStoreInputStream = new FileInputStream(keystoreFile);
// keystore for keys and certificates
// keystore and private keys should be password protected...
KeyStore keystore = KeyStore.getInstance(Settings.getProperty("davmail.ssl.keystoreType"));
keystore.load(keyStoreInputStream, Settings.getCharArrayProperty("davmail.ssl.keystorePass"));
// KeyManagerFactory to create key managers
KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
// initialize KMF to work with keystore
kmf.init(keystore, Settings.getCharArrayProperty("davmail.ssl.keyPass"));
// SSLContext is environment for implementing JSSE...
// create ServerSocketFactory
SSLContext sslContext = SSLContext.getInstance("SSLv3");
// initialize sslContext to work with key managers
sslContext.init(kmf.getKeyManagers(), null, null);
// create ServerSocketFactory from sslContext
serverSocketFactory = sslContext.getServerSocketFactory();
} catch (IOException ex) {
throw new DavMailException("LOG_EXCEPTION_CREATING_SSL_SERVER_SOCKET", getProtocolName(), port, ex.getMessage() == null ? ex.toString() : ex.getMessage());
} catch (GeneralSecurityException ex) {
throw new DavMailException("LOG_EXCEPTION_CREATING_SSL_SERVER_SOCKET", getProtocolName(), port, ex.getMessage() == null ? ex.toString() : ex.getMessage());
} finally {
if (keyStoreInputStream != null) {
try {
keyStoreInputStream.close();
} catch (IOException exc) {
DavGatewayTray.warn(new BundleMessage("LOG_EXCEPTION_CLOSING_KEYSTORE_INPUT_STREAM"), exc);
}
}
}
}
try {
// create the server socket
if (bindAddress == null || bindAddress.length() == 0) {
serverSocket = serverSocketFactory.createServerSocket(port);
} else {
serverSocket = serverSocketFactory.createServerSocket(port, 0, Inet4Address.getByName(bindAddress));
}
} catch (IOException e) {
throw new DavMailException("LOG_SOCKET_BIND_FAILED", getProtocolName(), port);
}
}
/**
* The body of the server thread. Loop forever, listening for and
* accepting connections from clients. For each connection,
* create a Connection object to handle communication through the
* new Socket.
*/
@Override
public void run() {
Socket clientSocket = null;
AbstractConnection connection = null;
try {
//noinspection InfiniteLoopStatement
while (true) {
clientSocket = serverSocket.accept();
// set default timeout to 5 minutes
clientSocket.setSoTimeout(300000);
DavGatewayTray.debug(new BundleMessage("LOG_CONNECTION_FROM", clientSocket.getInetAddress(), port));
// only accept localhost connections for security reasons
if (Settings.getBooleanProperty("davmail.allowRemote") ||
clientSocket.getInetAddress().isLoopbackAddress()) {
connection = createConnectionHandler(clientSocket);
connection.start();
} else {
clientSocket.close();
DavGatewayTray.warn(new BundleMessage("LOG_EXTERNAL_CONNECTION_REFUSED"));
}
}
} catch (IOException e) {
// do not warn if exception on socket close (gateway restart)
if (!serverSocket.isClosed()) {
DavGatewayTray.warn(new BundleMessage("LOG_EXCEPTION_LISTENING_FOR_CONNECTIONS"), e);
}
} finally {
try {
if (clientSocket != null) {
clientSocket.close();
}
} catch (IOException e) {
DavGatewayTray.warn(new BundleMessage("LOG_EXCEPTION_CLOSING_CLIENT_SOCKET"), e);
}
if (connection != null) {
connection.close();
}
}
}
/**
* Create a connection handler for the current listener.
*
* @param clientSocket client socket
* @return connection handler
*/
public abstract AbstractConnection createConnectionHandler(Socket clientSocket);
/**
* Close server socket
*/
public void close() {
try {
if (serverSocket != null) {
serverSocket.close();
}
} catch (IOException e) {
DavGatewayTray.warn(new BundleMessage("LOG_EXCEPTION_CLOSING_SERVER_SOCKET"), e);
}
}
}

View File

@ -1,460 +1,465 @@
/*
* 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.ui.tray.DavGatewayTray;
import org.apache.log4j.*;
import java.io.*;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Properties;
import java.util.TreeSet;
/**
* Settings facade.
* DavMail settings are stored in the .davmail.properties file in current
* user home directory or in the file specified on the command line.
*/
public final class Settings {
private Settings() {
}
private static final Properties SETTINGS = new Properties() {
@Override
public synchronized Enumeration<Object> keys() {
Enumeration keysEnumeration = super.keys();
TreeSet<String> sortedKeySet = new TreeSet<String>();
while (keysEnumeration.hasMoreElements()) {
sortedKeySet.add((String) keysEnumeration.nextElement());
}
final Iterator<String> sortedKeysIterator = sortedKeySet.iterator();
return new Enumeration<Object>() {
public boolean hasMoreElements() {
return sortedKeysIterator.hasNext();
}
public Object nextElement() {
return sortedKeysIterator.next();
}
};
}
};
private static String configFilePath;
private static boolean isFirstStart;
/**
* Set config file path (from command line parameter).
*
* @param path davmail properties file path
*/
public static synchronized void setConfigFilePath(String path) {
configFilePath = path;
}
/**
* Detect first launch (properties file does not exist).
*
* @return true if this is the first start with the current file path
*/
public static synchronized boolean isFirstStart() {
return isFirstStart;
}
/**
* Load properties from provided stream (used in webapp mode).
*
* @param inputStream properties stream
* @throws IOException on error
*/
public static synchronized void load(InputStream inputStream) throws IOException {
SETTINGS.load(inputStream);
updateLoggingConfig();
}
/**
* Load properties from current file path (command line or default).
*/
public static synchronized void load() {
FileInputStream fileInputStream = null;
try {
if (configFilePath == null) {
//noinspection AccessOfSystemProperties
configFilePath = System.getProperty("user.home") + "/.davmail.properties";
}
File configFile = new File(configFilePath);
if (configFile.exists()) {
fileInputStream = new FileInputStream(configFile);
load(fileInputStream);
} else {
isFirstStart = true;
// first start : set default values, ports above 1024 for unix/linux
setDefaultSettings();
save();
}
} catch (IOException e) {
DavGatewayTray.error(new BundleMessage("LOG_UNABLE_TO_LOAD_SETTINGS"), e);
} finally {
if (fileInputStream != null) {
try {
fileInputStream.close();
} catch (IOException e) {
DavGatewayTray.debug(new BundleMessage("LOG_ERROR_CLOSING_CONFIG_FILE"), e);
}
}
}
updateLoggingConfig();
}
/**
* Set all settings to default values.
* Ports above 1024 for unix/linux
*/
public static void setDefaultSettings() {
SETTINGS.put("davmail.url", "https://exchangeServer/exchange/");
SETTINGS.put("davmail.popPort", "1110");
SETTINGS.put("davmail.imapPort", "1143");
SETTINGS.put("davmail.smtpPort", "1025");
SETTINGS.put("davmail.caldavPort", "1080");
SETTINGS.put("davmail.ldapPort", "1389");
SETTINGS.put("davmail.keepDelay", "30");
SETTINGS.put("davmail.sentKeepDelay", "90");
SETTINGS.put("davmail.caldavPastDelay", "90");
SETTINGS.put("davmail.imapIdleDelay", "");
SETTINGS.put("davmail.allowRemote", Boolean.FALSE.toString());
SETTINGS.put("davmail.bindAddress", "");
SETTINGS.put("davmail.useSystemProxies", Boolean.TRUE.toString());
SETTINGS.put("davmail.enableProxy", Boolean.FALSE.toString());
SETTINGS.put("davmail.proxyHost", "");
SETTINGS.put("davmail.proxyPort", "");
SETTINGS.put("davmail.proxyUser", "");
SETTINGS.put("davmail.proxyPassword", "");
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.showStartupBanner", Boolean.TRUE.toString());
SETTINGS.put("davmail.imapAutoExpunge", Boolean.TRUE.toString());
SETTINGS.put("davmail.ssl.keystoreType", "");
SETTINGS.put("davmail.ssl.keystoreFile", "");
SETTINGS.put("davmail.ssl.keystorePass", "");
SETTINGS.put("davmail.ssl.keyPass", "");
SETTINGS.put("davmail.ssl.clientKeystoreType", "");
SETTINGS.put("davmail.ssl.clientKeystoreFile", "");
SETTINGS.put("davmail.ssl.clientKeystorePass", "");
SETTINGS.put("davmail.ssl.pkcs11Library", "");
SETTINGS.put("davmail.ssl.pkcs11Config", "");
// logging
SETTINGS.put("log4j.rootLogger", Level.WARN.toString());
SETTINGS.put("log4j.logger.davmail", Level.DEBUG.toString());
SETTINGS.put("log4j.logger.httpclient.wire", Level.WARN.toString());
SETTINGS.put("log4j.logger.org.apache.commons.httpclient", Level.WARN.toString());
SETTINGS.put("davmail.logFilePath", "");
}
/**
* Return DavMail log file path
*
* @return full log file path
*/
public static String getLogFilePath() {
String logFilePath = Settings.getProperty("davmail.logFilePath");
// use default log file path on Mac OS X
if ((logFilePath == null || logFilePath.length() == 0)) {
if (System.getProperty("os.name").toLowerCase().startsWith("mac os x")) {
logFilePath = System.getProperty("user.home") + "/Library/Logs/DavMail/davmail.log";
}
} else {
File logFile = new File(logFilePath);
if (logFile.isDirectory()) {
logFilePath += "/davmail.log";
}
}
return logFilePath;
}
/**
* Return DavMail log file directory
*
* @return full log file directory
*/
public static String getLogFileDirectory() {
String logFilePath = getLogFilePath();
if (logFilePath == null || logFilePath.length() == 0) {
return ".";
}
int lastSlashIndex = logFilePath.lastIndexOf('/');
if (lastSlashIndex == -1) {
lastSlashIndex = logFilePath.lastIndexOf('\\');
}
if (lastSlashIndex >= 0) {
return logFilePath.substring(0, lastSlashIndex);
} else {
return ".";
}
}
/**
* Update Log4J config from settings.
*/
private static void updateLoggingConfig() {
String logFilePath = getLogFilePath();
Logger rootLogger = Logger.getRootLogger();
try {
if (logFilePath != null && logFilePath.length() > 0) {
File logFile = new File(logFilePath);
// create parent directory if needed
File logFileDir = logFile.getParentFile();
if (logFileDir != null && !logFileDir.exists()) {
if (!logFileDir.mkdirs()) {
DavGatewayTray.error(new BundleMessage("LOG_UNABLE_TO_CREATE_LOG_FILE_DIR"));
throw new IOException();
}
}
} else {
logFilePath = "davmail.log";
}
// Build file appender
RollingFileAppender fileAppender = ((RollingFileAppender) rootLogger.getAppender("FileAppender"));
if (fileAppender == null) {
String logFileSize = Settings.getProperty("davmail.logFileSize");
if (logFileSize == null || logFileSize.length() == 0) {
logFileSize = "1MB";
}
fileAppender = new RollingFileAppender();
fileAppender.setName("FileAppender");
fileAppender.setMaxBackupIndex(2);
fileAppender.setMaxFileSize(logFileSize);
fileAppender.setEncoding("UTF-8");
fileAppender.setLayout(new PatternLayout("%d{ISO8601} %-5p [%t] %c %x - %m%n"));
}
fileAppender.setFile(logFilePath, true, false, 8192);
rootLogger.addAppender(fileAppender);
// disable ConsoleAppender in gui mode
if (!Settings.getBooleanProperty("davmail.server")) {
ConsoleAppender consoleAppender = (ConsoleAppender)rootLogger.getAppender("ConsoleAppender");
if (consoleAppender != null) {
consoleAppender.setThreshold(Level.OFF);
}
}
} catch (IOException e) {
DavGatewayTray.error(new BundleMessage("LOG_UNABLE_TO_SET_LOG_FILE_PATH"));
}
// update logging levels
Settings.setLoggingLevel("rootLogger", Settings.getLoggingLevel("rootLogger"));
Settings.setLoggingLevel("davmail", Settings.getLoggingLevel("davmail"));
Settings.setLoggingLevel("httpclient.wire", Settings.getLoggingLevel("httpclient.wire"));
Settings.setLoggingLevel("org.apache.commons.httpclient", Settings.getLoggingLevel("org.apache.commons.httpclient"));
}
/**
* Save settings in current file path (command line or default).
*/
public static synchronized void save() {
FileOutputStream fileOutputStream = null;
try {
fileOutputStream = new FileOutputStream(configFilePath);
SETTINGS.store(fileOutputStream, "DavMail settings");
} catch (IOException e) {
DavGatewayTray.error(new BundleMessage("LOG_UNABLE_TO_STORE_SETTINGS"), e);
} finally {
if (fileOutputStream != null) {
try {
fileOutputStream.close();
} catch (IOException e) {
DavGatewayTray.debug(new BundleMessage("LOG_ERROR_CLOSING_CONFIG_FILE"), e);
}
}
}
updateLoggingConfig();
}
/**
* Get a property value as String.
*
* @param property property name
* @return property value
*/
public static synchronized String getProperty(String property) {
String value = SETTINGS.getProperty(property);
// return null on empty value
if (value != null && value.length() == 0) {
value = null;
}
return value;
}
/**
* Get a property value as char[].
*
* @param property property name
* @return property value
*/
public static synchronized char[] getCharArrayProperty(String property) {
String propertyValue = Settings.getProperty(property);
char[] value = null;
if (propertyValue != null) {
value = propertyValue.toCharArray();
}
return value;
}
/**
* Set a property value.
*
* @param property property name
* @param value property value
*/
public static synchronized void setProperty(String property, String value) {
if (value != null) {
SETTINGS.setProperty(property, value);
} else {
SETTINGS.setProperty(property, "");
}
}
/**
* Get a property value as int.
*
* @param property property name
* @return property value
*/
public static synchronized int getIntProperty(String property) {
return getIntProperty(property, 0);
}
/**
* Get a property value as int, return default value if null.
*
* @param property property name
* @param defaultValue default property value
* @return property value
*/
public static synchronized int getIntProperty(String property, int defaultValue) {
int value = defaultValue;
try {
String propertyValue = SETTINGS.getProperty(property);
if (propertyValue != null && propertyValue.length() > 0) {
value = Integer.parseInt(propertyValue);
}
} catch (NumberFormatException e) {
DavGatewayTray.error(new BundleMessage("LOG_INVALID_SETTING_VALUE", property), e);
}
return value;
}
/**
* Get a property value as boolean.
*
* @param property property name
* @return property value
*/
public static synchronized boolean getBooleanProperty(String property) {
String propertyValue = SETTINGS.getProperty(property);
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.
*
* @param category logging category
* @return prefix
*/
private static String getLoggingPrefix(String category) {
String prefix;
if ("rootLogger".equals(category)) {
prefix = "log4j.";
} else {
prefix = "log4j.logger.";
}
return prefix;
}
/**
* Return Log4J logging level for the category.
*
* @param category logging category
* @return logging level
*/
public static synchronized Level getLoggingLevel(String category) {
String prefix = getLoggingPrefix(category);
String currentValue = SETTINGS.getProperty(prefix + category);
if (currentValue != null && currentValue.length() > 0) {
return Level.toLevel(currentValue);
} else if ("rootLogger".equals(category)) {
return Logger.getRootLogger().getLevel();
} else {
return Logger.getLogger(category).getLevel();
}
}
/**
* Set Log4J logging level for the category
*
* @param category logging category
* @param level logging level
*/
public static synchronized void setLoggingLevel(String category, Level level) {
String prefix = getLoggingPrefix(category);
SETTINGS.setProperty(prefix + category, level.toString());
if ("rootLogger".equals(category)) {
Logger.getRootLogger().setLevel(level);
} else {
Logger.getLogger(category).setLevel(level);
}
}
/**
* Change and save a single property.
*
* @param property property name
* @param value property value
*/
public static synchronized void saveProperty(String property, String value) {
Settings.load();
Settings.setProperty(property, value);
Settings.save();
}
}
/*
* 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.ui.tray.DavGatewayTray;
import org.apache.log4j.*;
import java.io.*;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Properties;
import java.util.TreeSet;
/**
* Settings facade.
* DavMail settings are stored in the .davmail.properties file in current
* user home directory or in the file specified on the command line.
*/
public final class Settings {
private Settings() {
}
private static final Properties SETTINGS = new Properties() {
@Override
public synchronized Enumeration<Object> keys() {
Enumeration keysEnumeration = super.keys();
TreeSet<String> sortedKeySet = new TreeSet<String>();
while (keysEnumeration.hasMoreElements()) {
sortedKeySet.add((String) keysEnumeration.nextElement());
}
final Iterator<String> sortedKeysIterator = sortedKeySet.iterator();
return new Enumeration<Object>() {
public boolean hasMoreElements() {
return sortedKeysIterator.hasNext();
}
public Object nextElement() {
return sortedKeysIterator.next();
}
};
}
};
private static String configFilePath;
private static boolean isFirstStart;
/**
* Set config file path (from command line parameter).
*
* @param path davmail properties file path
*/
public static synchronized void setConfigFilePath(String path) {
configFilePath = path;
}
/**
* Detect first launch (properties file does not exist).
*
* @return true if this is the first start with the current file path
*/
public static synchronized boolean isFirstStart() {
return isFirstStart;
}
/**
* Load properties from provided stream (used in webapp mode).
*
* @param inputStream properties stream
* @throws IOException on error
*/
public static synchronized void load(InputStream inputStream) throws IOException {
SETTINGS.load(inputStream);
updateLoggingConfig();
}
/**
* Load properties from current file path (command line or default).
*/
public static synchronized void load() {
FileInputStream fileInputStream = null;
try {
if (configFilePath == null) {
//noinspection AccessOfSystemProperties
configFilePath = System.getProperty("user.home") + "/.davmail.properties";
}
File configFile = new File(configFilePath);
if (configFile.exists()) {
fileInputStream = new FileInputStream(configFile);
load(fileInputStream);
} else {
isFirstStart = true;
// first start : set default values, ports above 1024 for unix/linux
setDefaultSettings();
save();
}
} catch (IOException e) {
DavGatewayTray.error(new BundleMessage("LOG_UNABLE_TO_LOAD_SETTINGS"), e);
} finally {
if (fileInputStream != null) {
try {
fileInputStream.close();
} catch (IOException e) {
DavGatewayTray.debug(new BundleMessage("LOG_ERROR_CLOSING_CONFIG_FILE"), e);
}
}
}
updateLoggingConfig();
}
/**
* Set all settings to default values.
* Ports above 1024 for unix/linux
*/
public static void setDefaultSettings() {
SETTINGS.put("davmail.url", "https://exchangeServer/exchange/");
SETTINGS.put("davmail.popPort", "1110");
SETTINGS.put("davmail.imapPort", "1143");
SETTINGS.put("davmail.smtpPort", "1025");
SETTINGS.put("davmail.caldavPort", "1080");
SETTINGS.put("davmail.ldapPort", "1389");
SETTINGS.put("davmail.keepDelay", "30");
SETTINGS.put("davmail.sentKeepDelay", "90");
SETTINGS.put("davmail.caldavPastDelay", "90");
SETTINGS.put("davmail.imapIdleDelay", "");
SETTINGS.put("davmail.allowRemote", Boolean.FALSE.toString());
SETTINGS.put("davmail.bindAddress", "");
SETTINGS.put("davmail.useSystemProxies", Boolean.TRUE.toString());
SETTINGS.put("davmail.enableProxy", Boolean.FALSE.toString());
SETTINGS.put("davmail.proxyHost", "");
SETTINGS.put("davmail.proxyPort", "");
SETTINGS.put("davmail.proxyUser", "");
SETTINGS.put("davmail.proxyPassword", "");
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.showStartupBanner", Boolean.TRUE.toString());
SETTINGS.put("davmail.imapAutoExpunge", Boolean.TRUE.toString());
SETTINGS.put("davmail.ssl.keystoreType", "");
SETTINGS.put("davmail.ssl.keystoreFile", "");
SETTINGS.put("davmail.ssl.keystorePass", "");
SETTINGS.put("davmail.ssl.keyPass", "");
SETTINGS.put("davmail.ssl.clientKeystoreType", "");
SETTINGS.put("davmail.ssl.clientKeystoreFile", "");
SETTINGS.put("davmail.ssl.clientKeystorePass", "");
SETTINGS.put("davmail.ssl.pkcs11Library", "");
SETTINGS.put("davmail.ssl.pkcs11Config", "");
SETTINGS.put("davmail.ssl.nosecurepop", Boolean.FALSE.toString());
SETTINGS.put("davmail.ssl.nosecureimap", Boolean.FALSE.toString());
SETTINGS.put("davmail.ssl.nosecuresmtp", Boolean.FALSE.toString());
SETTINGS.put("davmail.ssl.nosecurecaldav", Boolean.FALSE.toString());
SETTINGS.put("davmail.ssl.nosecureldap", Boolean.FALSE.toString());
// logging
SETTINGS.put("log4j.rootLogger", Level.WARN.toString());
SETTINGS.put("log4j.logger.davmail", Level.DEBUG.toString());
SETTINGS.put("log4j.logger.httpclient.wire", Level.WARN.toString());
SETTINGS.put("log4j.logger.org.apache.commons.httpclient", Level.WARN.toString());
SETTINGS.put("davmail.logFilePath", "");
}
/**
* Return DavMail log file path
*
* @return full log file path
*/
public static String getLogFilePath() {
String logFilePath = Settings.getProperty("davmail.logFilePath");
// use default log file path on Mac OS X
if ((logFilePath == null || logFilePath.length() == 0)) {
if (System.getProperty("os.name").toLowerCase().startsWith("mac os x")) {
logFilePath = System.getProperty("user.home") + "/Library/Logs/DavMail/davmail.log";
}
} else {
File logFile = new File(logFilePath);
if (logFile.isDirectory()) {
logFilePath += "/davmail.log";
}
}
return logFilePath;
}
/**
* Return DavMail log file directory
*
* @return full log file directory
*/
public static String getLogFileDirectory() {
String logFilePath = getLogFilePath();
if (logFilePath == null || logFilePath.length() == 0) {
return ".";
}
int lastSlashIndex = logFilePath.lastIndexOf('/');
if (lastSlashIndex == -1) {
lastSlashIndex = logFilePath.lastIndexOf('\\');
}
if (lastSlashIndex >= 0) {
return logFilePath.substring(0, lastSlashIndex);
} else {
return ".";
}
}
/**
* Update Log4J config from settings.
*/
private static void updateLoggingConfig() {
String logFilePath = getLogFilePath();
Logger rootLogger = Logger.getRootLogger();
try {
if (logFilePath != null && logFilePath.length() > 0) {
File logFile = new File(logFilePath);
// create parent directory if needed
File logFileDir = logFile.getParentFile();
if (logFileDir != null && !logFileDir.exists()) {
if (!logFileDir.mkdirs()) {
DavGatewayTray.error(new BundleMessage("LOG_UNABLE_TO_CREATE_LOG_FILE_DIR"));
throw new IOException();
}
}
} else {
logFilePath = "davmail.log";
}
// Build file appender
RollingFileAppender fileAppender = ((RollingFileAppender) rootLogger.getAppender("FileAppender"));
if (fileAppender == null) {
String logFileSize = Settings.getProperty("davmail.logFileSize");
if (logFileSize == null || logFileSize.length() == 0) {
logFileSize = "1MB";
}
fileAppender = new RollingFileAppender();
fileAppender.setName("FileAppender");
fileAppender.setMaxBackupIndex(2);
fileAppender.setMaxFileSize(logFileSize);
fileAppender.setEncoding("UTF-8");
fileAppender.setLayout(new PatternLayout("%d{ISO8601} %-5p [%t] %c %x - %m%n"));
}
fileAppender.setFile(logFilePath, true, false, 8192);
rootLogger.addAppender(fileAppender);
// disable ConsoleAppender in gui mode
if (!Settings.getBooleanProperty("davmail.server")) {
ConsoleAppender consoleAppender = (ConsoleAppender)rootLogger.getAppender("ConsoleAppender");
if (consoleAppender != null) {
consoleAppender.setThreshold(Level.OFF);
}
}
} catch (IOException e) {
DavGatewayTray.error(new BundleMessage("LOG_UNABLE_TO_SET_LOG_FILE_PATH"));
}
// update logging levels
Settings.setLoggingLevel("rootLogger", Settings.getLoggingLevel("rootLogger"));
Settings.setLoggingLevel("davmail", Settings.getLoggingLevel("davmail"));
Settings.setLoggingLevel("httpclient.wire", Settings.getLoggingLevel("httpclient.wire"));
Settings.setLoggingLevel("org.apache.commons.httpclient", Settings.getLoggingLevel("org.apache.commons.httpclient"));
}
/**
* Save settings in current file path (command line or default).
*/
public static synchronized void save() {
FileOutputStream fileOutputStream = null;
try {
fileOutputStream = new FileOutputStream(configFilePath);
SETTINGS.store(fileOutputStream, "DavMail settings");
} catch (IOException e) {
DavGatewayTray.error(new BundleMessage("LOG_UNABLE_TO_STORE_SETTINGS"), e);
} finally {
if (fileOutputStream != null) {
try {
fileOutputStream.close();
} catch (IOException e) {
DavGatewayTray.debug(new BundleMessage("LOG_ERROR_CLOSING_CONFIG_FILE"), e);
}
}
}
updateLoggingConfig();
}
/**
* Get a property value as String.
*
* @param property property name
* @return property value
*/
public static synchronized String getProperty(String property) {
String value = SETTINGS.getProperty(property);
// return null on empty value
if (value != null && value.length() == 0) {
value = null;
}
return value;
}
/**
* Get a property value as char[].
*
* @param property property name
* @return property value
*/
public static synchronized char[] getCharArrayProperty(String property) {
String propertyValue = Settings.getProperty(property);
char[] value = null;
if (propertyValue != null) {
value = propertyValue.toCharArray();
}
return value;
}
/**
* Set a property value.
*
* @param property property name
* @param value property value
*/
public static synchronized void setProperty(String property, String value) {
if (value != null) {
SETTINGS.setProperty(property, value);
} else {
SETTINGS.setProperty(property, "");
}
}
/**
* Get a property value as int.
*
* @param property property name
* @return property value
*/
public static synchronized int getIntProperty(String property) {
return getIntProperty(property, 0);
}
/**
* Get a property value as int, return default value if null.
*
* @param property property name
* @param defaultValue default property value
* @return property value
*/
public static synchronized int getIntProperty(String property, int defaultValue) {
int value = defaultValue;
try {
String propertyValue = SETTINGS.getProperty(property);
if (propertyValue != null && propertyValue.length() > 0) {
value = Integer.parseInt(propertyValue);
}
} catch (NumberFormatException e) {
DavGatewayTray.error(new BundleMessage("LOG_INVALID_SETTING_VALUE", property), e);
}
return value;
}
/**
* Get a property value as boolean.
*
* @param property property name
* @return property value
*/
public static synchronized boolean getBooleanProperty(String property) {
String propertyValue = SETTINGS.getProperty(property);
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.
*
* @param category logging category
* @return prefix
*/
private static String getLoggingPrefix(String category) {
String prefix;
if ("rootLogger".equals(category)) {
prefix = "log4j.";
} else {
prefix = "log4j.logger.";
}
return prefix;
}
/**
* Return Log4J logging level for the category.
*
* @param category logging category
* @return logging level
*/
public static synchronized Level getLoggingLevel(String category) {
String prefix = getLoggingPrefix(category);
String currentValue = SETTINGS.getProperty(prefix + category);
if (currentValue != null && currentValue.length() > 0) {
return Level.toLevel(currentValue);
} else if ("rootLogger".equals(category)) {
return Logger.getRootLogger().getLevel();
} else {
return Logger.getLogger(category).getLevel();
}
}
/**
* Set Log4J logging level for the category
*
* @param category logging category
* @param level logging level
*/
public static synchronized void setLoggingLevel(String category, Level level) {
String prefix = getLoggingPrefix(category);
SETTINGS.setProperty(prefix + category, level.toString());
if ("rootLogger".equals(category)) {
Logger.getRootLogger().setLevel(level);
} else {
Logger.getLogger(category).setLevel(level);
}
}
/**
* Change and save a single property.
*
* @param property property name
* @param value property value
*/
public static synchronized void saveProperty(String property, String value) {
Settings.load();
Settings.setProperty(property, value);
Settings.save();
}
}

View File

@ -1,54 +1,56 @@
/*
* 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.caldav;
import davmail.AbstractConnection;
import davmail.AbstractServer;
import java.net.Socket;
/**
* Calendar server, handle HTTP Caldav requests.
*/
public class CaldavServer extends AbstractServer {
/**
* Default HTTP Caldav port
*/
public static final int DEFAULT_PORT = 80;
/**
* Create a ServerSocket to listen for connections.
* Start the thread.
*
* @param port pop listen port, 80 if not defined (0)
*/
public CaldavServer(int port) {
super(CaldavServer.class.getName(), port, CaldavServer.DEFAULT_PORT);
}
@Override
public String getProtocolName() {
return "CALDAV";
}
@Override
public AbstractConnection createConnectionHandler(Socket clientSocket) {
return new CaldavConnection(clientSocket);
}
/*
* 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.caldav;
import davmail.AbstractConnection;
import davmail.AbstractServer;
import davmail.Settings;
import java.net.Socket;
/**
* Calendar server, handle HTTP Caldav requests.
*/
public class CaldavServer extends AbstractServer {
/**
* Default HTTP Caldav port
*/
public static final int DEFAULT_PORT = 80;
/**
* Create a ServerSocket to listen for connections.
* Start the thread.
*
* @param port pop listen port, 80 if not defined (0)
*/
public CaldavServer(int port) {
super(CaldavServer.class.getName(), port, CaldavServer.DEFAULT_PORT);
nosslFlag = Settings.getBooleanProperty("davmail.ssl.nosecurecaldav");
}
@Override
public String getProtocolName() {
return "CALDAV";
}
@Override
public AbstractConnection createConnectionHandler(Socket clientSocket) {
return new CaldavConnection(clientSocket);
}
}

View File

@ -1,56 +1,58 @@
/*
* 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.imap;
import davmail.AbstractConnection;
import davmail.AbstractServer;
import java.net.Socket;
/**
* Pop3 server
*/
public class ImapServer extends AbstractServer {
/**
* Default IMAP port
*/
public static final int DEFAULT_PORT = 143;
/**
* Create a ServerSocket to listen for connections.
* Start the thread.
*
* @param port imap listen port, 143 if not defined (0)
*/
public ImapServer(int port) {
super(ImapServer.class.getName(), port, ImapServer.DEFAULT_PORT);
}
@Override
public String getProtocolName() {
return "IMAP";
}
@Override
public AbstractConnection createConnectionHandler(Socket clientSocket) {
return new ImapConnection(clientSocket);
}
}
/*
* 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.imap;
import davmail.AbstractConnection;
import davmail.AbstractServer;
import davmail.Settings;
import java.net.Socket;
/**
* Pop3 server
*/
public class ImapServer extends AbstractServer {
/**
* Default IMAP port
*/
public static final int DEFAULT_PORT = 143;
/**
* Create a ServerSocket to listen for connections.
* Start the thread.
*
* @param port imap listen port, 143 if not defined (0)
*/
public ImapServer(int port) {
super(ImapServer.class.getName(), port, ImapServer.DEFAULT_PORT);
nosslFlag = Settings.getBooleanProperty("davmail.ssl.nosecureimap");
}
@Override
public String getProtocolName() {
return "IMAP";
}
@Override
public AbstractConnection createConnectionHandler(Socket clientSocket) {
return new ImapConnection(clientSocket);
}
}

View File

@ -1,54 +1,56 @@
/*
* 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.ldap;
import davmail.AbstractConnection;
import davmail.AbstractServer;
import java.net.Socket;
/**
* LDAP server, handle LDAP directory requests.
*/
public class LdapServer extends AbstractServer {
/**
* Default LDAP port
*/
public static final int DEFAULT_PORT = 389;
/**
* Create a ServerSocket to listen for connections.
* Start the thread.
*
* @param port pop listen port, 389 if not defined (0)
*/
public LdapServer(int port) {
super(LdapServer.class.getName(), port, LdapServer.DEFAULT_PORT);
}
@Override
public String getProtocolName() {
return "LDAP";
}
@Override
public AbstractConnection createConnectionHandler(Socket clientSocket) {
return new LdapConnection(clientSocket);
}
/*
* 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.ldap;
import davmail.AbstractConnection;
import davmail.AbstractServer;
import davmail.Settings;
import java.net.Socket;
/**
* LDAP server, handle LDAP directory requests.
*/
public class LdapServer extends AbstractServer {
/**
* Default LDAP port
*/
public static final int DEFAULT_PORT = 389;
/**
* Create a ServerSocket to listen for connections.
* Start the thread.
*
* @param port pop listen port, 389 if not defined (0)
*/
public LdapServer(int port) {
super(LdapServer.class.getName(), port, LdapServer.DEFAULT_PORT);
nosslFlag = Settings.getBooleanProperty("davmail.ssl.nosecureldap");
}
@Override
public String getProtocolName() {
return "LDAP";
}
@Override
public AbstractConnection createConnectionHandler(Socket clientSocket) {
return new LdapConnection(clientSocket);
}
}

View File

@ -1,55 +1,57 @@
/*
* 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.pop;
import davmail.AbstractConnection;
import davmail.AbstractServer;
import java.net.Socket;
/**
* Pop3 server
*/
public class PopServer extends AbstractServer {
/**
* Default POP port
*/
public static final int DEFAULT_PORT = 110;
/**
* Create a ServerSocket to listen for connections.
* Start the thread.
* @param port pop listen port, 110 if not defined (0)
*/
public PopServer(int port) {
super(PopServer.class.getName(), port, PopServer.DEFAULT_PORT);
}
@Override
public String getProtocolName() {
return "POP";
}
@Override
public AbstractConnection createConnectionHandler(Socket clientSocket) {
return new PopConnection(clientSocket);
}
}
/*
* 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.pop;
import davmail.AbstractConnection;
import davmail.AbstractServer;
import davmail.Settings;
import java.net.Socket;
/**
* Pop3 server
*/
public class PopServer extends AbstractServer {
/**
* Default POP port
*/
public static final int DEFAULT_PORT = 110;
/**
* Create a ServerSocket to listen for connections.
* Start the thread.
* @param port pop listen port, 110 if not defined (0)
*/
public PopServer(int port) {
super(PopServer.class.getName(), port, PopServer.DEFAULT_PORT);
nosslFlag = Settings.getBooleanProperty("davmail.ssl.nosecurepop");
}
@Override
public String getProtocolName() {
return "POP";
}
@Override
public AbstractConnection createConnectionHandler(Socket clientSocket) {
return new PopConnection(clientSocket);
}
}

View File

@ -1,54 +1,56 @@
/*
* 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.smtp;
import davmail.AbstractConnection;
import davmail.AbstractServer;
import java.net.Socket;
/**
* SMTP server, handle message send requests.
*/
public class SmtpServer extends AbstractServer {
/**
* Default SMTP Caldav port
*/
public static final int DEFAULT_PORT = 25;
/**
* Create a ServerSocket to listen for connections.
* Start the thread.
* @param port smtp port
*/
public SmtpServer(int port) {
super(SmtpServer.class.getName(), port, SmtpServer.DEFAULT_PORT);
}
@Override
public String getProtocolName() {
return "SMTP";
}
@Override
public AbstractConnection createConnectionHandler(Socket clientSocket) {
return new SmtpConnection(clientSocket);
}
}
/*
* 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.smtp;
import davmail.AbstractConnection;
import davmail.AbstractServer;
import davmail.Settings;
import java.net.Socket;
/**
* SMTP server, handle message send requests.
*/
public class SmtpServer extends AbstractServer {
/**
* Default SMTP Caldav port
*/
public static final int DEFAULT_PORT = 25;
/**
* Create a ServerSocket to listen for connections.
* Start the thread.
* @param port smtp port
*/
public SmtpServer(int port) {
super(SmtpServer.class.getName(), port, SmtpServer.DEFAULT_PORT);
nosslFlag = Settings.getBooleanProperty("davmail.ssl.nosecuresmtp");
}
@Override
public String getProtocolName() {
return "SMTP";
}
@Override
public AbstractConnection createConnectionHandler(Socket clientSocket) {
return new SmtpConnection(clientSocket);
}
}

View File

@ -21,11 +21,13 @@ package davmail.ui;
import davmail.BundleMessage;
import davmail.DavGateway;
import davmail.Settings;
import davmail.ui.tray.DavGatewayTray;
import davmail.ui.browser.DesktopBrowser;
import davmail.ui.tray.DavGatewayTray;
import org.apache.log4j.Level;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -41,14 +43,19 @@ public class SettingsFrame extends JFrame {
protected JTextField urlField;
protected JTextField popPortField;
protected JCheckBox popPortCheckBox;
protected JCheckBox popNoSSLCheckBox;
protected JTextField imapPortField;
protected JCheckBox imapPortCheckBox;
protected JCheckBox imapNoSSLCheckBox;
protected JTextField smtpPortField;
protected JCheckBox smtpPortCheckBox;
protected JCheckBox smtpNoSSLCheckBox;
protected JTextField caldavPortField;
protected JCheckBox caldavPortCheckBox;
protected JCheckBox caldavNoSSLCheckBox;
protected JTextField ldapPortField;
protected JCheckBox ldapPortCheckBox;
protected JCheckBox ldapNoSSLCheckBox;
protected JTextField keepDelayField;
protected JTextField sentKeepDelayField;
protected JTextField caldavPastDelayField;
@ -109,7 +116,7 @@ public class SettingsFrame extends JFrame {
}
}
protected void addPortSettingComponent(JPanel panel, String label, JComponent component, JComponent checkboxComponent, String toolTipText) {
protected void addPortSettingComponent(JPanel panel, String label, JComponent component, JComponent checkboxComponent, JComponent checkboxSSLComponent, String toolTipText) {
JLabel fieldLabel = new JLabel(label);
fieldLabel.setHorizontalAlignment(SwingConstants.RIGHT);
fieldLabel.setVerticalAlignment(SwingConstants.CENTER);
@ -119,6 +126,7 @@ public class SettingsFrame extends JFrame {
innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.X_AXIS));
innerPanel.add(checkboxComponent);
innerPanel.add(component);
innerPanel.add(checkboxSSLComponent);
panel.add(innerPanel);
if (toolTipText != null) {
fieldLabel.setToolTipText(toolTipText);
@ -133,65 +141,80 @@ public class SettingsFrame extends JFrame {
urlField = new JTextField(Settings.getProperty("davmail.url"), 17);
popPortField = new JTextField(Settings.getProperty("davmail.popPort"), 4);
popPortCheckBox = new JCheckBox();
popNoSSLCheckBox = new JCheckBox(BundleMessage.format("UI_NO_SSL"), Settings.getBooleanProperty("davmail.ssl.nosecurepop"));
popPortCheckBox.setSelected(Settings.getProperty("davmail.popPort") != null && Settings.getProperty("davmail.popPort").length() > 0);
popPortField.setEnabled(popPortCheckBox.isSelected());
popNoSSLCheckBox.setEnabled(popPortCheckBox.isSelected() && isSslEnabled());
popPortCheckBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
popPortField.setEnabled(popPortCheckBox.isSelected());
popNoSSLCheckBox.setEnabled(popPortCheckBox.isSelected() && isSslEnabled());
}
});
imapPortField = new JTextField(Settings.getProperty("davmail.imapPort"), 4);
imapPortCheckBox = new JCheckBox();
imapNoSSLCheckBox = new JCheckBox(BundleMessage.format("UI_NO_SSL"), Settings.getBooleanProperty("davmail.ssl.nosecureimap"));
imapPortCheckBox.setSelected(Settings.getProperty("davmail.imapPort") != null && Settings.getProperty("davmail.imapPort").length() > 0);
imapPortField.setEnabled(imapPortCheckBox.isSelected());
imapNoSSLCheckBox.setEnabled(imapPortCheckBox.isSelected() && isSslEnabled());
imapPortCheckBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
imapPortField.setEnabled(imapPortCheckBox.isSelected());
imapNoSSLCheckBox.setEnabled(imapPortCheckBox.isSelected() && isSslEnabled());
}
});
smtpPortField = new JTextField(Settings.getProperty("davmail.smtpPort"), 4);
smtpPortCheckBox = new JCheckBox();
smtpNoSSLCheckBox = new JCheckBox(BundleMessage.format("UI_NO_SSL"), Settings.getBooleanProperty("davmail.ssl.nosecuresmtp"));
smtpPortCheckBox.setSelected(Settings.getProperty("davmail.smtpPort") != null && Settings.getProperty("davmail.smtpPort").length() > 0);
smtpPortField.setEnabled(smtpPortCheckBox.isSelected());
smtpNoSSLCheckBox.setEnabled(smtpPortCheckBox.isSelected() && isSslEnabled());
smtpPortCheckBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
smtpPortField.setEnabled(smtpPortCheckBox.isSelected());
smtpNoSSLCheckBox.setEnabled(smtpPortCheckBox.isSelected() && isSslEnabled());
}
});
caldavPortField = new JTextField(Settings.getProperty("davmail.caldavPort"), 4);
caldavPortCheckBox = new JCheckBox();
caldavNoSSLCheckBox = new JCheckBox(BundleMessage.format("UI_NO_SSL"), Settings.getBooleanProperty("davmail.ssl.nosecurecaldav"));
caldavPortCheckBox.setSelected(Settings.getProperty("davmail.caldavPort") != null && Settings.getProperty("davmail.caldavPort").length() > 0);
caldavPortField.setEnabled(caldavPortCheckBox.isSelected());
caldavNoSSLCheckBox.setEnabled(caldavPortCheckBox.isSelected() && isSslEnabled());
caldavPortCheckBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
caldavPortField.setEnabled(caldavPortCheckBox.isSelected());
caldavNoSSLCheckBox.setEnabled(caldavPortCheckBox.isSelected() && isSslEnabled());
}
});
ldapPortField = new JTextField(Settings.getProperty("davmail.ldapPort"), 4);
ldapPortCheckBox = new JCheckBox();
ldapNoSSLCheckBox = new JCheckBox(BundleMessage.format("UI_NO_SSL"), Settings.getBooleanProperty("davmail.ssl.nosecureldap"));
ldapPortCheckBox.setSelected(Settings.getProperty("davmail.ldapPort") != null && Settings.getProperty("davmail.ldapPort").length() > 0);
ldapPortField.setEnabled(ldapPortCheckBox.isSelected());
ldapNoSSLCheckBox.setEnabled(ldapPortCheckBox.isSelected() && isSslEnabled());
ldapPortCheckBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
ldapPortField.setEnabled(ldapPortCheckBox.isSelected());
ldapNoSSLCheckBox.setEnabled(ldapPortCheckBox.isSelected() && isSslEnabled());
}
});
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"));
popNoSSLCheckBox, BundleMessage.format("UI_POP_PORT_HELP"));
addPortSettingComponent(settingsPanel, BundleMessage.format("UI_IMAP_PORT"), imapPortField, imapPortCheckBox,
BundleMessage.format("UI_IMAP_PORT_HELP"));
imapNoSSLCheckBox, BundleMessage.format("UI_IMAP_PORT_HELP"));
addPortSettingComponent(settingsPanel, BundleMessage.format("UI_SMTP_PORT"), smtpPortField, smtpPortCheckBox,
BundleMessage.format("UI_SMTP_PORT_HELP"));
smtpNoSSLCheckBox, BundleMessage.format("UI_SMTP_PORT_HELP"));
addPortSettingComponent(settingsPanel, BundleMessage.format("UI_CALDAV_PORT"), caldavPortField, caldavPortCheckBox,
BundleMessage.format("UI_CALDAV_PORT_HELP"));
caldavNoSSLCheckBox, BundleMessage.format("UI_CALDAV_PORT_HELP"));
addPortSettingComponent(settingsPanel, BundleMessage.format("UI_LDAP_PORT"), ldapPortField, ldapPortCheckBox,
BundleMessage.format("UI_LDAP_PORT_HELP"));
ldapNoSSLCheckBox, BundleMessage.format("UI_LDAP_PORT_HELP"));
return settingsPanel;
}
@ -449,18 +472,23 @@ public class SettingsFrame extends JFrame {
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);
popNoSSLCheckBox.setSelected(Settings.getBooleanProperty("davmail.ssl.nosecurepop"));
imapPortField.setText(Settings.getProperty("davmail.imapPort"));
imapPortCheckBox.setSelected(Settings.getProperty("davmail.imapPort") != null && Settings.getProperty("davmail.imapPort").length() > 0);
imapNoSSLCheckBox.setSelected(Settings.getBooleanProperty("davmail.ssl.nosecureimap"));
smtpPortField.setText(Settings.getProperty("davmail.smtpPort"));
smtpPortCheckBox.setSelected(Settings.getProperty("davmail.smtpPort") != null && Settings.getProperty("davmail.smtpPort").length() > 0);
smtpNoSSLCheckBox.setSelected(Settings.getBooleanProperty("davmail.ssl.nosecuresmtp"));
caldavPortField.setText(Settings.getProperty("davmail.caldavPort"));
caldavPortCheckBox.setSelected(Settings.getProperty("davmail.caldavPort") != null && Settings.getProperty("davmail.caldavPort").length() > 0);
caldavNoSSLCheckBox.setSelected(Settings.getBooleanProperty("davmail.ssl.nosecurecaldav"));
ldapPortField.setText(Settings.getProperty("davmail.ldapPort"));
ldapPortCheckBox.setSelected(Settings.getProperty("davmail.ldapPort") != null && Settings.getProperty("davmail.ldapPort").length() > 0);
ldapNoSSLCheckBox.setSelected(Settings.getBooleanProperty("davmail.ssl.nosecureldap"));
keepDelayField.setText(Settings.getProperty("davmail.keepDelay"));
sentKeepDelayField.setText(Settings.getProperty("davmail.sentKeepDelay"));
caldavPastDelayField.setText(Settings.getProperty("davmail.caldavPastDelay"));
imapIdleDelayField.setText(Settings.getProperty("davmail.imapIdleDelay"));
imapIdleDelayField.setText(Settings.getProperty("davmail.imapIdleDelay"));
boolean useSystemProxies = Settings.getBooleanProperty("davmail.useSystemProxies");
useSystemProxiesField.setSelected(useSystemProxies);
boolean enableProxy = Settings.getBooleanProperty("davmail.enableProxy");
@ -468,7 +496,7 @@ public class SettingsFrame extends JFrame {
enableProxyField.setEnabled(!useSystemProxies);
httpProxyField.setEnabled(!useSystemProxies && enableProxy);
httpProxyPortField.setEnabled(!useSystemProxies && enableProxy);
httpProxyUserField.setEnabled(useSystemProxies ||enableProxy);
httpProxyUserField.setEnabled(useSystemProxies || enableProxy);
httpProxyPasswordField.setEnabled(useSystemProxies || enableProxy);
httpProxyField.setText(Settings.getProperty("davmail.proxyHost"));
httpProxyPortField.setText(Settings.getProperty("davmail.proxyPort"));
@ -502,6 +530,15 @@ public class SettingsFrame extends JFrame {
logFilePathField.setText(Settings.getProperty("davmail.logFilePath"));
}
protected boolean isSslEnabled() {
if (keystoreFileField != null) {
return keystoreFileField.getText().length() > 0;
} else {
return Settings.getProperty("davmail.ssl.keystoreFile") != null &&
(Settings.getProperty("davmail.ssl.keystoreFile").length() > 0);
}
}
/**
* DavMail settings frame.
*/
@ -519,6 +556,16 @@ public class SettingsFrame extends JFrame {
DesktopBrowser.browse("http://davmail.sourceforge.net");
}
});
tabbedPane.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
boolean isSslEnabled = isSslEnabled();
popNoSSLCheckBox.setEnabled(Settings.getProperty("davmail.popPort") != null && isSslEnabled);
imapNoSSLCheckBox.setEnabled(imapPortCheckBox.isSelected() && isSslEnabled);
smtpNoSSLCheckBox.setEnabled(smtpPortCheckBox.isSelected() && isSslEnabled);
caldavNoSSLCheckBox.setEnabled(caldavPortCheckBox.isSelected() && isSslEnabled);
ldapNoSSLCheckBox.setEnabled(ldapPortCheckBox.isSelected() && isSslEnabled);
}
});
JPanel mainPanel = new JPanel();
mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
@ -572,10 +619,15 @@ public class SettingsFrame extends JFrame {
// save options
Settings.setProperty("davmail.url", urlField.getText());
Settings.setProperty("davmail.popPort", popPortCheckBox.isSelected() ? popPortField.getText() : "");
Settings.setProperty("davmail.ssl.nosecurepop", String.valueOf(popNoSSLCheckBox.isSelected()));
Settings.setProperty("davmail.imapPort", imapPortCheckBox.isSelected() ? imapPortField.getText() : "");
Settings.setProperty("davmail.ssl.nosecureimap", String.valueOf(imapNoSSLCheckBox.isSelected()));
Settings.setProperty("davmail.smtpPort", smtpPortCheckBox.isSelected() ? smtpPortField.getText() : "");
Settings.setProperty("davmail.ssl.nosecuresmtp", String.valueOf(smtpNoSSLCheckBox.isSelected()));
Settings.setProperty("davmail.caldavPort", caldavPortCheckBox.isSelected() ? caldavPortField.getText() : "");
Settings.setProperty("davmail.ssl.nosecurecaldav", String.valueOf(caldavNoSSLCheckBox.isSelected()));
Settings.setProperty("davmail.ldapPort", ldapPortCheckBox.isSelected() ? ldapPortField.getText() : "");
Settings.setProperty("davmail.ssl.nosecureldap", String.valueOf(ldapNoSSLCheckBox.isSelected()));
Settings.setProperty("davmail.keepDelay", keepDelayField.getText());
Settings.setProperty("davmail.sentKeepDelay", sentKeepDelayField.getText());
Settings.setProperty("davmail.caldavPastDelay", caldavPastDelayField.getText());

View File

@ -202,6 +202,7 @@ UI_LOG_HTTPCLIENT=HttpClient:
UI_LOG_WIRE=Wire:
UI_LOG_FILE_PATH=Log file path:
UI_NETWORK=Network
UI_NO_SSL=No SSL
UI_OWA_URL=OWA (Exchange) URL:
UI_OWA_URL_HELP=Base Outlook Web Access URL
UI_POP_PORT=Local POP port:

View File

@ -1,259 +1,260 @@
EXCEPTION_AUTHENTICATION_FAILED=Echec d''authentification : identifiant ou mot de passe invalide
EXCEPTION_AUTHENTICATION_FAILED_PASSWORD_EXPIRED=Echec d''authentification : mot de passe expiré ?
EXCEPTION_AUTHENTICATION_FAILED_RETRY=Echec d''authentification : identifiant ou mot de passe invalide, réessayer avec domaine\\utilisateur
EXCEPTION_CONNECTION_FAILED=Connection OWA à {0} impossible, code retour {1}, vérifier la configuration
EXCEPTION_DAVMAIL_CONFIGURATION=Erreur de configuration DavMail :\n{0}
EXCEPTION_END_OF_STREAM=Fin de flux âtteint pendant la lecture du contenu
EXCEPTION_ITEM_NOT_FOUND=Elément non trouvé
EXCEPTION_EXCHANGE_LOGIN_FAILED=Exception lors de la connexion Exchange : {0}
EXCEPTION_INVALID_CALDAV_REQUEST=Reuqête Caldav invalide : {0}
EXCEPTION_INVALID_CONTENT_LENGTH=Longueur du contenu invalide : {0}
EXCEPTION_INVALID_CONTENT_TYPE=Type de contenu invalide : {0}
EXCEPTION_INVALID_CREDENTIALS=Identifiant ou mot de passe invalide
EXCEPTION_INVALID_DATE=Date invalide {0}
EXCEPTION_INVALID_DATES=Dates invalides : {0}
EXCEPTION_INVALID_FOLDER_URL=URL du dossier invalide : {0}
EXCEPTION_INVALID_HEADER=Entête invalide : {0}, connexion HTTPS sur le service HTTP ?
EXCEPTION_INVALID_KEEPALIVE=Keep-Alive invalide : {0}
EXCEPTION_INVALID_MAIL_PATH=Chemin de messagerie invalide : {0}
EXCEPTION_INVALID_MESSAGE_CONTENT=Contenu du message invalide : {0}
EXCEPTION_INVALID_MESSAGE_URL=URL de message invalide : {0}
EXCEPTION_INVALID_RECIPIENT=Destinataire invalide : {0}
EXCEPTION_INVALID_REQUEST=Requête invalide {0}
EXCEPTION_INVALID_SEARCH_PARAMETERS=Paremètres de recherche invalides : {0}
EXCEPTION_NETWORK_DOWN=Toutes les interfaces réseaux sont indisponibles ou serveur non joignable !
EXCEPTION_UNABLE_TO_CREATE_MESSAGE=Impossible de créer le message {0} : {1}{2}{3}
EXCEPTION_UNABLE_TO_GET_FOLDER=Impossible d''obtenir le dossier {0}
EXCEPTION_UNABLE_TO_GET_MAIL_FOLDER=Impossible d''obtenir le dossier de messagerie à l''adresse {0}, Webdav non disponible sur le serveur Exchange
EXCEPTION_UNABLE_TO_MOVE_FOLDER=Impossible de déplacer le dossier, la cible existe
EXCEPTION_UNABLE_TO_COPY_MESSAGE=Impossible de copier le message, la cible existe
EXCEPTION_UNABLE_TO_PATCH_MESSAGE=Impossible de mettre ) jour le message {0} : {1}{2}{3}
EXCEPTION_UNABLE_TO_UPDATE_MESSAGE=Impossible de mettre à jour les propriétés du message
EXCEPTION_CONNECT=Exception lors de la connexion : {0} {1}
EXCEPTION_UNSUPPORTED_AUTHORIZATION_MODE=Mode d'authentification invalide : {0}
EXCEPTION_UNSUPPORTED_VALUE=Valeur non supportée : {0}
LOG_CLIENT_CLOSED_CONNECTION=Connection fermée par le client
LOG_CLOSE_CONNECTION_ON_TIMEOUT=Connection fermée sur expiration
LOG_CONNECTION_CLOSED=Connection fermée
LOG_CONNECTION_FROM=Connection de {0} sur le port {1,number,#}
LOG_DAVMAIL_GATEWAY_LISTENING=Passerelle DavMail {0} en écoute sur {1}
LOG_DAVMAIL_STARTED=Passerelle DavMail démarrée
LOG_ERROR_CLOSING_CONFIG_FILE=Erreur à la fermeture du fichier de configuration
LOG_ERROR_LOADING_OSXADAPTER=Erreur au chargement de OSXAdapter
LOG_ERROR_LOADING_SETTINGS=Erreur de chargement de la configuration
LOG_ERROR_RETRIEVING_MESSAGE=Erreur lors la récupération du message
LOG_ERROR_WAITING_FOR_SWT_INIT=Erreur d''initialisation SWT
LOG_ITEM_NOT_AVAILABLE=Evènement {0} non disponible : {1}
LOG_EXCEPTION_CLOSING_CLIENT_INPUT_STREAM=Erreur à la fermeture du flux d''entrée client
LOG_EXCEPTION_CLOSING_CLIENT_OUTPUT_STREAM=Erreur à la fermeture du flux de sortie client
LOG_EXCEPTION_CLOSING_CLIENT_SOCKET=Erreur à la fermeture de la connection client
LOG_EXCEPTION_CLOSING_CONNECTION_ON_TIMEOUT=Erreur à la fermeture de la connexion sur expiration
LOG_EXCEPTION_CLOSING_SERVER_SOCKET=Erreur à la fermeture du port d''écoute serveur
LOG_EXCEPTION_CREATING_SERVER_SOCKET=Erreur lors de la création du port d''écoute serveur
LOG_EXCEPTION_CREATING_SSL_SERVER_SOCKET=Impossible d''ouvrir le port d''écoute {1,number,#} pour {0} : Erreur lors de la création du port d''écoute serveur sécurisé : {2}
LOG_EXCEPTION_GETTING_SOCKET_STREAMS=Erreur lors de l''établissement des flux de la connexion
LOG_EXCEPTION_LISTENING_FOR_CONNECTIONS=Erreur pendant l''attente des connexion entrantes
LOG_EXCEPTION_SENDING_ERROR_TO_CLIENT=Erreur d''envoi du message d''erreur au client
LOG_EXCEPTION_WAITING_SERVER_THREAD_DIE=Erreur pendant l''attente de fin du processus serveur
LOG_EXECUTE_FOLLOW_REDIRECTS=executeFollowRedirects({0})
LOG_EXECUTE_FOLLOW_REDIRECTS_COUNT=executeFollowRedirects: {0} redirectCount: {1}
LOG_EXTERNAL_CONNECTION_REFUSED=Connexion du client distant refusée
LOG_FOUND_ACCEPTED_CERTIFICATE=Certificat définitivement accepté trouvé, hash {0}
LOG_FOUND_CALENDAR_MESSAGES={0} messages trouvés dans le calendrier
LOG_IMAP_COMMAND={0} sur {1}
LOG_INVALID_DEPTH=Profondeur invalide : {0}
LOG_INVALID_SETTING_VALUE=Paramètre de configuration {0} invalide
LOG_INVALID_URL=URL invalide : {0}
LOG_JAVA6_DESKTOP_UNAVAILABLE=Classe Java 6 Desktop non disponible
LOG_LDAP_IGNORE_FILTER_ATTRIBUTE=Filtre d''attribut ignoré : {0}= {1}
LOG_LDAP_REPLACED_UID_FILTER=Remplacé {0} par {1} dans le filtre uid
LOG_LDAP_REQ_ABANDON_SEARCH=LDAP_REQ_ABANDON {0} pour la recherche {1}
LOG_LDAP_REQ_UNBIND=LDAP_REQ_UNBIND {0}
LOG_LDAP_REQ_BIND_ANONYMOUS=LDAP_REQ_BIND {0} anonyme
LOG_LDAP_REQ_BIND_USER=LOG_LDAP_REQ_BIND_USER
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} Accès anonyme à {1} interdit
LOG_LDAP_REQ_SEARCH_END=LDAP_REQ_SEARCH {0} fin
LOG_LDAP_REQ_SEARCH_FOUND_RESULTS=LDAP_REQ_SEARCH {0} retourne {1} résultats
LOG_LDAP_REQ_SEARCH_INVALID_DN=LDAP_REQ_SEARCH {0} dn non reconnu {1}
LOG_LDAP_REQ_SEARCH_SEND_PERSON=LDAP_REQ_SEARCH {0} envoi uid={1}{2} {3}
LOG_LDAP_REQ_SEARCH_SIZE_LIMIT_EXCEEDED=LDAP_REQ_SEARCH {0} limite de taille dépassée
LOG_LDAP_REQ_SEARCH_SUCCESS=LDAP_REQ_SEARCH {0} succès
LOG_LDAP_SEND_COMPUTER_CONTEXT=Envoi contexte computer {0} {1}
LOG_LDAP_SEND_ROOT_DSE=Envoi racine DSE
LOG_LDAP_UNSUPPORTED_FILTER=Filtre non supporté : {0}
LOG_LDAP_UNSUPPORTED_FILTER_ATTRIBUTE=Attribut de filtre non supporté : {0}= {1}
LOG_LDAP_UNSUPPORTED_FILTER_VALUE=Valeur de filtre non supportée
LOG_LDAP_UNSUPPORTED_OPERATION=Opération non supportée : {0}
LOG_LISTING_ITEM=Liste élément {0}/{1}
LOG_MESSAGE={0}
LOG_NEW_VERSION_AVAILABLE=Une nouvelle version ({0}) de la Passerelle DavMail est disponible !
LOG_OPEN_LINK_NOT_SUPPORTED=Ouverture de lien impossible (avec AWT Desktop et SWT Program)
LOG_PROTOCOL_PORT=port {0} : {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_ITEM=Envoi élément {0}/{1}
LOG_SEARCHING_CALENDAR_MESSAGES=Recherche des messages de calendrier...
LOG_SEARCH_QUERY=Recherche : {0}
LOG_SEND_CLIENT_MESSAGE=> {0}
LOG_SEND_CLIENT_PREFIX_MESSAGE=> {0}{1}
LOG_SET_SOCKET_TIMEOUT=Expiration de lecture de la connection positionnée à {0} secondes
LOG_SOCKET_BIND_FAILED=Impossible d''ouvrir le port d''écoute {1,number,#} pour {0} : port non autorisé ou utilisé par un autre processus\n
LOG_STARTING_DAVMAIL=Démarrage de la passerelle DavMail...
LOG_STOPPING_DAVMAIL=Arrêt de la passerelle DavMail...
LOG_SWT_NOT_AVAILABLE=SWT non disponible, bascule vers le support icône de notification de Java 1.6
LOG_SYSTEM_TRAY_NOT_AVAILABLE=JDK 1.6 nécessaire pour le support de l''icône de notification
LOG_UNABLE_TO_CREATE_ICON=Impossible de créer l''icône
LOG_UNABLE_TO_CREATE_LOG_FILE_DIR=Impossible de créer le répertoire de traces
LOG_UNABLE_TO_CREATE_TRAY=Impossible de créer l''icône de notification
LOG_UNABLE_TO_GET_PARSEINTWITHTAG=Erreur d''accès à la méthode BerDecoder.parseIntWithTag
LOG_UNABLE_TO_GET_RELEASED_VERSION=Impossible de récupérer le numéro de dernière version
LOG_UNABLE_TO_LOAD_IMAGE=Impossible de charger l''image
LOG_UNABLE_TO_LOAD_SETTINGS=Impossible de charger la configuration :
LOG_UNABLE_TO_OPEN_LINK=Impossible d''ouvrir le lien
LOG_UNABLE_TO_SET_ICON_IMAGE=Impossible de positionner l''icône de JDialog (non disponible en Java 1.5)
LOG_UNABLE_TO_SET_LOG_FILE_PATH=Echec à la mise à jour du chemin du fichier de traces
LOG_UNABLE_TO_SET_LOOK_AND_FEEL=Impossible de définir le style de l''interface
LOG_UNABLE_TO_SET_SYSTEM_LOOK_AND_FEEL=Impossible de définir le style natif sur l''interface
LOG_UNABLE_TO_STORE_SETTINGS=Impossible d''enregistrer la configuration
LOG_UNSUPPORTED_REQUEST=Requête non supportée : {0}
UI_ABOUT=A propos...
UI_ABOUT_DAVMAIL=A propos de la Passerelle DavMail
UI_ABOUT_DAVMAIL_AUTHOR=<html><b>Passerelle DavMail</b><br>Par Mickaël Guessant<br><br>
UI_ACCEPT_CERTIFICATE=DavMail : Accepter le certificat ?
UI_ALLOW_REMOTE_CONNECTION=Autoriser connexions distantes :
UI_ALLOW_REMOTE_CONNECTION_HELP=Autoriser les connexions distantes à la passerelle (mode serveur)
UI_ANSWER_NO=n
UI_ANSWER_YES=o
UI_BIND_ADDRESS=Adresse d''écoute :
UI_BIND_ADDRESS_HELP=Ecouter seulement sur l''adresse définie
UI_BUTTON_ACCEPT=Accepter
UI_BUTTON_CANCEL=Annuler
UI_BUTTON_DENY=Refuser
UI_BUTTON_HELP=Aide
UI_BUTTON_OK=OK
UI_BUTTON_SAVE=Enregistrer
UI_CALDAV_PORT=Port HTTP Caldav :
UI_CALDAV_PORT_HELP=Port local Caldav à configurer dans le client Caldav (agenda)
UI_CALENDAR_PAST_EVENTS=Jours passés du calendrier (Caldav) :
UI_CALENDAR_PAST_EVENTS_HELP=Limiter les évènements remontés
UI_CURRENT_VERSION=Version actuelle : {0}<br>
UI_DAVMAIL_GATEWAY=Passerelle DavMail
UI_DAVMAIL_SETTINGS=Configuration Passerelle DavMail
UI_DELAYS=Délais
UI_DISABLE_UPDATE_CHECK=Désactivation contrôle version :
UI_DISABLE_UPDATE_CHECK_HELP=Désactiver le contrôle de nouvelle version disponible
UI_ENABLE_PROXY=Activer proxy :
UI_ERROR_WAITING_FOR_CERTIFICATE_CHECK=Erreur lors de l''attente de validation du certificat
UI_EXIT=Quitter
UI_FINGERPRINT=Empreinte
UI_GATEWAY=Passerelle
UI_HELP_INSTRUCTIONS=<br>Aide et instructions disponibles sur :<br><a href=\"http://davmail.sourceforge.net\">http://davmail.sourceforge.net</a><br><br>Pour envoyer des commentaires ou signaler des anomalies, <br>utiliser <a href=\"http://sourceforge.net/tracker/?group_id=184600\">DavMail Sourceforge trackers</a><br>ou me contacter à l''adresse <a href=\"mailto:mguessan@free.fr\">mguessan@free.fr</a></html>
UI_IMAP_PORT=Port IMAP local :
UI_IMAP_PORT_HELP=Port IMAP local à configurer dans le client de messagerie
UI_ISSUED_BY=Emis par
UI_ISSUED_TO=Emis pour
UI_KEEP_DELAY=Délai de rétention corbeille (POP) :
UI_KEEP_DELAY_HELP=Nombre de jours de conservation des messages dans la corbeille
UI_KEY_PASSWORD=Mot de passe clé :
UI_KEY_PASSWORD_HELP=Mot de passe clé SSL contenue dans le fichier des clés
UI_KEY_STORE=Fichier clés :
UI_KEY_STORE_HELP=Chemin du fichier contenant les clés et certificats SSL
UI_KEY_STORE_PASSWORD=Mot de passe fichier clés :
UI_KEY_STORE_PASSWORD_HELP=Mot de passe du fichier des clés
UI_KEY_STORE_TYPE=Type de fichier clés :
UI_KEY_STORE_TYPE_HELP=Choix du type de fichier de clés
UI_LAST_LOG=Dernière trace
UI_LAST_MESSAGE=Dernier message
UI_LATEST_VERSION=Dernière version disponible : {0} <br>Une nouvelle version de la Passerelle DavMail est disponible.<br><a href=\"http://sourceforge.net/project/platformdownload.php?group_id=184600\">Télécharcher la dernière version</a><br>
UI_LDAP_PORT=Port LDAP local :
UI_LDAP_PORT_HELP=Port LDAP local à configurer dans le client annuaire (carnet d''adresse)
UI_LOGGING_LEVELS=Niveaux de traces
UI_LOGS=Traces
UI_LOG_DAVMAIL=DavMail :
UI_LOG_DEFAULT=Défaut :
UI_LOG_HTTPCLIENT=HttpClient :
UI_LOG_WIRE=Réseau :
UI_NETWORK=Réseau
UI_OWA_URL=URL OWA (Exchange) :
UI_OWA_URL_HELP=URL de connexion Outlook Web Access
UI_POP_PORT=Port POP local :
UI_POP_PORT_HELP=Port POP local à configurer dans le client de messagerie
UI_PROXY=Proxy
UI_PROXY_PASSWORD=Mot de passe proxy :
UI_PROXY_PORT=Port du serveur proxy :
UI_PROXY_SERVER=Serveur proxy :
UI_PROXY_USER=Identifiant proxy :
UI_SENT_KEEP_DELAY=Délai de rétention envoyés (POP) :
UI_SENT_KEEP_DELAY_HELP=Nombre de jours de conservation des messages dans le dossier des messages envoyés
UI_SERIAL=Numéro de série
UI_SERVER_CERTIFICATE=Certificat Serveur (Client vers DavMail)
UI_SERVER_CERTIFICATE_HASH=Hash du certificat serveur :
UI_SERVER_CERTIFICATE_HASH_HELP=Hash du certificat accepté manuellement
UI_SETTINGS=Configuration...
UI_SHOW_LOGS=Afficher les traces...
UI_SMTP_PORT=Port SMTP local :
UI_SMTP_PORT_HELP=Port SMTP local à configurer dans le client de messagerie
UI_TAB_ADVANCED=Avancé
UI_TAB_ENCRYPTION=Chiffrement
UI_TAB_MAIN=Général
UI_TAB_PROXY=Proxy
UI_UNTRUSTED_CERTIFICATE=Le certificat fourni par le serveur n''est certifié par aucune autorité de confiance,\n vous pouvez choisir d''accepter ou de rejeter l''accès
UI_UNTRUSTED_CERTIFICATE_HTML=<html><b>Le certificat fourni par le serveur n''est certifié par aucune autorité de confiance,<br> vous pouvez choisir d''accepter ou de rejeter l''accès</b></html>
UI_VALID_FROM=Emis le
UI_VALID_UNTIL=Expire le
UI_PASSWORD_PROMPT=DavMail : Entrer le mot de passe
UI_PKCS11_LIBRARY_HELP=Chemin de la librarie PKCS11 (carte à puce) (.so or .dll)
UI_PKCS11_LIBRARY=Librairie PKCS11 :
UI_PKCS11_CONFIG_HELP=Configuration PKCS11 complémentaire optionnelle (slot, nssArgs, ...)
UI_PKCS11_CONFIG=Configuration PKCS11 :
UI_CLIENT_CERTIFICATE=Certificat client (DavMail vers Exchange)
UI_LOG_FILE_PATH=Chemin du fichier de traces :
LOG_GATEWAY_INTERRUPTED=Arrêt de la passerelle DavMail en cours
LOG_GATEWAY_STOP=Passerelle DavMail arrêtée
LOG_INVALID_TIMEZONE=Fuseau horaire invalide : {0}
MEETING_REQUEST=Invitation
LOG_ACCESS_FORBIDDEN=Accès à {0} non autorisé: {1}
LOG_LDAP_REQ_BIND_INVALID_CREDENTIALS=LDAP_REQ_BIND Utilisateur ou mot de passe invalide
LOG_LDAP_REQ_BIND_SUCCESS=LOG_LDAP_REQ_BIND Authentification réussie
LOG_EXCEPTION_CLOSING_KEYSTORE_INPUT_STREAM=Erreur à la fermeture du flux d''entrée du fichier de clés
LOG_SUBFOLDER_ACCESS_FORBIDDEN=Accès interdit au sous dossiers de {0}
LOG_FOLDER_ACCESS_FORBIDDEN=Accès interdit au dossier {0}
LOG_FOLDER_NOT_FOUND=Dossier {0} introuvable
LOG_FOLDER_ACCESS_ERROR=Erreur lors de l''accès au dossier {0} : {1}
UI_OTP_PASSWORD_PROMPT=Mot de passe du jeton :
EXCEPTION_SESSION_EXPIRED=Session Exchange expirée
UI_CLIENT_KEY_STORE_TYPE=Type de stockage :
UI_CLIENT_KEY_STORE_TYPE_HELP=Choisir le type de stockage du certificat client, PKCS11 pour une carte à puce
UI_CLIENT_KEY_STORE=Fichier certificat client :
UI_CLIENT_KEY_STORE_HELP=Chemin du fichier contenant le certificat client SSL
UI_CLIENT_KEY_STORE_PASSWORD=Mot de passe certificat client :
UI_CLIENT_KEY_STORE_PASSWORD_HELP=Mot de passe du certificat client, laisser vide pour fournir le mot de passe mode interactif
UI_TAB_LOGGING=Traces
UI_OTHER=Autres
UI_CALDAV_ALARM_SOUND=Son des alarmes Caldav :
UI_CALDAV_ALARM_SOUND_HELP=Convertir les alarmes Caldav en alarmes sonores supportées par iCal, par exemple Basso
UI_FORCE_ACTIVESYNC_UPDATE=Forcer ActiveSync :
UI_FORCE_ACTIVESYNC_UPDATE_HELP=Forcer la mise à jour des évènements Caldav pour les appareils connectés via ActiveSync
UI_DEFAULT_DOMAIN=Domaine windows par défaut :
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 :
UI_SHOW_STARTUP_BANNER=Notification au lancement :
UI_SHOW_STARTUP_BANNER_HELP=Afficher ou non la fenêtre de notification au démarrage
LOG_READ_CLIENT_AUTH_LOGIN=< AUTH LOGIN ********
UI_IMAP_IDLE_DELAY=Délai de surveillance dossier (IMAP) :
UI_IMAP_IDLE_DELAY_HELP=Délai de surveillance du dossier IMAP en minutes, laisser vide pour désactiver le support IDLE
UI_IMAP_AUTO_EXPUNGE=IMAP suppression immédiate :
UI_IMAP_AUTO_EXPUNGE_HELP=Supprimer immédiatement les messages du serveur via IMAP
EXCEPTION_EWS_NOT_AVAILABLE=Point d''accès EWS non disponible
EXCEPTION_FOLDER_NOT_FOUND=Dossier {0} non trouvé
UNKNOWN_ATTRIBUTE=Attribut inconnu: {0}
ACCEPTED=Accepté :
TENTATIVE=Provisoire :
DECLINED=Refusé :
EXCEPTION_AUTHENTICATION_FAILED=Echec d''authentification : identifiant ou mot de passe invalide
EXCEPTION_AUTHENTICATION_FAILED_PASSWORD_EXPIRED=Echec d''authentification : mot de passe expiré ?
EXCEPTION_AUTHENTICATION_FAILED_RETRY=Echec d''authentification : identifiant ou mot de passe invalide, réessayer avec domaine\\utilisateur
EXCEPTION_CONNECTION_FAILED=Connection OWA à {0} impossible, code retour {1}, vérifier la configuration
EXCEPTION_DAVMAIL_CONFIGURATION=Erreur de configuration DavMail :\n{0}
EXCEPTION_END_OF_STREAM=Fin de flux âtteint pendant la lecture du contenu
EXCEPTION_ITEM_NOT_FOUND=Elément non trouvé
EXCEPTION_EXCHANGE_LOGIN_FAILED=Exception lors de la connexion Exchange : {0}
EXCEPTION_INVALID_CALDAV_REQUEST=Reuqête Caldav invalide : {0}
EXCEPTION_INVALID_CONTENT_LENGTH=Longueur du contenu invalide : {0}
EXCEPTION_INVALID_CONTENT_TYPE=Type de contenu invalide : {0}
EXCEPTION_INVALID_CREDENTIALS=Identifiant ou mot de passe invalide
EXCEPTION_INVALID_DATE=Date invalide {0}
EXCEPTION_INVALID_DATES=Dates invalides : {0}
EXCEPTION_INVALID_FOLDER_URL=URL du dossier invalide : {0}
EXCEPTION_INVALID_HEADER=Entête invalide : {0}, connexion HTTPS sur le service HTTP ?
EXCEPTION_INVALID_KEEPALIVE=Keep-Alive invalide : {0}
EXCEPTION_INVALID_MAIL_PATH=Chemin de messagerie invalide : {0}
EXCEPTION_INVALID_MESSAGE_CONTENT=Contenu du message invalide : {0}
EXCEPTION_INVALID_MESSAGE_URL=URL de message invalide : {0}
EXCEPTION_INVALID_RECIPIENT=Destinataire invalide : {0}
EXCEPTION_INVALID_REQUEST=Requête invalide {0}
EXCEPTION_INVALID_SEARCH_PARAMETERS=Paremètres de recherche invalides : {0}
EXCEPTION_NETWORK_DOWN=Toutes les interfaces réseaux sont indisponibles ou serveur non joignable !
EXCEPTION_UNABLE_TO_CREATE_MESSAGE=Impossible de créer le message {0} : {1}{2}{3}
EXCEPTION_UNABLE_TO_GET_FOLDER=Impossible d''obtenir le dossier {0}
EXCEPTION_UNABLE_TO_GET_MAIL_FOLDER=Impossible d''obtenir le dossier de messagerie à l''adresse {0}, Webdav non disponible sur le serveur Exchange
EXCEPTION_UNABLE_TO_MOVE_FOLDER=Impossible de déplacer le dossier, la cible existe
EXCEPTION_UNABLE_TO_COPY_MESSAGE=Impossible de copier le message, la cible existe
EXCEPTION_UNABLE_TO_PATCH_MESSAGE=Impossible de mettre ) jour le message {0} : {1}{2}{3}
EXCEPTION_UNABLE_TO_UPDATE_MESSAGE=Impossible de mettre à jour les propriétés du message
EXCEPTION_CONNECT=Exception lors de la connexion : {0} {1}
EXCEPTION_UNSUPPORTED_AUTHORIZATION_MODE=Mode d'authentification invalide : {0}
EXCEPTION_UNSUPPORTED_VALUE=Valeur non supportée : {0}
LOG_CLIENT_CLOSED_CONNECTION=Connection fermée par le client
LOG_CLOSE_CONNECTION_ON_TIMEOUT=Connection fermée sur expiration
LOG_CONNECTION_CLOSED=Connection fermée
LOG_CONNECTION_FROM=Connection de {0} sur le port {1,number,#}
LOG_DAVMAIL_GATEWAY_LISTENING=Passerelle DavMail {0} en écoute sur {1}
LOG_DAVMAIL_STARTED=Passerelle DavMail démarrée
LOG_ERROR_CLOSING_CONFIG_FILE=Erreur à la fermeture du fichier de configuration
LOG_ERROR_LOADING_OSXADAPTER=Erreur au chargement de OSXAdapter
LOG_ERROR_LOADING_SETTINGS=Erreur de chargement de la configuration
LOG_ERROR_RETRIEVING_MESSAGE=Erreur lors la récupération du message
LOG_ERROR_WAITING_FOR_SWT_INIT=Erreur d''initialisation SWT
LOG_ITEM_NOT_AVAILABLE=Evènement {0} non disponible : {1}
LOG_EXCEPTION_CLOSING_CLIENT_INPUT_STREAM=Erreur à la fermeture du flux d''entrée client
LOG_EXCEPTION_CLOSING_CLIENT_OUTPUT_STREAM=Erreur à la fermeture du flux de sortie client
LOG_EXCEPTION_CLOSING_CLIENT_SOCKET=Erreur à la fermeture de la connection client
LOG_EXCEPTION_CLOSING_CONNECTION_ON_TIMEOUT=Erreur à la fermeture de la connexion sur expiration
LOG_EXCEPTION_CLOSING_SERVER_SOCKET=Erreur à la fermeture du port d''écoute serveur
LOG_EXCEPTION_CREATING_SERVER_SOCKET=Erreur lors de la création du port d''écoute serveur
LOG_EXCEPTION_CREATING_SSL_SERVER_SOCKET=Impossible d''ouvrir le port d''écoute {1,number,#} pour {0} : Erreur lors de la création du port d''écoute serveur sécurisé : {2}
LOG_EXCEPTION_GETTING_SOCKET_STREAMS=Erreur lors de l''établissement des flux de la connexion
LOG_EXCEPTION_LISTENING_FOR_CONNECTIONS=Erreur pendant l''attente des connexion entrantes
LOG_EXCEPTION_SENDING_ERROR_TO_CLIENT=Erreur d''envoi du message d''erreur au client
LOG_EXCEPTION_WAITING_SERVER_THREAD_DIE=Erreur pendant l''attente de fin du processus serveur
LOG_EXECUTE_FOLLOW_REDIRECTS=executeFollowRedirects({0})
LOG_EXECUTE_FOLLOW_REDIRECTS_COUNT=executeFollowRedirects: {0} redirectCount: {1}
LOG_EXTERNAL_CONNECTION_REFUSED=Connexion du client distant refusée
LOG_FOUND_ACCEPTED_CERTIFICATE=Certificat définitivement accepté trouvé, hash {0}
LOG_FOUND_CALENDAR_MESSAGES={0} messages trouvés dans le calendrier
LOG_IMAP_COMMAND={0} sur {1}
LOG_INVALID_DEPTH=Profondeur invalide : {0}
LOG_INVALID_SETTING_VALUE=Paramètre de configuration {0} invalide
LOG_INVALID_URL=URL invalide : {0}
LOG_JAVA6_DESKTOP_UNAVAILABLE=Classe Java 6 Desktop non disponible
LOG_LDAP_IGNORE_FILTER_ATTRIBUTE=Filtre d''attribut ignoré : {0}= {1}
LOG_LDAP_REPLACED_UID_FILTER=Remplacé {0} par {1} dans le filtre uid
LOG_LDAP_REQ_ABANDON_SEARCH=LDAP_REQ_ABANDON {0} pour la recherche {1}
LOG_LDAP_REQ_UNBIND=LDAP_REQ_UNBIND {0}
LOG_LDAP_REQ_BIND_ANONYMOUS=LDAP_REQ_BIND {0} anonyme
LOG_LDAP_REQ_BIND_USER=LOG_LDAP_REQ_BIND_USER
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} Accès anonyme à {1} interdit
LOG_LDAP_REQ_SEARCH_END=LDAP_REQ_SEARCH {0} fin
LOG_LDAP_REQ_SEARCH_FOUND_RESULTS=LDAP_REQ_SEARCH {0} retourne {1} résultats
LOG_LDAP_REQ_SEARCH_INVALID_DN=LDAP_REQ_SEARCH {0} dn non reconnu {1}
LOG_LDAP_REQ_SEARCH_SEND_PERSON=LDAP_REQ_SEARCH {0} envoi uid={1}{2} {3}
LOG_LDAP_REQ_SEARCH_SIZE_LIMIT_EXCEEDED=LDAP_REQ_SEARCH {0} limite de taille dépassée
LOG_LDAP_REQ_SEARCH_SUCCESS=LDAP_REQ_SEARCH {0} succès
LOG_LDAP_SEND_COMPUTER_CONTEXT=Envoi contexte computer {0} {1}
LOG_LDAP_SEND_ROOT_DSE=Envoi racine DSE
LOG_LDAP_UNSUPPORTED_FILTER=Filtre non supporté : {0}
LOG_LDAP_UNSUPPORTED_FILTER_ATTRIBUTE=Attribut de filtre non supporté : {0}= {1}
LOG_LDAP_UNSUPPORTED_FILTER_VALUE=Valeur de filtre non supportée
LOG_LDAP_UNSUPPORTED_OPERATION=Opération non supportée : {0}
LOG_LISTING_ITEM=Liste élément {0}/{1}
LOG_MESSAGE={0}
LOG_NEW_VERSION_AVAILABLE=Une nouvelle version ({0}) de la Passerelle DavMail est disponible !
LOG_OPEN_LINK_NOT_SUPPORTED=Ouverture de lien impossible (avec AWT Desktop et SWT Program)
LOG_PROTOCOL_PORT=port {0} : {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_ITEM=Envoi élément {0}/{1}
LOG_SEARCHING_CALENDAR_MESSAGES=Recherche des messages de calendrier...
LOG_SEARCH_QUERY=Recherche : {0}
LOG_SEND_CLIENT_MESSAGE=> {0}
LOG_SEND_CLIENT_PREFIX_MESSAGE=> {0}{1}
LOG_SET_SOCKET_TIMEOUT=Expiration de lecture de la connection positionnée à {0} secondes
LOG_SOCKET_BIND_FAILED=Impossible d''ouvrir le port d''écoute {1,number,#} pour {0} : port non autorisé ou utilisé par un autre processus\n
LOG_STARTING_DAVMAIL=Démarrage de la passerelle DavMail...
LOG_STOPPING_DAVMAIL=Arrêt de la passerelle DavMail...
LOG_SWT_NOT_AVAILABLE=SWT non disponible, bascule vers le support icône de notification de Java 1.6
LOG_SYSTEM_TRAY_NOT_AVAILABLE=JDK 1.6 nécessaire pour le support de l''icône de notification
LOG_UNABLE_TO_CREATE_ICON=Impossible de créer l''icône
LOG_UNABLE_TO_CREATE_LOG_FILE_DIR=Impossible de créer le répertoire de traces
LOG_UNABLE_TO_CREATE_TRAY=Impossible de créer l''icône de notification
LOG_UNABLE_TO_GET_PARSEINTWITHTAG=Erreur d''accès à la méthode BerDecoder.parseIntWithTag
LOG_UNABLE_TO_GET_RELEASED_VERSION=Impossible de récupérer le numéro de dernière version
LOG_UNABLE_TO_LOAD_IMAGE=Impossible de charger l''image
LOG_UNABLE_TO_LOAD_SETTINGS=Impossible de charger la configuration :
LOG_UNABLE_TO_OPEN_LINK=Impossible d''ouvrir le lien
LOG_UNABLE_TO_SET_ICON_IMAGE=Impossible de positionner l''icône de JDialog (non disponible en Java 1.5)
LOG_UNABLE_TO_SET_LOG_FILE_PATH=Echec à la mise à jour du chemin du fichier de traces
LOG_UNABLE_TO_SET_LOOK_AND_FEEL=Impossible de définir le style de l''interface
LOG_UNABLE_TO_SET_SYSTEM_LOOK_AND_FEEL=Impossible de définir le style natif sur l''interface
LOG_UNABLE_TO_STORE_SETTINGS=Impossible d''enregistrer la configuration
LOG_UNSUPPORTED_REQUEST=Requête non supportée : {0}
UI_ABOUT=A propos...
UI_ABOUT_DAVMAIL=A propos de la Passerelle DavMail
UI_ABOUT_DAVMAIL_AUTHOR=<html><b>Passerelle DavMail</b><br>Par Mickaël Guessant<br><br>
UI_ACCEPT_CERTIFICATE=DavMail : Accepter le certificat ?
UI_ALLOW_REMOTE_CONNECTION=Autoriser connexions distantes :
UI_ALLOW_REMOTE_CONNECTION_HELP=Autoriser les connexions distantes à la passerelle (mode serveur)
UI_ANSWER_NO=n
UI_ANSWER_YES=o
UI_BIND_ADDRESS=Adresse d''écoute :
UI_BIND_ADDRESS_HELP=Ecouter seulement sur l''adresse définie
UI_BUTTON_ACCEPT=Accepter
UI_BUTTON_CANCEL=Annuler
UI_BUTTON_DENY=Refuser
UI_BUTTON_HELP=Aide
UI_BUTTON_OK=OK
UI_BUTTON_SAVE=Enregistrer
UI_CALDAV_PORT=Port HTTP Caldav :
UI_CALDAV_PORT_HELP=Port local Caldav à configurer dans le client Caldav (agenda)
UI_CALENDAR_PAST_EVENTS=Jours passés du calendrier (Caldav) :
UI_CALENDAR_PAST_EVENTS_HELP=Limiter les évènements remontés
UI_CURRENT_VERSION=Version actuelle : {0}<br>
UI_DAVMAIL_GATEWAY=Passerelle DavMail
UI_DAVMAIL_SETTINGS=Configuration Passerelle DavMail
UI_DELAYS=Délais
UI_DISABLE_UPDATE_CHECK=Désactivation contrôle version :
UI_DISABLE_UPDATE_CHECK_HELP=Désactiver le contrôle de nouvelle version disponible
UI_ENABLE_PROXY=Activer proxy :
UI_ERROR_WAITING_FOR_CERTIFICATE_CHECK=Erreur lors de l''attente de validation du certificat
UI_EXIT=Quitter
UI_FINGERPRINT=Empreinte
UI_GATEWAY=Passerelle
UI_HELP_INSTRUCTIONS=<br>Aide et instructions disponibles sur :<br><a href=\"http://davmail.sourceforge.net\">http://davmail.sourceforge.net</a><br><br>Pour envoyer des commentaires ou signaler des anomalies, <br>utiliser <a href=\"http://sourceforge.net/tracker/?group_id=184600\">DavMail Sourceforge trackers</a><br>ou me contacter à l''adresse <a href=\"mailto:mguessan@free.fr\">mguessan@free.fr</a></html>
UI_IMAP_PORT=Port IMAP local :
UI_IMAP_PORT_HELP=Port IMAP local à configurer dans le client de messagerie
UI_ISSUED_BY=Emis par
UI_ISSUED_TO=Emis pour
UI_KEEP_DELAY=Délai de rétention corbeille (POP) :
UI_KEEP_DELAY_HELP=Nombre de jours de conservation des messages dans la corbeille
UI_KEY_PASSWORD=Mot de passe clé :
UI_KEY_PASSWORD_HELP=Mot de passe clé SSL contenue dans le fichier des clés
UI_KEY_STORE=Fichier clés :
UI_KEY_STORE_HELP=Chemin du fichier contenant les clés et certificats SSL
UI_KEY_STORE_PASSWORD=Mot de passe fichier clés :
UI_KEY_STORE_PASSWORD_HELP=Mot de passe du fichier des clés
UI_KEY_STORE_TYPE=Type de fichier clés :
UI_KEY_STORE_TYPE_HELP=Choix du type de fichier de clés
UI_LAST_LOG=Dernière trace
UI_LAST_MESSAGE=Dernier message
UI_LATEST_VERSION=Dernière version disponible : {0} <br>Une nouvelle version de la Passerelle DavMail est disponible.<br><a href=\"http://sourceforge.net/project/platformdownload.php?group_id=184600\">Télécharcher la dernière version</a><br>
UI_LDAP_PORT=Port LDAP local :
UI_LDAP_PORT_HELP=Port LDAP local à configurer dans le client annuaire (carnet d''adresse)
UI_LOGGING_LEVELS=Niveaux de traces
UI_LOGS=Traces
UI_LOG_DAVMAIL=DavMail :
UI_LOG_DEFAULT=Défaut :
UI_LOG_HTTPCLIENT=HttpClient :
UI_LOG_WIRE=Réseau :
UI_NETWORK=Réseau
UI_NO_SSL=Pas de SSL
UI_OWA_URL=URL OWA (Exchange) :
UI_OWA_URL_HELP=URL de connexion Outlook Web Access
UI_POP_PORT=Port POP local :
UI_POP_PORT_HELP=Port POP local à configurer dans le client de messagerie
UI_PROXY=Proxy
UI_PROXY_PASSWORD=Mot de passe proxy :
UI_PROXY_PORT=Port du serveur proxy :
UI_PROXY_SERVER=Serveur proxy :
UI_PROXY_USER=Identifiant proxy :
UI_SENT_KEEP_DELAY=Délai de rétention envoyés (POP) :
UI_SENT_KEEP_DELAY_HELP=Nombre de jours de conservation des messages dans le dossier des messages envoyés
UI_SERIAL=Numéro de série
UI_SERVER_CERTIFICATE=Certificat Serveur (Client vers DavMail)
UI_SERVER_CERTIFICATE_HASH=Hash du certificat serveur :
UI_SERVER_CERTIFICATE_HASH_HELP=Hash du certificat accepté manuellement
UI_SETTINGS=Configuration...
UI_SHOW_LOGS=Afficher les traces...
UI_SMTP_PORT=Port SMTP local :
UI_SMTP_PORT_HELP=Port SMTP local à configurer dans le client de messagerie
UI_TAB_ADVANCED=Avancé
UI_TAB_ENCRYPTION=Chiffrement
UI_TAB_MAIN=Général
UI_TAB_PROXY=Proxy
UI_UNTRUSTED_CERTIFICATE=Le certificat fourni par le serveur n''est certifié par aucune autorité de confiance,\n vous pouvez choisir d''accepter ou de rejeter l''accès
UI_UNTRUSTED_CERTIFICATE_HTML=<html><b>Le certificat fourni par le serveur n''est certifié par aucune autorité de confiance,<br> vous pouvez choisir d''accepter ou de rejeter l''accès</b></html>
UI_VALID_FROM=Emis le
UI_VALID_UNTIL=Expire le
UI_PASSWORD_PROMPT=DavMail : Entrer le mot de passe
UI_PKCS11_LIBRARY_HELP=Chemin de la librarie PKCS11 (carte à puce) (.so or .dll)
UI_PKCS11_LIBRARY=Librairie PKCS11 :
UI_PKCS11_CONFIG_HELP=Configuration PKCS11 complémentaire optionnelle (slot, nssArgs, ...)
UI_PKCS11_CONFIG=Configuration PKCS11 :
UI_CLIENT_CERTIFICATE=Certificat client (DavMail vers Exchange)
UI_LOG_FILE_PATH=Chemin du fichier de traces :
LOG_GATEWAY_INTERRUPTED=Arrêt de la passerelle DavMail en cours
LOG_GATEWAY_STOP=Passerelle DavMail arrêtée
LOG_INVALID_TIMEZONE=Fuseau horaire invalide : {0}
MEETING_REQUEST=Invitation
LOG_ACCESS_FORBIDDEN=Accès à {0} non autorisé: {1}
LOG_LDAP_REQ_BIND_INVALID_CREDENTIALS=LDAP_REQ_BIND Utilisateur ou mot de passe invalide
LOG_LDAP_REQ_BIND_SUCCESS=LOG_LDAP_REQ_BIND Authentification réussie
LOG_EXCEPTION_CLOSING_KEYSTORE_INPUT_STREAM=Erreur à la fermeture du flux d''entrée du fichier de clés
LOG_SUBFOLDER_ACCESS_FORBIDDEN=Accès interdit au sous dossiers de {0}
LOG_FOLDER_ACCESS_FORBIDDEN=Accès interdit au dossier {0}
LOG_FOLDER_NOT_FOUND=Dossier {0} introuvable
LOG_FOLDER_ACCESS_ERROR=Erreur lors de l''accès au dossier {0} : {1}
UI_OTP_PASSWORD_PROMPT=Mot de passe du jeton :
EXCEPTION_SESSION_EXPIRED=Session Exchange expirée
UI_CLIENT_KEY_STORE_TYPE=Type de stockage :
UI_CLIENT_KEY_STORE_TYPE_HELP=Choisir le type de stockage du certificat client, PKCS11 pour une carte à puce
UI_CLIENT_KEY_STORE=Fichier certificat client :
UI_CLIENT_KEY_STORE_HELP=Chemin du fichier contenant le certificat client SSL
UI_CLIENT_KEY_STORE_PASSWORD=Mot de passe certificat client :
UI_CLIENT_KEY_STORE_PASSWORD_HELP=Mot de passe du certificat client, laisser vide pour fournir le mot de passe mode interactif
UI_TAB_LOGGING=Traces
UI_OTHER=Autres
UI_CALDAV_ALARM_SOUND=Son des alarmes Caldav :
UI_CALDAV_ALARM_SOUND_HELP=Convertir les alarmes Caldav en alarmes sonores supportées par iCal, par exemple Basso
UI_FORCE_ACTIVESYNC_UPDATE=Forcer ActiveSync :
UI_FORCE_ACTIVESYNC_UPDATE_HELP=Forcer la mise à jour des évènements Caldav pour les appareils connectés via ActiveSync
UI_DEFAULT_DOMAIN=Domaine windows par défaut :
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 :
UI_SHOW_STARTUP_BANNER=Notification au lancement :
UI_SHOW_STARTUP_BANNER_HELP=Afficher ou non la fenêtre de notification au démarrage
LOG_READ_CLIENT_AUTH_LOGIN=< AUTH LOGIN ********
UI_IMAP_IDLE_DELAY=Délai de surveillance dossier (IMAP) :
UI_IMAP_IDLE_DELAY_HELP=Délai de surveillance du dossier IMAP en minutes, laisser vide pour désactiver le support IDLE
UI_IMAP_AUTO_EXPUNGE=IMAP suppression immédiate :
UI_IMAP_AUTO_EXPUNGE_HELP=Supprimer immédiatement les messages du serveur via IMAP
EXCEPTION_EWS_NOT_AVAILABLE=Point d''accès EWS non disponible
EXCEPTION_FOLDER_NOT_FOUND=Dossier {0} non trouvé
UNKNOWN_ATTRIBUTE=Attribut inconnu: {0}
ACCEPTED=Accepté :
TENTATIVE=Provisoire :
DECLINED=Refusé :