mrpostman-cvs Mailing List for MrPostman (Page 3)
Brought to you by:
chris_humphreys,
mrbook
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(100) |
Feb
(115) |
Mar
(29) |
Apr
(17) |
May
(18) |
Jun
|
Jul
(12) |
Aug
|
Sep
|
Oct
(6) |
Nov
(2) |
Dec
(10) |
2004 |
Jan
(14) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: <chr...@us...> - 2003-05-10 04:54:50
|
Update of /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/hotmail In directory sc8-pr-cvs1:/tmp/cvs-serv13133 Modified Files: HotmailMailSession.java Log Message: Better exception reporting Index: HotmailMailSession.java =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/hotmail/HotmailMailSession.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** HotmailMailSession.java 9 May 2003 02:03:18 -0000 1.25 --- HotmailMailSession.java 10 May 2003 04:54:46 -0000 1.26 *************** *** 256,260 **** mspppostint = hiddenRedirectFormMatcher.group(3); logger.fine("mspppostint: " + mspppostint); ! String request = "mspppostint=" + URLEncoder.encode(mspppostint) + "&mspprawqs=" + URLEncoder.encode(mspprawqs); loginPageUrl = redirectUrl + "&" + request; logger.fine("Redirecting to new login page: " + loginPageUrl); --- 256,260 ---- mspppostint = hiddenRedirectFormMatcher.group(3); logger.fine("mspppostint: " + mspppostint); ! String request = "mspppostint=" + URLEncoder.encode(mspppostint, "UTF-8") + "&mspprawqs=" + URLEncoder.encode(mspprawqs, "UTF-8"); loginPageUrl = redirectUrl + "&" + request; logger.fine("Redirecting to new login page: " + loginPageUrl); *************** *** 265,270 **** rd.close(); } } catch (Exception e) { ! logger.log(Level.SEVERE, "should not happen", e); } --- 265,273 ---- rd.close(); } + } catch (java.net.ConnectException ce) { + logger.log(Level.SEVERE, "Exception during login - " + ce.getMessage(), ce); + logger.log(Level.SEVERE, "Check your network/proxy (HTTP) settings! Could not connect!"); } catch (Exception e) { ! logger.log(Level.SEVERE, "Exception during login - " + e.getMessage(), e); } *************** *** 366,371 **** } rd.close(); } catch (Exception e) { ! logger.log(Level.SEVERE, "should not happen", e); } --- 369,378 ---- } rd.close(); + + } catch (java.net.ConnectException ce) { + logger.log(Level.SEVERE, "Exception during login - " + ce.getMessage(), ce); + logger.log(Level.SEVERE, "Check your network/proxy (HTTPS) settings! Could not connect!"); } catch (Exception e) { ! logger.log(Level.SEVERE, "Exception during loging - " + e.getMessage(), e); } |
From: <lb...@us...> - 2003-05-09 19:31:59
|
Update of /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui In directory sc8-pr-cvs1:/tmp/cvs-serv30371/src/org/mrbook/mrpostman/gui Added Files: messages_de.properties Log Message: Added the new german text by Jurgen Wagner. Thank you Jurgen! --- NEW FILE: messages_de.properties --- # The GUI messages for Mr Postman # Please do not hard code user visible strings in the java code! application.title=MrPostman application.help.title=MrPostman Hilfe option.otherhosts=Zugriff von anderen Systemen auf MrPostman erlauben option.gui-startup=GUI beim Programmstart anzeigen option.log-startup=Protokollfenster beim Programmstart anzeigen labels.serverport=Server-Port : button.showlog=Protokoll anzeigen message.serverport.restartrequired=Diese Einstellung wird erst nach einem Neustart von MrPostman aktiv. proxy.useproxy=Proxy verwenden: proxy.addr=Adresse: proxy.port=Port: proxy.user=Benutzer: proxy.password=Passwort: tab.main.title=Allgemein tab.modules.title=Module tab.proxy.title=Proxy menu.file.title=Datei menu.file.item.close=GUI schliessen menu.file.item.exit=Beenden menu.help.title=Hilfe menu.help.item.using=Verwendung von MrPostman menu.help.item.about=Über MrPostman about.title=Über MrPostman about.info=@APPNAME@ @VERSION@\nBuild @DSTAMP@\n(C) 2003 The MrPostman Development Team\n\nHector Urtubia\nChris Humphreys\nLucas Bruand\nThomas O'Dowd\n\nLizensiert unter den Bedingungen "GNU Public License"\nUnter http://mrbook.org/mrpostman finden sich\nmehr Einzelheiten, Aktualisierungen und\nInformationen darüber, wie Sie einen Beitrag leisten können using.title=Verwendung von MrPostman using.info=Bitte lesen Sie die README-Datei in der JAR-Datei der Softwareauslieferung.\nMehr Informationen finden sich unter http://mrbook.org/mrpostman button.help.home=Hilfe Hauptseite button.help.back=Zurück #module info panel messages... modules.info.version.label=Version : modules.info.authors.label=Autor(en) : modules.info.options.label=Optionen : button.apply.label=Anwenden button.help.label=Hilfe #Module option messages... modules.hotmail.option.unread.label=Nur ungelesene Post modules.hotmail.option.unread.desc=Nur ungelesene Post herunterladen modules.hotmail.option.markread.label=Als gelesen markieren modules.hotmail.option.markread.desc=Die heruntergeladenen Nachrichten werden als gelesen markiert modules.another.option.markread.label=Als gelesen markieren modules.another.option.markread.desc=Die heruntergeladenen Nachrichten werden als gelesen markiert modules.another.option.debugpagehtml.label=HTML protokollieren modules.another.option.debugpagehtml.desc=Option für Softwareentwickler: wenn selektiert, wird HTML aus Webseiten protokolliert modules.another.option.summary.label=Zusammenfassung protokollieren modules.another.option.summary.desc=Option für Softwareentwickler: wenn aktiviert, wird eine E-Mail-Abrufstatistik in die Protokolldatei geschrieben modules.yahoo.option.https.label=HTTPS verwenden modules.yahoo.option.https.desc=Anstelle von HTTP wird HTTPS für den Anmeldevorgang verwendet |
From: <chr...@us...> - 2003-05-09 03:18:24
|
Update of /cvsroot/mrpostman/mrpostman/docs/html/en In directory sc8-pr-cvs1:/tmp/cvs-serv9034 Added Files: creatinglog.html Log Message: First version --- NEW FILE: creatinglog.html --- <html> <head> <title>Creating a debug log file for MrPostman</title> </head> <body> <b>Creating a debug log file for MrPostman</b> <p>To assist the MrPostman developers in diagnosing and fixing your MrPostman problem, please follow the following steps to produce a full log of your MrPostman output. It is advised to send this directly to a trusted developer when requested, rather than via the list to protect your privacy. </p> <ol> <li>Save this <a href="logging.properties">logging configuration file</a> into your directory containing the MrPostman-xxxxx.jar file. <li>Open a cmd window (shell/console window). Enure java is in your PATH (<a href="creatinglog.html#path">see here</a>) <li>Type: <pre> java -Djava.util.logging.config.file=logging.properties -jar MrPostman-xxxxx.jar </pre> (change the xxxx bit to your real filename). <br>This should launch the MrPostman GUI (<i>you didn't turn the GUI option <a href="creatinglog.html#off">off</a> did you??</i>). <li>Attempt to collect mail in the normal way <li>After you have received your error message, close MrPostman GUI. <li>Locate the output log file. The log file will have been saved in your home directory. If you are using windows it may be in one of these (depending on version): <ul> <li>\Documents and Settings\java0.log <li>\WINNT\profiles\you\java0.log </ul> (or similar. If you can't find it try doing a file search for java*.log, that may find it) <li>Open the file in a text editor (notepad may struggle if the log file is too large. I recommend using JEdit available from sourceforge). <li>Search and replace your pasword with *****. You may choose to do this for your username if you are really paranoid :-) <li>Save, attach to email and send to one of the developers (see <a href="/en/contact.html">Contact us</a>) with as much of a description of what you were doing and what type of setup you have. </ol> <p> Thanks very much - it really helps us and it will speed up your fix time. <p> Notes: <p> <a name="path"><i>Ensuring Java is in your PATH</i> <p> If you type 'java' then enter and it says: <pre>The name specified is not recognized as an internal or external command, operable program or batch file. </pre> It must be added. You can set this by typing: <pre> set PATH=%PATH%;"c:\Program Files\Java\bin" </pre> (or whatever path it is installed). <p> <a name="off"><i>Showing a hidden GUI</i> <p> The easiest way is to just run two copies of MrPostman at once. The second will pop the GUI. Check the option to Show next time. Close your two copies and start again from step 2. </body> </html> |
From: <chr...@us...> - 2003-05-09 03:17:44
|
Update of /cvsroot/mrpostman/mrpostman/docs/html In directory sc8-pr-cvs1:/tmp/cvs-serv8835 Modified Files: index.html Log Message: Added log section Index: index.html =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/docs/html/index.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.html 10 Feb 2003 03:54:33 -0000 1.2 --- index.html 9 May 2003 03:17:41 -0000 1.3 *************** *** 12,15 **** --- 12,16 ---- <li><a href="/en/acknowledge.html">Acknowledgements</a></li> <li><a href="/en/howitworks.html">How it works</a></li> + <li><a href="/en/creatinglog.html">Creating a log file</a></li> <li><a href="/en/contact.html">Contact us</a></li> </ul> |
From: <chr...@us...> - 2003-05-09 02:03:21
|
Update of /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/hotmail In directory sc8-pr-cvs1:/tmp/cvs-serv23288 Modified Files: HotmailMailSession.java Log Message: Fix for circular mails Index: HotmailMailSession.java =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/hotmail/HotmailMailSession.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** HotmailMailSession.java 7 May 2003 13:18:24 -0000 1.24 --- HotmailMailSession.java 9 May 2003 02:03:18 -0000 1.25 *************** *** 1,925 **** ! /* ! * -*- mode: java; c-basic-indent: 4; indent-tabs-mode: nil -*- ! * :indentSize=4:noTabs=true:tabSize=4:indentOnTab=true:indentOnEnter=true:mode=java: ! * ex: set tabstop=4 expandtab: ! * ! * MrPostman - webmail <-> email gateway ! * Copyright (C) 2002-2003 MrPostman Development Group ! * Projectpage: http://mrbook.org/mrpostman/ ! * ! * [...1821 lines suppressed...] ! onlyReturnUnreadMsgs = "true".equalsIgnoreCase(value); ! } else if ("hotmail.markasread".equals(optionName)) { ! flagMsgAsRead = "true".equalsIgnoreCase(value); ! } ! } ! } ! ! /** ! * Helper class used to store message info. ! */ ! class MailIdentifier { ! String MailID = null; ! boolean unread = false; ! boolean flagged = false; ! int size; ! ! public String toString() { ! return new String("MailID=" + MailID + ", unread=" + unread + " flagged=" + flagged + " size=" + size); ! } ! } |
From: <lb...@us...> - 2003-05-08 08:39:31
|
Update of /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui In directory sc8-pr-cvs1:/tmp/cvs-serv32363/src/org/mrbook/mrpostman/gui Modified Files: messages_fr.properties Log Message: Translation. Index: messages_fr.properties =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui/messages_fr.properties,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** messages_fr.properties 8 May 2003 07:59:02 -0000 1.12 --- messages_fr.properties 8 May 2003 08:39:26 -0000 1.13 *************** *** 128,130 **** modules.yahoo.option.https.label=Use HTTPS ! modules.yahoo.option.https.desc=Use HTTPS rather than HTTP for signon --- 128,130 ---- modules.yahoo.option.https.label=Use HTTPS ! modules.yahoo.option.https.desc=Utiliser HTTPS plutot que HTTP pour s'authentifier. |
From: <chr...@us...> - 2003-05-08 07:59:05
|
Update of /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui In directory sc8-pr-cvs1:/tmp/cvs-serv20216 Modified Files: messages_fr.properties Log Message: Added Yahoo https option Index: messages_fr.properties =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui/messages_fr.properties,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** messages_fr.properties 7 May 2003 17:53:25 -0000 1.11 --- messages_fr.properties 8 May 2003 07:59:02 -0000 1.12 *************** *** 127,128 **** --- 127,130 ---- modules.another.option.summary.desc=Option developpeur - Ecrit un résumé des mails dans un fichier + modules.yahoo.option.https.label=Use HTTPS + modules.yahoo.option.https.desc=Use HTTPS rather than HTTP for signon |
From: <chr...@us...> - 2003-05-08 07:57:40
|
Update of /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui In directory sc8-pr-cvs1:/tmp/cvs-serv19744 Modified Files: moduleoptiongui.xml messages.properties messages_es.properties Log Message: Added Yahoo https option Index: moduleoptiongui.xml =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui/moduleoptiongui.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** moduleoptiongui.xml 17 Feb 2003 22:03:24 -0000 1.2 --- moduleoptiongui.xml 8 May 2003 07:57:37 -0000 1.3 *************** *** 46,49 **** --- 46,54 ---- <!-- YAHOO OPTIONS --> <module id="yahoo"> + <module-option id="yahoo.https"> + <label>modules.yahoo.option.https.label</label> + <desc>modules.yahoo.option.https.desc</desc> + <input type="checkbox" /> + </module-option> </module> Index: messages.properties =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui/messages.properties,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** messages.properties 7 May 2003 13:17:33 -0000 1.7 --- messages.properties 8 May 2003 07:57:37 -0000 1.8 *************** *** 60,61 **** --- 60,64 ---- modules.another.option.summary.label=Log Summary modules.another.option.summary.desc=Developer option - Writes a summary of mail collection to log file + + modules.yahoo.option.https.label=Use HTTPS + modules.yahoo.option.https.desc=Use HTTPS rather than HTTP for signon Index: messages_es.properties =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui/messages_es.properties,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** messages_es.properties 7 May 2003 13:17:33 -0000 1.6 --- messages_es.properties 8 May 2003 07:57:37 -0000 1.7 *************** *** 61,62 **** --- 61,65 ---- modules.another.option.summary.label=Log Summary modules.another.option.summary.desc=Developer option - Writes a summary of mail collection to log file + + modules.yahoo.option.https.label=Use HTTPS + modules.yahoo.option.https.desc=Use HTTPS rather than HTTP for signon |
From: <chr...@us...> - 2003-05-08 07:56:19
|
Update of /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/yahoo In directory sc8-pr-cvs1:/tmp/cvs-serv19401 Modified Files: Tag: 1.15 YahooMailSession.java Log Message: id and DELE Bug fixes and https option --- NEW FILE: YahooMailSession.java --- /* * -*- mode: java; c-basic-indent: 4; indent-tabs-mode: nil -*- * :indentSize=4:noTabs=true:tabSize=4:indentOnTab=true:indentOnEnter=true:mode=java: * ex: set tabstop=4 expandtab: * * MrPostman - webmail <-> email gateway * Copyright (C) 2002-2003 MrPostman Development Group * Projectpage: http://mrbook.org/mrpostman/ * * * 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. * In particular, this implies that users are responsible for * using MrPostman after reading the terms and conditions given * by their web-mail provider. * * You should have received a copy of the GNU General Public License * Named LICENSE in the base directory of this distribution, * if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.mrbook.mrpostman.yahoo; import com.sonalb.net.http.HTTPRedirectHandler; import com.sonalb.net.http.cookie.CookieJar; import org.mrbook.mrpostman.MailSessionException; import org.mrbook.mrpostman.ModuleInfo; import org.mrbook.mrpostman.ModuleOption; import org.mrbook.mrpostman.WebMailSession; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; import javax.net.ssl.HttpsURLConnection; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; import java.util.Iterator; import java.util.Vector; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; public class YahooMailSession extends WebMailSession { public static final String CVSID = "$Id: YahooMailSession.java,v 1.15 2003/05/08 07:56:14 chris_humphreys Exp $"; /** * Our hardcoded ModuleInfo data. */ private static final String[] AUTHORS = {"Hector Urtubia <ur...@mr...>"}; private static final ModuleOption[] OPTIONS = { new ModuleOption("yahoo.https", "true") }; private static final ModuleInfo MODULE_INFO = new ModuleInfo("yahoo", AUTHORS, "0.5", "http://mrpostman.sourceforge.net/updates/yahoo", "/en/yahoo/index.html", OPTIONS); private static Logger logger = Logger.getLogger("org.mrbook.mrpostman.yahoo.YahooMailSession"); private static String httpsLoginURL = "https://login.yahoo.com/config/login"; private static String httpLoginURL = "http://login.yahoo.com/config/login"; private static String UserAgent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010914"; private String crumb = null; private String baseUrl = null; private Vector messageIDS = null; private Vector filtereMessageIDS = null; private boolean gotNumMessages = false; private boolean useHttps = true; // private Map cookieJar=null; private CookieJar cj = null; private boolean authenticated = false; private int unread_messages = 0; private int number_messages = 0; private int limit_number_messages = 350; public int login(String username, String password, boolean secureLogin) { String username2 = username.replaceAll("@.+\\Z", ""); logger.fine("The username will be : " + username2); cj = new CookieJar(); /* we have to construct the POST request */ String postRequest = createPostRequest(username2, password); logger.fine(postRequest); try { URL url = null; HttpURLConnection conn = null; if (useHttps) { logger.info("Log-in using https"); url = new URL(httpsLoginURL + "?" + postRequest); conn = (HttpsURLConnection) url.openConnection(); } else { logger.info("Log-in using http"); url = new URL(httpLoginURL + "?" + postRequest); conn = (HttpURLConnection) url.openConnection(); } // conn.setRequestMethod("POST"); conn.setRequestProperty("User-Agent", UserAgent); conn.setRequestProperty("Conten-type", "application/x-www-form-urlencoded"); conn.setRequestProperty("Accept", "*/*"); conn.setRequestProperty("Allowed", "GET HEAD PUT"); conn.setInstanceFollowRedirects(false); // conn.setDoOutput(true); // conn.setDoInput(true); // OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream()); // wr.write(postRequest); // wr.flush(); // wr.close(); /* get the cookies */ /*getCookies(conn); getRedirectLocation(conn); */ HTTPRedirectHandler hrh = new HTTPRedirectHandler(conn); hrh.connect(); conn = (HttpURLConnection) hrh.getConnection(); //this could be either HttpURLConnection or HttpsURLConnection cj.addAll(hrh.getCookieJar()); BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line; Pattern invalidPassword = Pattern.compile("Invalid Password", Pattern.CASE_INSENSITIVE); Pattern invalidID = Pattern.compile("does not exist", Pattern.CASE_INSENSITIVE); Pattern unreadMessagesPattern = Pattern.compile("Inbox\\s\\(([0-9]+)\\)"); Pattern unreadMessagesPatternOld = Pattern.compile("Inbox\\s\\(([0-9]+)\\)"); Matcher unreadMessagesMatcher = null; while ((line = rd.readLine()) != null) { logger.finest("html: " + line); String line2 = new String(line); if (invalidID.matcher(line).find()) { logger.warning("ID does not exist"); return WebMailSession.WMS_LOGIN_FAILED; } if (invalidPassword.matcher(line2).find()) { logger.warning("Invalid Password"); return WebMailSession.WMS_LOGIN_FAILED; } unreadMessagesMatcher = unreadMessagesPattern.matcher(line2); ; if (unreadMessagesMatcher.find()) { unread_messages = (new Integer(unreadMessagesMatcher.group(1))).intValue(); logger.info("You have " + unread_messages + " unread messages"); } } rd.close(); baseUrl = getBaseURL(conn.getURL()); logger.fine("url: " + baseUrl.toString()); } catch (Exception e) { logger.log(Level.SEVERE, "should not happen", e); return WebMailSession.WMS_LOGIN_FAILED; } authenticated = true; return WebMailSession.WMS_LOGIN_OK; } private String getBaseURL(URL url) { Pattern pat = null; if (useHttps) { pat = Pattern.compile("(http%3a\\/\\/.*?)(\\/)"); } else { pat = Pattern.compile("(http:\\/\\/.*?)(\\/)"); } logger.fine("url: " + url.toString()); Matcher matcher = pat.matcher(url.toString()); matcher.reset(url.toString()); if (!matcher.find()) { logger.warning("Invalid URL\n"); } if (useHttps) { return matcher.group(1).replaceAll("%3a", ":"); } else { return matcher.group(1); } } private String createPostRequest(String username, String password) { String line = null; try { line = URLEncoder.encode(".tries", "UTF-8") + "=" + URLEncoder.encode("1", "UTF-8") + "&"; // line+= URLEncoder.encode(".done","UTF-8") + "=" + URLEncoder.encode("URL to go later","UTF-8"); line += (URLEncoder.encode(".src", "UTF-8") + "=" + URLEncoder.encode("ym", "UTF-8") + "&"); line += (URLEncoder.encode(".us", "UTF-8") + "=" + URLEncoder.encode("ym", "UTF-8") + "&"); line += (URLEncoder.encode(".intl", "UTF-8") + "=" + URLEncoder.encode("us", "UTF-8") + "&"); line += (URLEncoder.encode("login", "UTF-8") + "=" + URLEncoder.encode(username, "UTF-8") + "&"); line += (URLEncoder.encode("passwd", "UTF-8") + "=" + URLEncoder.encode(password, "UTF-8")); } catch (Exception e) { logger.log(Level.SEVERE, "should not happen", e); } return line; } public int numMessages() { if (gotNumMessages) { logger.finest("numMessages() - " + filtereMessageIDS.size()); return filtereMessageIDS.size(); } int start_message = 0; int end_message = 0; int message_index = 0; int inbox_index = 0; String inboxPath = "/ym/ShowFolder?box=Inbox&Npos="; if (!authenticated) { return -1; } try { URL url = new URL(baseUrl + inboxPath + "0"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestProperty("User-Agent", UserAgent); // conn.setRequestProperty("Content-type","application/x-www-form-urlencoded"); conn.setRequestProperty("Accept", "*/*"); conn.setRequestProperty("Allowed", "GET HEAD PUT"); conn.setInstanceFollowRedirects(false); HTTPRedirectHandler hrh = new HTTPRedirectHandler(conn); hrh.setCookieJar(cj); hrh.connect(); cj.addAll(hrh.getCookieJar()); BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line; Pattern messageRangePattern = Pattern.compile("Messages (\\d+)-(\\d+) of (\\d+)"); Pattern messageRangePatternOld = Pattern.compile("showing (\\d+)-(\\d+) of (\\d+)"); Pattern noMessagesPattern = Pattern.compile("This\\s*folder\\s*has\\s*no\\s*messages"); Pattern noMessagesPatternOld = Pattern.compile("Folder\\s*Inbox\\s*has\\s*no\\s+"); Matcher matcher = null; while ((line = br.readLine()) != null) { logger.finest("html: " + line); matcher = messageRangePattern.matcher(line); if (matcher.find()) { start_message = (new Integer(matcher.group(1))).intValue(); end_message = (new Integer(matcher.group(2))).intValue(); number_messages = (new Integer(matcher.group(3))).intValue(); logger.info("start/end/number of msgs: " + start_message + " " + end_message + " " + number_messages); } matcher = messageRangePatternOld.matcher(line); if (matcher.find()) { start_message = (new Integer(matcher.group(1))).intValue(); end_message = (new Integer(matcher.group(2))).intValue(); number_messages = (new Integer(matcher.group(3))).intValue(); logger.info("start/end/number of msgs: " + start_message + " " + end_message + " " + number_messages); } matcher = noMessagesPattern.matcher(line); if (matcher.find()) { number_messages = 0; return 0; } matcher = noMessagesPattern.matcher(line); if (matcher.find()) { number_messages = 0; return 0; } } // Now that we know the total number of messages, parse the message // ID's if (messageIDS == null) { messageIDS = new Vector(); } while ((message_index < number_messages) && (message_index < limit_number_messages)) { url = new URL(baseUrl + inboxPath + inbox_index); conn = (HttpURLConnection) url.openConnection(); conn.setRequestProperty("User-Agent", UserAgent); conn.setRequestProperty("Accept", "*/*"); conn.setRequestProperty("Allowed", "GET HEAD PUT"); conn.setInstanceFollowRedirects(false); hrh = new HTTPRedirectHandler(conn); hrh.setCookieJar(cj); hrh.connect(); cj.addAll(hrh.getCookieJar()); br = new BufferedReader(new InputStreamReader(conn.getInputStream())); Pattern msgidPattern = Pattern.compile("ShowLetter\\?MsgId=([0-9_\\-]+)"); Pattern flaggedPattern = Pattern.compile("flag\\.gif"); Pattern unreadPattern = Pattern.compile("\\<b\\>"); Pattern sizePattern = Pattern.compile("(\\<b\\>|\\A\\s+|\\A)([0-9]+)(b|k)"); Pattern attchPattern = Pattern.compile("\\#attachments"); Pattern crumbPattern = Pattern.compile("name=\".crumb\" value=\"(.*?)\""); Matcher crumbMatcher = null; Matcher attchMatcher = null; boolean flagged = false; boolean have_size = false; boolean have_msgid = false; MailIdentifier mi = new MailIdentifier(); while ((line = br.readLine()) != null) { crumbMatcher = crumbPattern.matcher(line); if (crumbMatcher.find()) { crumb = crumbMatcher.group(1); logger.info("Found crumb = " + crumb); } matcher = msgidPattern.matcher(line); if (matcher.find()) { if (!foundID(matcher.group(1))) { logger.warning("Found a new message id: " + matcher.group(1)); attchMatcher = attchPattern.matcher(line); if (attchMatcher.find()) { // do nothing } else if (!have_msgid && have_size) { logger.finest("!have_msgid && have_size"); mi.MailID = new String(matcher.group(1)); mi.flagged = flagged; flagged = false; mi.unread = false; matcher = unreadPattern.matcher(line); if (matcher.find()) { mi.unread = true; } line = br.readLine(); matcher = unreadPattern.matcher(line); if (matcher.find()) { mi.unread = true; } messageIDS.add(mi); message_index++; logger.fine("MsgId: " + mi + " added to message list (code section a)"); mi = new MailIdentifier(); have_msgid = false; have_size = false; } else if (!have_msgid && !have_size) { logger.finest("!have_msgid && !have_size"); mi.MailID = new String(matcher.group(1)); mi.flagged = flagged; flagged = false; mi.unread = false; matcher = unreadPattern.matcher(line); if (matcher.find()) { mi.unread = true; } line = br.readLine(); matcher = unreadPattern.matcher(line); if (matcher.find()) { mi.unread = true; } have_msgid = true; } } } matcher = flaggedPattern.matcher(line); if (matcher.find()) { logger.info("flag"); flagged = true; } matcher = sizePattern.matcher(line); if (matcher.find()) { logger.fine(matcher.group(0)); logger.fine(line); int sizenn = (new Integer(matcher.group(2))).intValue(); if (matcher.group(3).equals("k")) { sizenn *= 1024; } if (!have_msgid && !have_size) { mi.size = sizenn; have_size = true; } else if (have_msgid && !have_size) { logger.finest("have_msgid && !have_size"); mi.size = sizenn; messageIDS.add(mi); logger.fine("MsgId: " + mi + " added to message list (code section b)"); mi = new MailIdentifier(); message_index++; have_msgid = false; have_size = false; flagged = false; } } } inbox_index++; } } catch (Exception e) { logger.log(Level.SEVERE, "should not happen", e); } if (filtereMessageIDS == null) { filtereMessageIDS = new Vector(); } for (Iterator i = messageIDS.iterator(); i.hasNext();) { MailIdentifier mi = (MailIdentifier) i.next(); // here is the filter // the default is if the message is unread if (mi.unread) { filtereMessageIDS.add(mi); } } gotNumMessages = true; logger.finest("numMessages() - " + filtereMessageIDS.size()); return filtereMessageIDS.size(); } private boolean foundID(String messageID) { for (Iterator i = messageIDS.iterator(); i.hasNext();) { MailIdentifier mi = (MailIdentifier) i.next(); if (mi.MailID.equals(messageID)) { return true; } } return false; } public void printMessageNumber(int number) { if (number >= number_messages) { return; } String bodyPart1 = "/ym/ShowLetter?box=Inbox&MsgId="; String bodyPart2 = "&bodyPart="; /* print the header first */ try { URL url = new URL(baseUrl + bodyPart1 + (String) messageIDS.elementAt(number) + bodyPart2 + "HEADER"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestProperty("User-Agent", UserAgent); conn.setRequestProperty("Accept", "*/*"); conn.setRequestProperty("Allowed", "GET HEAD PUT"); conn.setInstanceFollowRedirects(false); HTTPRedirectHandler hrh = new HTTPRedirectHandler(conn); hrh.setCookieJar(cj); hrh.connect(); cj.addAll(hrh.getCookieJar()); BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line = null; while ((line = br.readLine()) != null) { logger.finest("html: " + line); } /* now the text or body of the message */ url = new URL(baseUrl + bodyPart1 + (String) messageIDS.elementAt(number) + bodyPart2 + "TEXT"); conn = (HttpURLConnection) url.openConnection(); conn.setRequestProperty("User-Agent", UserAgent); conn.setRequestProperty("Accept", "*/*"); conn.setRequestProperty("Allowed", "GET HEAD PUT"); conn.setInstanceFollowRedirects(false); hrh = new HTTPRedirectHandler(conn); hrh.setCookieJar(cj); hrh.connect(); cj.addAll(hrh.getCookieJar()); br = new BufferedReader(new InputStreamReader(conn.getInputStream())); line = null; while ((line = br.readLine()) != null) { logger.finest("html: " + line); } } catch (Exception e) { logger.log(Level.SEVERE, "should not happen", e); } } // num is not zero based!!! range is from 1 -> size public int getSizeOfMessage(int num) { if (filtereMessageIDS == null) { numMessages(); } if ((num > filtereMessageIDS.size()) || (num < 1)) { return -1; } MailIdentifier mi = (MailIdentifier) filtereMessageIDS.elementAt(num - 1); return mi.size; } //one based public void outputMessage(int num, PrintWriter pw) { if ((num > numMessages()) || (num < 1)) { return; } String bodyPart1 = "/ym/ShowLetter?box=Inbox&MsgId="; String bodyPart2 = "&bodyPart="; /* print the header first */ Pattern badHeader1 = Pattern.compile("\\AFrom\\s+"); try { URL url = new URL(baseUrl + bodyPart1 + ((MailIdentifier) (filtereMessageIDS.elementAt(num - 1))).MailID + bodyPart2 + "HEADER"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestProperty("User-Agent", UserAgent); conn.setRequestProperty("Accept", "*/*"); conn.setRequestProperty("Allowed", "GET HEAD PUT"); conn.setInstanceFollowRedirects(false); HTTPRedirectHandler hrh = new HTTPRedirectHandler(conn); hrh.setCookieJar(cj); hrh.connect(); cj.addAll(hrh.getCookieJar()); BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line = null; while ((line = br.readLine()) != null) { if (!badHeader1.matcher(line).find()) { pw.print(line + "\r\n"); } } /* now the text or body of the message */ url = new URL(baseUrl + bodyPart1 + ((MailIdentifier) (filtereMessageIDS.elementAt(num - 1))).MailID + bodyPart2 + "TEXT"); conn = (HttpURLConnection) url.openConnection(); conn.setRequestProperty("User-Agent", UserAgent); conn.setRequestProperty("Accept", "*/*"); conn.setRequestProperty("Allowed", "GET HEAD PUT"); conn.setInstanceFollowRedirects(false); hrh = new HTTPRedirectHandler(conn); hrh.setCookieJar(cj); hrh.connect(); cj.addAll(hrh.getCookieJar()); br = new BufferedReader(new InputStreamReader(conn.getInputStream())); line = null; while ((line = br.readLine()) != null) { pw.print(line + "\r\n"); } } catch (Exception e) { logger.log(Level.SEVERE, "should not happen", e); } } //one based public void outputLinesMessage(int num, PrintWriter pw, int numLines) { if ((num > numMessages()) || (num < 1)) { return; } String bodyPart1 = "/ym/ShowLetter?box=Inbox&MsgId="; String bodyPart2 = "&bodyPart="; int linesSent = 0; /* print the header first */ Pattern badHeader1 = Pattern.compile("\\AFrom\\s+"); try { URL url = new URL(baseUrl + bodyPart1 + ((MailIdentifier) (filtereMessageIDS.elementAt(num - 1))).MailID + bodyPart2 + "HEADER"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestProperty("User-Agent", UserAgent); conn.setRequestProperty("Accept", "*/*"); conn.setRequestProperty("Allowed", "GET HEAD PUT"); conn.setInstanceFollowRedirects(false); HTTPRedirectHandler hrh = new HTTPRedirectHandler(conn); hrh.setCookieJar(cj); hrh.connect(); cj.addAll(hrh.getCookieJar()); BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line = null; while ((line = br.readLine()) != null) { if (!badHeader1.matcher(line).find()) { pw.print(line + "\r\n"); } } /* now the text or body of the message */ url = new URL(baseUrl + bodyPart1 + ((MailIdentifier) (filtereMessageIDS.elementAt(num - 1))).MailID + bodyPart2 + "TEXT"); conn = (HttpURLConnection) url.openConnection(); conn.setRequestProperty("User-Agent", UserAgent); conn.setRequestProperty("Accept", "*/*"); conn.setRequestProperty("Allowed", "GET HEAD PUT"); conn.setInstanceFollowRedirects(false); hrh = new HTTPRedirectHandler(conn); hrh.setCookieJar(cj); hrh.connect(); cj.addAll(hrh.getCookieJar()); br = new BufferedReader(new InputStreamReader(conn.getInputStream())); line = null; while (((line = br.readLine()) != null) && (linesSent < numLines)) { pw.print(line + "\r\n"); linesSent++; } } catch (Exception e) { logger.log(Level.SEVERE, "should not happen", e); ; } } public String getUniqueMessageId(int num) throws MailSessionException { int numMsgs = numMessages(); if ((num > numMsgs) || (num < 1)) { logger.info("getUniqueMessageId - id out of range (" + num + "/" + numMsgs); return ""; } if (messageIDS == null) { return ""; } MailIdentifier mi = (MailIdentifier) messageIDS.elementAt(num - 1); return mi.MailID; } public void quitSession() { /* do nothing */ } public boolean deleteMessage(int number) throws MailSessionException { if ((number > numMessages()) || (number < 1)) { logger.info("DeleteMessage - id out of range (" + number + "/" + number_messages + ")"); return false; } logger.info("Deleting message id: " + number + " " + ((MailIdentifier) (filtereMessageIDS.elementAt(number - 1))).MailID); String bodyPart1 = "/ym/ShowFolder?box=Inbox&DEL=Delete&Mid="; /* print the header first */ try { URL url = new URL(baseUrl + bodyPart1 + ((MailIdentifier) (filtereMessageIDS.elementAt(number - 1))).MailID + "&.crumb=" + crumb); //(String)( messageIDS.elementAt(number))); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestProperty("User-Agent", UserAgent); conn.setRequestProperty("Accept", "*/*"); conn.setRequestProperty("Allowed", "GET HEAD PUT"); conn.setInstanceFollowRedirects(false); HTTPRedirectHandler hrh = new HTTPRedirectHandler(conn); hrh.setCookieJar(cj); hrh.connect(); cj.addAll(hrh.getCookieJar()); BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line = null; while ((line = br.readLine()) != null) { logger.finest("html: " + line); } } catch (Exception e) { logger.log(Level.SEVERE, "should not happen", e); } return true; } public String getModuleName() { return MODULE_INFO.getModuleID(); } public String[] getRecognizedExtensions() { String[] extensions = {"@yahoo.com", "@yahoo.com.au", "@yahoo.co.uk"}; return extensions; } /** * Return the module info. */ public ModuleInfo getModuleInfo() { return MODULE_INFO; } /** * Set a module option with a value from the preferences or from the GUI * Currently understood options are listed in the MODULE_INFO specification above. */ public void setOption(String optionName, String value) { if ("yahoo.https".equals(optionName)) { useHttps = "true".equalsIgnoreCase(value); } } } class MailIdentifier { String MailID = null; boolean unread = false; boolean flagged = false; int size; public String toString() { return new String("MailID=" + MailID + ", unread=" + unread + " flagged=" + flagged + " size=" + size); } } |
From: <lb...@us...> - 2003-05-07 17:53:29
|
Update of /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui In directory sc8-pr-cvs1:/tmp/cvs-serv27475/src/org/mrbook/mrpostman/gui Modified Files: messages_fr.properties Log Message: Changes for the french version. Index: messages_fr.properties =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui/messages_fr.properties,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** messages_fr.properties 7 May 2003 13:17:33 -0000 1.10 --- messages_fr.properties 7 May 2003 17:53:25 -0000 1.11 *************** *** 1,64 **** ! # The GUI messages for Mr Postman ! # Please do not hard code user visible strings in the java code! ! ! ! application.title=MrPostman ! application.help.title=Aide sur MrPostman ! ! option.otherhosts=Autoriser l'accès au serveur depuis d'autres machines clientes ! option.gui-startup=Ouvrir la fenêtre graphique au démarrage du programme ! option.log-startup=Ouvrir le journal des événements au démarrage du programme ! ! labels.serverport=Port d'écoute ! message.serverport.restartrequired=You must Restart MrPostman for this to take effect. ! ! button.showlog=Ouvrir le journal des événements ! ! proxy.useproxy=use Proxy Configuration: ! proxy.addr=address: ! proxy.port=port: ! proxy.user=user: ! proxy.password=password: ! ! tab.main.title=Principal ! tab.modules.title=Modules ! tab.proxy.title=Proxy ! ! menu.file.title=Fichier ! menu.file.item.close=Fermer la fenêtre. ! menu.file.item.exit=Quitter ! ! menu.help.title=Aide ! menu.help.item.using=Comment utiliser MrPostman ! menu.help.item.about=A propos ! ! about.title=A propos ! about.info=@APPNAME@ @VERSION@\nBuild @DSTAMP@\n(c) 2003 The MrPostman Development Team\nHector Urtubia\nChris Humphreys\nLucas Bruand\nThomas O'Dowd\nDistribué sous licence GNU\nVoir http://mrbook.org/mrpostman pour les mises à jour\net comment contribuer. ! ! using.title=Utiliser MrPostman ! using.info=Veuillez vous référer au document README attaché au JAR.\nPour plus d'informations, voir http://mrbook.org/mrpostman ! ! button.help.home=Page de garde de l'aide ! button.help.back=Précedente ! ! #module info panel messages... ! ! modules.info.version.label=Version : ! modules.info.authors.label=Auteur(s) : ! modules.info.options.label=Options : ! button.apply.label=Appliquer ! button.help.label=Aide ! ! #Module option messages... ! ! modules.hotmail.option.unread.label=Lire les Non-lus ! modules.hotmail.option.unread.desc=Lire les messages non-lus ! modules.hotmail.option.markread.label=marquer comme lus ! modules.hotmail.option.markread.desc=Marquer les messages téléchargés comme lus. ! ! modules.another.option.markread.label=Annoter comme lus ! modules.another.option.markread.desc=Marquer les messages téléchargés comme lus. ! modules.another.option.debugpagehtml.label=Debug HTML ! modules.another.option.debugpagehtml.desc=Option developpeur - journalise les pages web. ! modules.another.option.summary.label=Résumé des journaux ! modules.another.option.summary.desc=Option developpeur - Ecrit un résumé des mails dans un fichier --- 1,128 ---- ! # The GUI messages for Mr Postman ! ! # Please do not hard code user visible strings in the java code! ! ! ! ! ! ! application.title=MrPostman ! ! application.help.title=Aide sur MrPostman ! ! ! ! option.otherhosts=Autoriser l'accès au serveur depuis d'autres machines clientes ! ! option.gui-startup=Ouvrir la fenêtre graphique au démarrage du programme ! ! option.log-startup=Ouvrir le journal des événements au démarrage du programme ! ! ! ! labels.serverport=Port d'écoute ! ! message.serverport.restartrequired=Vous devez relancer MrPostman pour que ce changement prenne effet. ! ! ! ! button.showlog=Ouvrir le journal des événements ! ! ! ! proxy.useproxy=utiliser la configuration proxy: ! ! proxy.addr=adresse: ! ! proxy.port=port: ! ! proxy.user=utilisateur: ! ! proxy.password=mot de passe: ! ! ! ! tab.main.title=Principal ! ! tab.modules.title=Modules ! ! tab.proxy.title=Proxy ! ! ! ! menu.file.title=Fichier ! ! menu.file.item.close=Fermer la fenêtre. ! ! menu.file.item.exit=Quitter ! ! ! ! menu.help.title=Aide ! ! menu.help.item.using=Comment utiliser MrPostman ! ! menu.help.item.about=A propos ! ! ! ! about.title=A propos ! ! about.info=@APPNAME@ @VERSION@\nBuild @DSTAMP@\n(c) 2003 The MrPostman Development Team\nHector Urtubia\nChris Humphreys\nLucas Bruand\nThomas O'Dowd\nDistribué sous licence GNU\nVoir http://mrbook.org/mrpostman pour les mises à jour\net comment contribuer. ! ! ! ! using.title=Utiliser MrPostman ! ! using.info=Veuillez vous référer au document README attaché au JAR.\nPour plus d'informations, voir http://mrbook.org/mrpostman ! ! ! ! button.help.home=Page de garde de l'aide ! ! button.help.back=Précedente ! ! ! ! #module info panel messages... ! ! ! ! modules.info.version.label=Version : ! ! modules.info.authors.label=Auteur(s) : ! ! modules.info.options.label=Options : ! ! button.apply.label=Appliquer ! ! button.help.label=Aide ! ! ! ! #Module option messages... ! ! ! ! modules.hotmail.option.unread.label=Lire les Non-lus ! ! modules.hotmail.option.unread.desc=Lire les messages non-lus ! ! modules.hotmail.option.markread.label=marquer comme lus ! ! modules.hotmail.option.markread.desc=Marquer les messages téléchargés comme lus. ! ! ! ! modules.another.option.markread.label=Annoter comme lus ! ! modules.another.option.markread.desc=Marquer les messages téléchargés comme lus. ! ! modules.another.option.debugpagehtml.label=Debug HTML ! ! modules.another.option.debugpagehtml.desc=Option developpeur - journalise les pages web. ! ! modules.another.option.summary.label=Résumé des journaux ! ! modules.another.option.summary.desc=Option developpeur - Ecrit un résumé des mails dans un fichier ! |
From: <chr...@us...> - 2003-05-07 13:18:27
|
Update of /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/hotmail In directory sc8-pr-cvs1:/tmp/cvs-serv1622 Modified Files: HotmailMailSession.java Log Message: bug fix Index: HotmailMailSession.java =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/hotmail/HotmailMailSession.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** HotmailMailSession.java 7 Apr 2003 01:19:33 -0000 1.23 --- HotmailMailSession.java 7 May 2003 13:18:24 -0000 1.24 *************** *** 1,851 **** ! /* ! * -*- mode: java; c-basic-indent: 4; indent-tabs-mode: nil -*- ! * :indentSize=4:noTabs=true:tabSize=4:indentOnTab=true:indentOnEnter=true:mode=java: ! * ex: set tabstop=4 expandtab: ! * ! * MrPostman - webmail <-> email gateway ! * Copyright (C) 2002-2003 MrPostman Development Group ! * Projectpage: http://mrbook.org/mrpostman/ ! * ! * [...1747 lines suppressed...] ! onlyReturnUnreadMsgs = "true".equalsIgnoreCase(value); ! } else if ("hotmail.markasread".equals(optionName)) { ! flagMsgAsRead = "true".equalsIgnoreCase(value); ! } ! } ! } ! ! /** ! * Helper class used to store message info. ! */ ! class MailIdentifier { ! String MailID = null; ! boolean unread = false; ! boolean flagged = false; ! int size; ! ! public String toString() { ! return new String("MailID=" + MailID + ", unread=" + unread + " flagged=" + flagged + " size=" + size); ! } ! } |
Update of /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui In directory sc8-pr-cvs1:/tmp/cvs-serv1220 Modified Files: MrPostmanGui.java messages.properties messages_es.properties messages_fr.properties Log Message: Added apply port change and msg Index: MrPostmanGui.java =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui/MrPostmanGui.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** MrPostmanGui.java 10 Mar 2003 22:17:01 -0000 1.18 --- MrPostmanGui.java 7 May 2003 13:17:33 -0000 1.19 *************** *** 1,642 **** ! /* ! * -*- mode: java; c-basic-indent: 4; indent-tabs-mode: nil -*- ! * :indentSize=4:noTabs=true:tabSize=4:indentOnTab=true:indentOnEnter=true:mode=java: ! * ex: set tabstop=4 expandtab: ! * ! * MrPostman - webmail <-> email gateway ! * Copyright (C) 2002-2003 MrPostman Development Group ! * Projectpage: http://mrbook.org/mrpostman/ ! * ! * [...1278 lines suppressed...] ! //GEN-LAST:event_allowHostsCheckBoxActionPerformed ! ! /** Exit the Application */ ! private void exitForm(java.awt.event.WindowEvent evt) { //GEN-FIRST:event_exitForm ! MrPostman.getMainInstance().userprefs.putBoolean("useProxy", useProxy.isSelected()); ! MrPostman.getMainInstance().userprefs.put("proxyAddr", proxyAddr.getText()); ! MrPostman.getMainInstance().userprefs.put("proxyPort", proxyPort.getText()); ! mpn.exit(); ! } ! ! //GEN-LAST:event_exitForm ! ! /** ! * @param args the command line arguments ! */ ! public static void main(String[] args) { ! new MrPostmanGui(null).show(); ! } ! // End of variables declaration//GEN-END:variables ! } Index: messages.properties =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui/messages.properties,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** messages.properties 6 Mar 2003 19:03:28 -0000 1.6 --- messages.properties 7 May 2003 13:17:33 -0000 1.7 *************** *** 1,61 **** ! # The GUI messages for Mr Postman ! # Please do not hard code user visible strings in the java code! ! ! application.title=MrPostman ! application.help.title=MrPostman Help ! ! option.otherhosts=Allow other hosts to use MrPostman ! option.gui-startup=Run the GUI when program starts ! option.log-startup=Open Log window when program starts ! labels.serverport=Server Port : ! ! button.showlog=Show Log ! ! proxy.useproxy=use Proxy Configuration: ! proxy.addr=address: ! proxy.port=port: ! proxy.user=user: ! proxy.password=password: ! ! tab.main.title=Main ! tab.modules.title=Modules ! tab.proxy.title=Proxy ! ! menu.file.title=File ! menu.file.item.close=Close GUI ! menu.file.item.exit=Exit ! ! menu.help.title=Help ! menu.help.item.using=Using MrPostman ! menu.help.item.about=About ! ! about.title=About ! about.info=@APPNAME@ @VERSION@\nBuild @DSTAMP@\n(C) 2003 The MrPostman Development Team\n\nHector Urtubia\nChris Humphreys\nLucas Bruand\nThomas O'Dowd\n\nLicensed under the terms of the GNU Public License\nVisit http://mrbook.org/mrpostman for updates\nand see how you can contribute ! ! using.title=Using MrPostman ! using.info=Please refer to the README file packaged on the executable JAR.\nFor more information, visit http://mrbook.org/mrpostman ! ! button.help.home=Help Home ! button.help.back=Back ! ! #module info panel messages... ! ! modules.info.version.label=Version : ! modules.info.authors.label=Author(s) : ! modules.info.options.label=Options : ! button.apply.label=Apply ! button.help.label=Help ! ! #Module option messages... ! ! modules.hotmail.option.unread.label=Unread Only ! modules.hotmail.option.unread.desc=Collect only Unread mail ! modules.hotmail.option.markread.label=Mark read ! modules.hotmail.option.markread.desc=Flag the collected messages as read ! ! modules.another.option.markread.label=Mark read ! modules.another.option.markread.desc=Flag the collected messages as read ! modules.another.option.debugpagehtml.label=Debug HTML ! modules.another.option.debugpagehtml.desc=Developer option - when selected logs web page html to log file ! modules.another.option.summary.label=Log Summary ! modules.another.option.summary.desc=Developer option - Writes a summary of mail collection to log file --- 1,61 ---- ! # The GUI messages for Mr Postman ! # Please do not hard code user visible strings in the java code! ! ! application.title=MrPostman ! application.help.title=MrPostman Help ! ! option.otherhosts=Allow other hosts to use MrPostman ! option.gui-startup=Run the GUI when program starts ! option.log-startup=Open Log window when program starts ! labels.serverport=Server Port : ! button.showlog=Show Log ! message.serverport.restartrequired=You must Restart MrPostman for this to take effect. ! ! proxy.useproxy=use Proxy Configuration: ! proxy.addr=address: ! proxy.port=port: ! proxy.user=user: ! proxy.password=password: ! ! tab.main.title=Main ! tab.modules.title=Modules ! tab.proxy.title=Proxy ! ! menu.file.title=File ! menu.file.item.close=Close GUI ! menu.file.item.exit=Exit ! ! menu.help.title=Help ! menu.help.item.using=Using MrPostman ! menu.help.item.about=About ! ! about.title=About ! about.info=@APPNAME@ @VERSION@\nBuild @DSTAMP@\n(C) 2003 The MrPostman Development Team\n\nHector Urtubia\nChris Humphreys\nLucas Bruand\nThomas O'Dowd\n\nLicensed under the terms of the GNU Public License\nVisit http://mrbook.org/mrpostman for updates\nand see how you can contribute ! ! using.title=Using MrPostman ! using.info=Please refer to the README file packaged on the executable JAR.\nFor more information, visit http://mrbook.org/mrpostman ! ! button.help.home=Help Home ! button.help.back=Back ! ! #module info panel messages... ! ! modules.info.version.label=Version : ! modules.info.authors.label=Author(s) : ! modules.info.options.label=Options : ! button.apply.label=Apply ! button.help.label=Help ! ! #Module option messages... ! ! modules.hotmail.option.unread.label=Unread Only ! modules.hotmail.option.unread.desc=Collect only Unread mail ! modules.hotmail.option.markread.label=Mark read ! modules.hotmail.option.markread.desc=Flag the collected messages as read ! ! modules.another.option.markread.label=Mark read ! modules.another.option.markread.desc=Flag the collected messages as read ! modules.another.option.debugpagehtml.label=Debug HTML ! modules.another.option.debugpagehtml.desc=Developer option - when selected logs web page html to log file ! modules.another.option.summary.label=Log Summary ! modules.another.option.summary.desc=Developer option - Writes a summary of mail collection to log file Index: messages_es.properties =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui/messages_es.properties,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** messages_es.properties 6 Mar 2003 19:03:28 -0000 1.5 --- messages_es.properties 7 May 2003 13:17:33 -0000 1.6 *************** *** 1,61 **** ! # The GUI messages for Mr Postman ! # Please do not hard code user visible strings in the java code! ! ! application.title=MrPostman ! application.help.title=MrPostman Help ! ! option.otherhosts=Autorizar a otros para usar esta instancia de Mrpostman ! option.gui-startup=Mostrar la interfaz grafica al correr el programa ! option.log-startup=Abrir la ventana de mensajes al correr el programa ! labels.serverport=Puerto del Servidor: ! ! button.showlog=Mostrar mensajes ! ! proxy.useproxy=use Proxy Configuration: ! proxy.addr=address: ! proxy.port=port: ! proxy.user=user: ! proxy.password=password: ! ! tab.main.title=Principal ! tab.modules.title=Modulos ! tab.proxy.title=Proxy ! ! menu.file.title=Archivo ! menu.file.item.close=Cerrar la ventana ! menu.file.item.exit=Salir ! ! menu.help.title=Ayuda ! menu.help.item.using=Usando MrPostman ! menu.help.item.about=Acerca del programa ! ! about.title=Acerca ! about.info=@APPNAME@ @VERSION@\nBuild @DSTAMP@\n(C) 2003 The MrPostman Development Team\nHector Urtubia\nChris Humphreys\nLucas Bruand\nThomas O'Dowd\nLicensiado bajo los terminos de la licensia GPL.\nVisite http://mrbook.org/mrpostman para actualizaciones\ny vea como ud. puede contribuir con el proyecto. ! ! using.title=Usando MrPostman ! using.info=Por favor vea el archivo README que viene empaquetado en el JAR ejecutable. Para mas informacion, visite http://mrbook.org/mrpostman ! ! button.help.home=Help Home ! button.help.back=Back ! ! #module info panel messages... ! ! modules.info.version.label=Version : ! modules.info.authors.label=Autor(es) : ! modules.info.options.label=Opciones : ! button.apply.label=Aplicar ! button.help.label=Help ! ! #Module option messages... ! ! modules.hotmail.option.unread.label=Unread Only ! modules.hotmail.option.unread.desc=Collect only Unread mail ! modules.hotmail.option.markread.label=Mark read ! modules.hotmail.option.markread.desc=Flag the collected messages as read ! ! modules.another.option.markread.label=Mark read ! modules.another.option.markread.desc=Flag the collected messages as read ! modules.another.option.debugpagehtml.label=Debug HTML ! modules.another.option.debugpagehtml.desc=Developer option - when selected logs web page html to log file ! modules.another.option.summary.label=Log Summary ! modules.another.option.summary.desc=Developer option - Writes a summary of mail collection to log file --- 1,62 ---- ! # The GUI messages for Mr Postman ! # Please do not hard code user visible strings in the java code! ! ! application.title=MrPostman ! application.help.title=MrPostman Help ! ! option.otherhosts=Autorizar a otros para usar esta instancia de Mrpostman ! option.gui-startup=Mostrar la interfaz grafica al correr el programa ! option.log-startup=Abrir la ventana de mensajes al correr el programa ! labels.serverport=Puerto del Servidor: ! message.serverport.restartrequired=You must Restart MrPostman for this to take effect. ! ! button.showlog=Mostrar mensajes ! ! proxy.useproxy=use Proxy Configuration: ! proxy.addr=address: ! proxy.port=port: ! proxy.user=user: ! proxy.password=password: ! ! tab.main.title=Principal ! tab.modules.title=Modulos ! tab.proxy.title=Proxy ! ! menu.file.title=Archivo ! menu.file.item.close=Cerrar la ventana ! menu.file.item.exit=Salir ! ! menu.help.title=Ayuda ! menu.help.item.using=Usando MrPostman ! menu.help.item.about=Acerca del programa ! ! about.title=Acerca ! about.info=@APPNAME@ @VERSION@\nBuild @DSTAMP@\n(C) 2003 The MrPostman Development Team\nHector Urtubia\nChris Humphreys\nLucas Bruand\nThomas O'Dowd\nLicensiado bajo los terminos de la licensia GPL.\nVisite http://mrbook.org/mrpostman para actualizaciones\ny vea como ud. puede contribuir con el proyecto. ! ! using.title=Usando MrPostman ! using.info=Por favor vea el archivo README que viene empaquetado en el JAR ejecutable. Para mas informacion, visite http://mrbook.org/mrpostman ! ! button.help.home=Help Home ! button.help.back=Back ! ! #module info panel messages... ! ! modules.info.version.label=Version : ! modules.info.authors.label=Autor(es) : ! modules.info.options.label=Opciones : ! button.apply.label=Aplicar ! button.help.label=Help ! ! #Module option messages... ! ! modules.hotmail.option.unread.label=Unread Only ! modules.hotmail.option.unread.desc=Collect only Unread mail ! modules.hotmail.option.markread.label=Mark read ! modules.hotmail.option.markread.desc=Flag the collected messages as read ! ! modules.another.option.markread.label=Mark read ! modules.another.option.markread.desc=Flag the collected messages as read ! modules.another.option.debugpagehtml.label=Debug HTML ! modules.another.option.debugpagehtml.desc=Developer option - when selected logs web page html to log file ! modules.another.option.summary.label=Log Summary ! modules.another.option.summary.desc=Developer option - Writes a summary of mail collection to log file Index: messages_fr.properties =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/gui/messages_fr.properties,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** messages_fr.properties 7 Mar 2003 22:02:10 -0000 1.9 --- messages_fr.properties 7 May 2003 13:17:33 -0000 1.10 *************** *** 1,63 **** ! # The GUI messages for Mr Postman ! # Please do not hard code user visible strings in the java code! ! ! ! application.title=MrPostman ! application.help.title=Aide sur MrPostman ! ! option.otherhosts=Autoriser l'accès au serveur depuis d'autres machines clientes ! option.gui-startup=Ouvrir la fenêtre graphique au démarrage du programme ! option.log-startup=Ouvrir le journal des événements au démarrage du programme ! ! labels.serverport=Port d'écoute ! ! button.showlog=Ouvrir le journal des événements ! ! proxy.useproxy=use Proxy Configuration: ! proxy.addr=address: ! proxy.port=port: ! proxy.user=user: ! proxy.password=password: ! ! tab.main.title=Principal ! tab.modules.title=Modules ! tab.proxy.title=Proxy ! ! menu.file.title=Fichier ! menu.file.item.close=Fermer la fenêtre. ! menu.file.item.exit=Quitter ! ! menu.help.title=Aide ! menu.help.item.using=Comment utiliser MrPostman ! menu.help.item.about=A propos ! ! about.title=A propos ! about.info=@APPNAME@ @VERSION@\nBuild @DSTAMP@\n(c) 2003 The MrPostman Development Team\nHector Urtubia\nChris Humphreys\nLucas Bruand\nThomas O'Dowd\nDistribué sous licence GNU\nVoir http://mrbook.org/mrpostman pour les mises à jour\net comment contribuer. ! ! using.title=Utiliser MrPostman ! using.info=Veuillez vous référer au document README attaché au JAR.\nPour plus d'informations, voir http://mrbook.org/mrpostman ! ! button.help.home=Page de garde de l'aide ! button.help.back=Précedente ! ! #module info panel messages... ! ! modules.info.version.label=Version : ! modules.info.authors.label=Auteur(s) : ! modules.info.options.label=Options : ! button.apply.label=Appliquer ! button.help.label=Aide ! ! #Module option messages... ! ! modules.hotmail.option.unread.label=Lire les Non-lus ! modules.hotmail.option.unread.desc=Lire les messages non-lus ! modules.hotmail.option.markread.label=marquer comme lus ! modules.hotmail.option.markread.desc=Marquer les messages téléchargés comme lus. ! ! modules.another.option.markread.label=Annoter comme lus ! modules.another.option.markread.desc=Marquer les messages téléchargés comme lus. ! modules.another.option.debugpagehtml.label=Debug HTML ! modules.another.option.debugpagehtml.desc=Option developpeur - journalise les pages web. ! modules.another.option.summary.label=Résumé des journaux ! modules.another.option.summary.desc=Option developpeur - Ecrit un résumé des mails dans un fichier --- 1,64 ---- ! # The GUI messages for Mr Postman ! # Please do not hard code user visible strings in the java code! ! ! ! application.title=MrPostman ! application.help.title=Aide sur MrPostman ! ! option.otherhosts=Autoriser l'accès au serveur depuis d'autres machines clientes ! option.gui-startup=Ouvrir la fenêtre graphique au démarrage du programme ! option.log-startup=Ouvrir le journal des événements au démarrage du programme ! ! labels.serverport=Port d'écoute ! message.serverport.restartrequired=You must Restart MrPostman for this to take effect. ! ! button.showlog=Ouvrir le journal des événements ! ! proxy.useproxy=use Proxy Configuration: ! proxy.addr=address: ! proxy.port=port: ! proxy.user=user: ! proxy.password=password: ! ! tab.main.title=Principal ! tab.modules.title=Modules ! tab.proxy.title=Proxy ! ! menu.file.title=Fichier ! menu.file.item.close=Fermer la fenêtre. ! menu.file.item.exit=Quitter ! ! menu.help.title=Aide ! menu.help.item.using=Comment utiliser MrPostman ! menu.help.item.about=A propos ! ! about.title=A propos ! about.info=@APPNAME@ @VERSION@\nBuild @DSTAMP@\n(c) 2003 The MrPostman Development Team\nHector Urtubia\nChris Humphreys\nLucas Bruand\nThomas O'Dowd\nDistribué sous licence GNU\nVoir http://mrbook.org/mrpostman pour les mises à jour\net comment contribuer. ! ! using.title=Utiliser MrPostman ! using.info=Veuillez vous référer au document README attaché au JAR.\nPour plus d'informations, voir http://mrbook.org/mrpostman ! ! button.help.home=Page de garde de l'aide ! button.help.back=Précedente ! ! #module info panel messages... ! ! modules.info.version.label=Version : ! modules.info.authors.label=Auteur(s) : ! modules.info.options.label=Options : ! button.apply.label=Appliquer ! button.help.label=Aide ! ! #Module option messages... ! ! modules.hotmail.option.unread.label=Lire les Non-lus ! modules.hotmail.option.unread.desc=Lire les messages non-lus ! modules.hotmail.option.markread.label=marquer comme lus ! modules.hotmail.option.markread.desc=Marquer les messages téléchargés comme lus. ! ! modules.another.option.markread.label=Annoter comme lus ! modules.another.option.markread.desc=Marquer les messages téléchargés comme lus. ! modules.another.option.debugpagehtml.label=Debug HTML ! modules.another.option.debugpagehtml.desc=Option developpeur - journalise les pages web. ! modules.another.option.summary.label=Résumé des journaux ! modules.another.option.summary.desc=Option developpeur - Ecrit un résumé des mails dans un fichier |
From: <lb...@us...> - 2003-05-04 22:28:56
|
Update of /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/maildotcom In directory sc8-pr-cvs1:/tmp/cvs-serv29655/src/org/mrbook/mrpostman/maildotcom Modified Files: MailDotComMailSession.java Log Message: added the @innocent.com domain for mail.com as asked in: http://sourceforge.net/forum/forum.php?thread_id=860103&forum_id=231748 Index: MailDotComMailSession.java =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/maildotcom/MailDotComMailSession.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** MailDotComMailSession.java 24 Apr 2003 06:43:22 -0000 1.24 --- MailDotComMailSession.java 4 May 2003 22:28:52 -0000 1.25 *************** *** 548,552 **** "@publicist.com", "@realtyagent.com", "@registerednurses.com", "@repairman.com", "@representative.com", "@rescueteam.com", "@scientist.com", "@sociologist.com", ! "@teacher.com", "@techie.com", "@umpire.com" }; return extensions; --- 548,552 ---- "@publicist.com", "@realtyagent.com", "@registerednurses.com", "@repairman.com", "@representative.com", "@rescueteam.com", "@scientist.com", "@sociologist.com", ! "@teacher.com", "@techie.com", "@umpire.com", "@innocent.com" }; return extensions; |
From: <lb...@us...> - 2003-04-24 22:31:13
|
Update of /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/pop In directory sc8-pr-cvs1:/tmp/cvs-serv671/src/org/mrbook/mrpostman/pop Modified Files: PopConnection.java PopServer.java Log Message: Threadpool patch applied. This feature allows the PopServer to use thread pooling to increase efficiency. ( Instanciation of thread is a costly business) Classes borrowed from public domain : http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html Index: PopConnection.java =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/pop/PopConnection.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PopConnection.java 7 Apr 2003 01:19:35 -0000 1.13 --- PopConnection.java 24 Apr 2003 22:30:33 -0000 1.14 *************** *** 48,52 **** ! public class PopConnection extends Thread { public static final String CVSID = "$Id$"; private static Logger logger = Logger.getLogger("org.mrbook.mrpostman.pop.PopConnection"); --- 48,52 ---- ! public class PopConnection implements Runnable { public static final String CVSID = "$Id$"; private static Logger logger = Logger.getLogger("org.mrbook.mrpostman.pop.PopConnection"); *************** *** 66,69 **** --- 66,70 ---- private static Pattern guiPat = Pattern.compile("\\AGUI"); private static Pattern userExtensionPat = Pattern.compile("(@.+)"); + private static final byte RESET = 0; private static final byte AUTHORIZATION = 1; private static final byte TRANSACTION = 2; *************** *** 79,82 **** --- 80,86 ---- public PopConnection(Socket clientSocket) { + setSocket(clientSocket); + } + public void setSocket(Socket clientSocket) { client = clientSocket; *************** *** 88,92 **** } state = AUTHORIZATION; ! this.start(); } --- 92,104 ---- } state = AUTHORIZATION; ! } ! public void resetSocket() throws IOException { ! if (client != null) { ! client.close(); ! } ! client = null; ! in = null; ! out = null; ! state = RESET; } *************** *** 103,107 **** done = parseLine(line); } ! sleep(100); } } catch (Exception e) { --- 115,119 ---- done = parseLine(line); } ! Thread.sleep(100); } } catch (Exception e) { *************** *** 109,113 **** } finally { try { ! client.close(); } catch (Exception e) { logger.log(Level.SEVERE, "should not happen", e); --- 121,125 ---- } finally { try { ! resetSocket(); } catch (Exception e) { logger.log(Level.SEVERE, "should not happen", e); Index: PopServer.java =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/pop/PopServer.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PopServer.java 9 Feb 2003 23:38:16 -0000 1.7 --- PopServer.java 24 Apr 2003 22:30:36 -0000 1.8 *************** *** 30,33 **** --- 30,37 ---- package org.mrbook.mrpostman.pop; + import EDU.oswego.cs.dl.util.concurrent.Executor; + import EDU.oswego.cs.dl.util.concurrent.PooledExecutor; + import EDU.oswego.cs.dl.util.concurrent.BoundedBuffer; + import org.mrbook.mrpostman.MrPostman; *************** *** 36,39 **** --- 40,44 ---- import java.net.ServerSocket; import java.net.Socket; + import java.net.SocketException; import java.util.logging.Level; *************** *** 45,50 **** --- 50,60 ---- private static Logger logger = Logger.getLogger("org.mrbook.mrpostman.pop.PopServer"); public static final int DEFAULT_PORT = 11110; + public static final int DEFAULT_BUFFERLENGTH = 10; + public static final int DEFAULT_MAXIMUM_THREADS = 10; + public static final int DEFAULT_MINIMUM_THREADS = 5; + public static final int DEFAULT_KEEPALIVE = 1000 * 60 * 5; protected int port; protected ServerSocket listenSocket; + private Executor executor; public PopServer(int port) throws IOException { *************** *** 53,56 **** --- 63,74 ---- } this.port = port; + logger.info("Starting executor"); + + executor = new PooledExecutor(new BoundedBuffer(DEFAULT_BUFFERLENGTH), DEFAULT_MAXIMUM_THREADS); + ((PooledExecutor) executor).setMinimumPoolSize(DEFAULT_MINIMUM_THREADS); + ((PooledExecutor) executor).setKeepAliveTime(DEFAULT_KEEPALIVE); + ((PooledExecutor) executor).abortWhenBlocked(); + ((PooledExecutor) executor).createThreads(DEFAULT_MINIMUM_THREADS); + logger.info("Starting PopServer on port " + port); listenSocket = new ServerSocket(port); *************** *** 58,79 **** logger.info(" PopServer started "); } ! public void run() { ! try { ! while (true) { ! Socket clientSocket = listenSocket.accept(); ! logger.info("Someone connected"); ! if (isSocketAllowed(clientSocket)) { logger.info("Connection accepted for IP " + clientSocket.getInetAddress()); ! PopConnection pc = new PopConnection(clientSocket); } else { ! logger.info("Connection refused for IP " + clientSocket.getInetAddress()); clientSocket.close(); } } - } catch (IOException e) { - logger.log(Level.SEVERE, "Should not happen! ", e); } } --- 76,116 ---- logger.info(" PopServer started "); } ! public boolean carryon = true; public void run() { ! Socket clientSocket; ! while (carryon) { ! try { ! clientSocket = listenSocket.accept(); ! } catch (SocketException ex) { ! if (carryon) { ! logger.log(Level.SEVERE, "Should not happen! Exiting from server. ", ex); ! carryon = false; ! } ! break; ! } catch (IOException ex) { ! logger.log(Level.SEVERE, "Should not happen! Exiting from server. ", ex); ! break; ! } ! logger.info("Someone connected"); ! try { if (isSocketAllowed(clientSocket)) { logger.info("Connection accepted for IP " + clientSocket.getInetAddress()); ! try { ! executor.execute(new PopConnection(clientSocket)); ! } catch (PooledExecutor.AbortException ex) { ! logger.warning("Too many connections! refused for IP " + clientSocket.getInetAddress()); ! clientSocket.close(); ! } catch (InterruptedException ex) { ! logger.warning("Interrupted exception for IP: " + clientSocket.getInetAddress()); ! } } else { ! logger.warning("Connection not allowed for IP " + clientSocket.getInetAddress()); clientSocket.close(); } + } catch (IOException e) { + logger.log(Level.FINE, " client socket close with difficulty. ", e); } } + } *************** *** 90,93 **** --- 127,146 ---- } return false; + } + public void shutdown() { + logger.info("Shutting down pop server"); + logger.fine("Halt popserver thread"); + carryon = false; + this.interrupt(); + try { + if (listenSocket != null) { + listenSocket.close(); + } + } catch (IOException e) { + logger.fine(" Not important: IOException while closing finally ListenSocket"); + } + listenSocket = null; + ((PooledExecutor) executor).shutdownAfterProcessingCurrentlyQueuedTasks(); + logger.info("pop server shut down"); } } |
From: <lb...@us...> - 2003-04-24 22:31:06
|
Update of /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman In directory sc8-pr-cvs1:/tmp/cvs-serv671/src/org/mrbook/mrpostman Modified Files: MrPostman.java Log Message: Threadpool patch applied. This feature allows the PopServer to use thread pooling to increase efficiency. ( Instanciation of thread is a costly business) Classes borrowed from public domain : http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html Index: MrPostman.java =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/MrPostman.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** MrPostman.java 3 Apr 2003 23:40:48 -0000 1.18 --- MrPostman.java 24 Apr 2003 22:30:32 -0000 1.19 *************** *** 205,209 **** public void exit() { logger.info("Exiting from application"); ! // pops.shutdown(); System.exit(1); } --- 205,209 ---- public void exit() { logger.info("Exiting from application"); ! pops.shutdown(); System.exit(1); } |
From: <lb...@us...> - 2003-04-24 22:27:59
|
Update of /cvsroot/mrpostman/mrpostman/src/EDU/oswego/cs/dl/util/concurrent In directory sc8-pr-cvs1:/tmp/cvs-serv32154/concurrent Log Message: Directory /cvsroot/mrpostman/mrpostman/src/EDU/oswego/cs/dl/util/concurrent added to the repository |
From: <lb...@us...> - 2003-04-24 22:27:50
|
Update of /cvsroot/mrpostman/mrpostman/src/EDU/oswego/cs/dl/util In directory sc8-pr-cvs1:/tmp/cvs-serv32101/util Log Message: Directory /cvsroot/mrpostman/mrpostman/src/EDU/oswego/cs/dl/util added to the repository |
From: <lb...@us...> - 2003-04-24 22:27:41
|
Update of /cvsroot/mrpostman/mrpostman/src/EDU/oswego/cs/dl In directory sc8-pr-cvs1:/tmp/cvs-serv32021/dl Log Message: Directory /cvsroot/mrpostman/mrpostman/src/EDU/oswego/cs/dl added to the repository |
From: <lb...@us...> - 2003-04-24 22:27:32
|
Update of /cvsroot/mrpostman/mrpostman/src/EDU/oswego/cs In directory sc8-pr-cvs1:/tmp/cvs-serv31937/cs Log Message: Directory /cvsroot/mrpostman/mrpostman/src/EDU/oswego/cs added to the repository |
From: <lb...@us...> - 2003-04-24 22:27:21
|
Update of /cvsroot/mrpostman/mrpostman/src/EDU/oswego In directory sc8-pr-cvs1:/tmp/cvs-serv31877/oswego Log Message: Directory /cvsroot/mrpostman/mrpostman/src/EDU/oswego added to the repository |
From: <lb...@us...> - 2003-04-24 22:27:11
|
Update of /cvsroot/mrpostman/mrpostman/src/EDU In directory sc8-pr-cvs1:/tmp/cvs-serv31797/EDU Log Message: Directory /cvsroot/mrpostman/mrpostman/src/EDU added to the repository |
From: <lb...@us...> - 2003-04-24 06:43:26
|
Update of /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/maildotcom In directory sc8-pr-cvs1:/tmp/cvs-serv8093/src/org/mrbook/mrpostman/maildotcom Modified Files: MailDotComMailSession.java Log Message: On some accounts, the regexps proved to be wrong. Index: MailDotComMailSession.java =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/maildotcom/MailDotComMailSession.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** MailDotComMailSession.java 7 Apr 2003 01:19:33 -0000 1.23 --- MailDotComMailSession.java 24 Apr 2003 06:43:22 -0000 1.24 *************** *** 198,205 **** + "<td align=\"center\">.*?</td>" // Read + "<td align=\"center\">.*?</td>" // Checkbox for selection ! + "<td><font size=\"-1\" color=\"\">(?:<B>)?(.*?)(?:</B>)?</td>" // Author = group 1 ! + "<td><a class=\"hlink\" href=\"Javascript:readPopUpMail\\('http://mail01.mail.com/scripts/mail/mesg.mail\\?folder=INBOX&order=Newest&mview=a&mstart=1&msg_uid=([0-9]+)&mprev=[0-9]*&mnext=[0-9]*'\\)\"><font size=\"-1\" color=\"000000\">(?:<b>)?(.*?)(?:</b>)?</font></a></td>" // msguid = group 2, msgsubject = group 3 ! + "<td><font size=\"-1\" color=\"000000\">(.*?)</font></td>" // Date = group 4 ! + "<td align=\"center\"><font size=\"-1\" color=\"000000\">([0-9]+)k</font></td>" // size = group 5 */ ); /* */ --- 198,205 ---- + "<td align=\"center\">.*?</td>" // Read + "<td align=\"center\">.*?</td>" // Checkbox for selection ! + "<td>(?:<font .*?>)?(?:<B>)?(.*?)(?:</B>)?</td>" // Author = group 1 ! + "<td><a class=\"hlink\" href=\"Javascript:readPopUpMail\\('http://mail01.mail.com/scripts/mail/mesg.mail\\?folder=INBOX(?:&order=.*?)?&mview=a&mstart=1&msg_uid=([0-9]+)&mprev=[0-9]*&mnext=[0-9]*'\\)\">(?:<font .*?>)?(?:<b>)?(.*?)(?:</b>)?(?:</font>)?</a></td>" // msguid = group 2, msgsubject = group 3 ! + "<td>(?:<font .*?>)?(.*?)(?:</font>)?</td>" // Date = group 4 ! + "<td align=\"center\">(?:<font .*?>)?([0-9]+)k(?:</font>)?</td>" // size = group 5 */ ); /* */ |
From: <chr...@us...> - 2003-04-17 05:08:21
|
Update of /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/yahoo In directory sc8-pr-cvs1:/tmp/cvs-serv24046 Modified Files: YahooMailSession.java Log Message: HTTPS support added by Kushal Khan Index: YahooMailSession.java =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/org/mrbook/mrpostman/yahoo/YahooMailSession.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** YahooMailSession.java 7 Apr 2003 01:19:35 -0000 1.13 --- YahooMailSession.java 17 Apr 2003 05:08:18 -0000 1.14 *************** *** 42,45 **** --- 42,46 ---- import java.io.PrintWriter; + import javax.net.ssl.HttpsURLConnection; import java.net.HttpURLConnection; import java.net.URL; *************** *** 64,68 **** "http://mrpostman.sourceforge.net/updates/yahoo", "/en/yahoo/index.html", new ModuleOption[0]); private static Logger logger = Logger.getLogger("org.mrbook.mrpostman.yahoo.YahooMailSession"); - private static String httpLoginURL = "http://login.yahoo.com/config/login"; private static String httpsLoginURL = "https://login.yahoo.com/config/login"; private static String UserAgent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010914"; --- 65,68 ---- *************** *** 89,94 **** try { ! URL url = new URL(httpLoginURL + "?" + postRequest); ! HttpURLConnection conn = (HttpURLConnection) url.openConnection(); // conn.setRequestMethod("POST"); --- 89,94 ---- try { ! URL url = new URL(httpsLoginURL + "?" + postRequest); ! HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); // conn.setRequestMethod("POST"); *************** *** 110,117 **** getRedirectLocation(conn); */ HTTPRedirectHandler hrh = new HTTPRedirectHandler(conn); hrh.connect(); ! conn = hrh.getConnection(); cj.addAll(hrh.getCookieJar()); --- 110,118 ---- getRedirectLocation(conn); */ + HTTPRedirectHandler hrh = new HTTPRedirectHandler(conn); hrh.connect(); ! conn = (HttpsURLConnection) hrh.getConnection(); cj.addAll(hrh.getCookieJar()); *************** *** 159,163 **** private String getBaseURL(URL url) { ! Pattern pat = Pattern.compile("(http:\\/\\/.*?)(\\/)"); logger.fine("url: " + url.toString()); Matcher matcher = pat.matcher(url.toString()); --- 160,164 ---- private String getBaseURL(URL url) { ! Pattern pat = Pattern.compile("(http%3a\\/\\/.*?)(\\/)"); logger.fine("url: " + url.toString()); Matcher matcher = pat.matcher(url.toString()); *************** *** 167,171 **** logger.warning("Invalid URL\n"); } ! return matcher.group(1); } --- 168,173 ---- logger.warning("Invalid URL\n"); } ! String rval = matcher.group(1).replaceAll("%3a", ":"); ! return rval; } |
From: <lb...@us...> - 2003-04-16 18:27:51
|
Update of /cvsroot/mrpostman/mrpostman In directory sc8-pr-cvs1:/tmp/cvs-serv29925 Modified Files: build.properties Log Message: 1.0 final Index: build.properties =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/build.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** build.properties 7 Apr 2003 19:08:44 -0000 1.2 --- build.properties 16 Apr 2003 18:27:43 -0000 1.3 *************** *** 1,3 **** ! project.version=1.0 RC 5 # Uncomment this property to prevent the use of checkstyle #checkstyle.notused=true --- 1,3 ---- ! project.version=1.0 final # Uncomment this property to prevent the use of checkstyle #checkstyle.notused=true |
From: <lb...@us...> - 2003-04-07 19:08:48
|
Update of /cvsroot/mrpostman/mrpostman In directory sc8-pr-cvs1:/tmp/cvs-serv19661 Modified Files: build.properties build.xml Log Message: Modified the build system so that IzPack is not necessary to compile. Added also a few useful extra features to the build system: if the "checkstyle.notused" property is set checkstyle is *NOT* used ( boosting compilation performance.) Index: build.properties =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/build.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.properties 3 Apr 2003 23:40:47 -0000 1.1 --- build.properties 7 Apr 2003 19:08:44 -0000 1.2 *************** *** 1 **** ! project.version=1.0 RC 5 \ No newline at end of file --- 1,3 ---- ! project.version=1.0 RC 5 ! # Uncomment this property to prevent the use of checkstyle ! #checkstyle.notused=true \ No newline at end of file Index: build.xml =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/build.xml,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** build.xml 3 Apr 2003 23:40:45 -0000 1.20 --- build.xml 7 Apr 2003 19:08:44 -0000 1.21 *************** *** 31,34 **** --- 31,39 ---- Mozilla's mail client etc. to different web mail services like Yahoo and Hotmail. It is being designed for extensibility so is easy to add more web mail services to it. + + Parameters: + + IZPACK_HOME: This environment variable must be set to build the IzPack windows installer. + project.version: This property can be set by modifying the build.properties file. </description> *************** *** 47,55 **** <property name="izpack.dir" value="${myenv.IZPACK_HOME}"/> - <target name="init"> <!-- Create the time stamp --> <tstamp/> <property name="inst.jarfile" value="MrPostman-${DSTAMP}.jar"/> <available classname="com.izforge.izpack.ant.IzPackTask" property="izpack.present"> <classpath id="izpack.classpath"> --- 52,71 ---- <property name="izpack.dir" value="${myenv.IZPACK_HOME}"/> <target name="init"> <!-- Create the time stamp --> <tstamp/> <property name="inst.jarfile" value="MrPostman-${DSTAMP}.jar"/> + <!-- Create the build directory structure used by compile --> + <mkdir dir="${build}"/> + + <!-- Copy over the documentation files --> + <copy todir="${build}/"> + <fileset dir="docs/html/"/> + </copy> + <!-- Create the distribution directory --> + <mkdir dir="${dist}/"/> + </target> + + <target name="init.izpack" depends="init" if="myenv.IZPACK_HOME" unless="izpack.notused"> <available classname="com.izforge.izpack.ant.IzPackTask" property="izpack.present"> <classpath id="izpack.classpath"> *************** *** 59,63 **** </classpath> </available> ! <available classname="com.puppycrawl.tools.checkstyle.Main" property="checkstyle.present"> <classpath id="checkstyle.classpath"> --- 75,81 ---- </classpath> </available> ! </target> ! ! <target name="init.checkstyle" depends="init" unless="checkstyle.notused"> <available classname="com.puppycrawl.tools.checkstyle.Main" property="checkstyle.present"> <classpath id="checkstyle.classpath"> *************** *** 67,71 **** </classpath> </available> ! <available classname="de.hunsicker.jalopy.plugin.ant.AntPlugin" property="jalopy.present"> <classpath id="jalopy.classpath"> --- 85,91 ---- </classpath> </available> ! </target> ! ! <target name="init.jalopy" depends="init" unless="jalopy.notused"> <available classname="de.hunsicker.jalopy.plugin.ant.AntPlugin" property="jalopy.present"> <classpath id="jalopy.classpath"> *************** *** 75,92 **** </classpath> </available> - - <!-- Create the build directory structure used by compile --> - <mkdir dir="${build}"/> - - <!-- Copy over the documentation files --> - <copy todir="${build}/"> - <fileset dir="docs/html/"/> - </copy> - <!-- Create the distribution directory --> - <mkdir dir="${dist}/"/> </target> <!-- This target has been used once. It is one too many.:-) --> ! <target name="jalopy" depends="init" if="jalopy.present"> <taskdef name="jalopy" classname="de.hunsicker.jalopy.plugin.ant.AntPlugin" classpathref="checkstyle.classpath"/> <jalopy fileformat="auto" --- 95,104 ---- </classpath> </available> </target> + + <!-- This target has been used once. It is one too many.:-) --> ! <target name="jalopy" depends="init.jalopy" if="jalopy.present"> <taskdef name="jalopy" classname="de.hunsicker.jalopy.plugin.ant.AntPlugin" classpathref="checkstyle.classpath"/> <jalopy fileformat="auto" *************** *** 102,107 **** </target> ! <target name="checkstyle" depends="init" if="checkstyle.present" ! description="check the codestyle"> <taskdef resource="checkstyletask.properties" classpathref="checkstyle.classpath"/> <checkstyle config="checkstyle_checks.xml"> --- 114,119 ---- </target> ! <target name="checkstyle" depends="init.checkstyle" if="checkstyle.present" ! description="check the codestyle - set the checkstyle.notused property not to use it"> <taskdef resource="checkstyletask.properties" classpathref="checkstyle.classpath"/> <checkstyle config="checkstyle_checks.xml"> *************** *** 161,165 **** </target> ! <target name="install.win32" depends="dist" if="izpack.present" description="create an installer"> <taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask" classpathref="izpack.classpath"/> --- 173,177 ---- </target> ! <target name="install.win32" depends="dist, init.izpack" if="izpack.present" description="create an installer"> <taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask" classpathref="izpack.classpath"/> *************** *** 215,219 **** <target name="tarsrc" depends="checkstyle" ! description="generate a zip of the src and everything that's need for compilation"> <tar destfile="${dist}/mrpostman-src-${DSTAMP}.tar.gz" compression="gzip"> <tarfileset dir="${basedir}" --- 227,231 ---- <target name="tarsrc" depends="checkstyle" ! description="generate a tarball of the src and everything that's needed for compilation"> <tar destfile="${dist}/mrpostman-src-${DSTAMP}.tar.gz" compression="gzip"> <tarfileset dir="${basedir}" *************** *** 227,231 **** </target> <target name="buildall" depends="tarsrc, javadoc, install.win32" ! description="build all the distribution files."/> </project> --- 239,243 ---- </target> <target name="buildall" depends="tarsrc, javadoc, install.win32" ! description="builds all the distribution files."/> </project> |