Skip to content

Commit 0911353

Browse files
committed
version bump
1 parent 3a7eb08 commit 0911353

File tree

3 files changed

+65
-22
lines changed

3 files changed

+65
-22
lines changed

docker/getversion.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ jlversion=`echo "$jlversion" | tr _ .`
2121

2222
# tadaaa!
2323
# echo $jlversion
24-
echo 2.6.1.1
24+
echo 2.6.1.6
2525

j-lawyer-client/src/com/jdimension/jlawyer/client/mail/SendAction.java

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ public class SendAction extends ProgressableAction {
702702

703703
private static final Logger log = Logger.getLogger(SendAction.class.getName());
704704
private static final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
705-
705+
706706
private List<String> attachments = null;
707707
private MailboxSetup ms = null;
708708
private boolean readReceipt = false;
@@ -751,6 +751,9 @@ public boolean execute() throws Exception {
751751

752752
this.progress("Verbinde...");
753753
Properties props = new Properties();
754+
props.setProperty("mail.imap.partialfetch", "false");
755+
props.setProperty("mail.imaps.partialfetch", "false");
756+
props.setProperty("mail.store.protocol", ms.getEmailInType());
754757

755758
if (ms.isEmailOutSsl()) {
756759
props.put("mail.smtp.ssl.enable", "true");
@@ -794,11 +797,23 @@ public boolean execute() throws Exception {
794797
props.setProperty("mail.imaps.socketFactory.port", "993");
795798
props.setProperty("mail.imaps.starttls.enable", "true");
796799
} else {
800+
801+
props.setProperty("mail.imaps.host", ms.getEmailInServer());
802+
props.setProperty("mail.imap.host", ms.getEmailInServer());
803+
804+
if (ms.isEmailInSsl())
805+
props.setProperty("mail.store.protocol", "imaps");
806+
797807
props.setProperty("mail.store.protocol", ms.getEmailInType());
798808
if (ms.isEmailInSsl()) {
799809
props.setProperty("mail." + ms.getEmailInType() + ".ssl.enable", "true");
800810
}
801-
811+
ServerSettings sset = ServerSettings.getInstance();
812+
String trustedServers = sset.getSetting("mail.imaps.ssl.trust", "");
813+
if (trustedServers.length() > 0) {
814+
props.put("mail.imaps.ssl.trust", trustedServers);
815+
}
816+
802817
}
803818

804819
javax.mail.Authenticator auth = new javax.mail.Authenticator() {
@@ -952,25 +967,31 @@ public PasswordAuthentication getPasswordAuthentication() {
952967
Store store = null;
953968
if (ms.isMsExchange()) {
954969
String authToken = MsExchangeUtils.getAuthToken(ms.getTenantId(), ms.getClientId(), ms.getClientSecret(), ms.getEmailInUser(), Crypto.decrypt(ms.getEmailInPwd()));
955-
970+
956971
session = Session.getInstance(props);
957972
store = session.getStore("imaps");
958973
store.connect(ms.getEmailInServer(), ms.getEmailInUser(), authToken);
959974

960975
} else {
961-
976+
962977
props.setProperty("mail.imaps.host", ms.getEmailInServer());
963978
props.setProperty("mail.imap.host", ms.getEmailInServer());
964-
965-
if(ms.isEmailInSsl())
979+
980+
if (ms.isEmailInSsl()) {
966981
props.setProperty("mail.store.protocol", "imaps");
967-
982+
}
983+
984+
props.setProperty("mail.store.protocol", ms.getEmailInType());
985+
if (ms.isEmailInSsl()) {
986+
props.setProperty("mail." + ms.getEmailInType() + ".ssl.enable", "true");
987+
}
968988
ServerSettings sset = ServerSettings.getInstance();
969989
String trustedServers = sset.getSetting("mail.imaps.ssl.trust", "");
970-
if (trustedServers.length() > 0)
971-
props.put("mail.imaps.ssl.trust", "mail.your-server.de");
990+
if (trustedServers.length() > 0) {
991+
props.put("mail.imaps.ssl.trust", trustedServers);
992+
}
972993

973-
store=session.getStore();
994+
store = session.getStore();
974995
//store.connect(ms.getEmailInServer(), ms.getEmailInUser(), Crypto.decrypt(ms.getEmailInPwd()));
975996
store.connect();
976997
}
@@ -983,13 +1004,15 @@ public PasswordAuthentication getPasswordAuthentication() {
9831004
Folder sent = EmailUtils.getSentFolder(store);
9841005
if (sent != null) {
9851006
this.progress("Kopiere Nachricht in 'Gesendet'...");
986-
boolean closed=!sent.isOpen();
987-
if(!sent.isOpen())
1007+
boolean closed = !sent.isOpen();
1008+
if (!sent.isOpen()) {
9881009
sent.open(Folder.READ_WRITE);
1010+
}
9891011
msg.setFlag(Flags.Flag.SEEN, true);
9901012
sent.appendMessages(new Message[]{msg});
991-
if(closed)
1013+
if (closed) {
9921014
EmailUtils.closeIfIMAP(sent);
1015+
}
9931016

9941017
} else {
9951018
log.error("Unable to determine 'Sent' folder for mailbox");

j-lawyer-client/src/com/jdimension/jlawyer/client/mail/SendEncryptedAction.java

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,9 @@ public boolean execute() throws Exception {
761761

762762
this.progress("Verbinde...");
763763
Properties props = new Properties();
764+
props.setProperty("mail.imap.partialfetch", "false");
765+
props.setProperty("mail.imaps.partialfetch", "false");
766+
props.setProperty("mail.store.protocol", ms.getEmailInType());
764767

765768
if (ms.isEmailOutSsl()) {
766769
props.put("mail.smtp.ssl.enable", "true");
@@ -777,11 +780,9 @@ public boolean execute() throws Exception {
777780
}
778781

779782
props.put("mail.smtp.host", ms.getEmailOutServer());
780-
//props.put("mail.smtp.port", "25");
781783
props.put("mail.smtp.user", ms.getEmailOutUser());
782784
props.put("mail.smtp.auth", true);
783785
props.put("mail.smtps.host", ms.getEmailOutServer());
784-
//props.put("mail.smtps.port", "25");
785786
if (ms.isEmailStartTls()) {
786787
props.put("mail.smtp.starttls.enable", "true");
787788
}
@@ -806,19 +807,32 @@ public boolean execute() throws Exception {
806807
props.setProperty("mail.imaps.socketFactory.port", "993");
807808
props.setProperty("mail.imaps.starttls.enable", "true");
808809
} else {
810+
811+
props.setProperty("mail.imaps.host", ms.getEmailInServer());
812+
props.setProperty("mail.imap.host", ms.getEmailInServer());
813+
814+
if (ms.isEmailInSsl())
815+
props.setProperty("mail.store.protocol", "imaps");
816+
809817
props.setProperty("mail.store.protocol", ms.getEmailInType());
810818
if (ms.isEmailInSsl()) {
811819
props.setProperty("mail." + ms.getEmailInType() + ".ssl.enable", "true");
812820
}
821+
ServerSettings sset = ServerSettings.getInstance();
822+
String trustedServers = sset.getSetting("mail.imaps.ssl.trust", "");
823+
if (trustedServers.length() > 0) {
824+
props.put("mail.imaps.ssl.trust", trustedServers);
825+
}
826+
813827
}
814828

815829
javax.mail.Authenticator auth = new javax.mail.Authenticator() {
816830

817831
@Override
818832
public PasswordAuthentication getPasswordAuthentication() {
819-
String outPwd=ms.getEmailOutPwd();
833+
String outPwd = ms.getEmailOutPwd();
820834
try {
821-
outPwd=Crypto.decrypt(ms.getEmailOutPwd());
835+
outPwd = Crypto.decrypt(ms.getEmailOutPwd());
822836
} catch (Throwable t) {
823837
log.error(t);
824838
}
@@ -986,17 +1000,23 @@ public PasswordAuthentication getPasswordAuthentication() {
9861000
store.connect(ms.getEmailInServer(), ms.getEmailInUser(), authToken);
9871001

9881002
} else {
1003+
9891004
props.setProperty("mail.imaps.host", ms.getEmailInServer());
9901005
props.setProperty("mail.imap.host", ms.getEmailInServer());
9911006

9921007
if (ms.isEmailInSsl()) {
9931008
props.setProperty("mail.store.protocol", "imaps");
9941009
}
9951010

996-
ServerSettings sset=ServerSettings.getInstance();
997-
String trustedServers=sset.getSetting("mail.imaps.ssl.trust", "");
998-
if(trustedServers.length()>0)
999-
props.put("mail.imaps.ssl.trust", "mail.your-server.de");
1011+
props.setProperty("mail.store.protocol", ms.getEmailInType());
1012+
if (ms.isEmailInSsl()) {
1013+
props.setProperty("mail." + ms.getEmailInType() + ".ssl.enable", "true");
1014+
}
1015+
ServerSettings sset = ServerSettings.getInstance();
1016+
String trustedServers = sset.getSetting("mail.imaps.ssl.trust", "");
1017+
if (trustedServers.length() > 0) {
1018+
props.put("mail.imaps.ssl.trust", trustedServers);
1019+
}
10001020

10011021
store = session.getStore();
10021022
//store.connect(ms.getEmailInServer(), ms.getEmailInUser(), Crypto.decrypt(ms.getEmailInPwd()));

0 commit comments

Comments
 (0)