[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gap-dev-discuss] disable autodetect of supported authentication mechani
From: |
Sebastian Reitenbach |
Subject: |
[Gap-dev-discuss] disable autodetect of supported authentication mechanisms for IMAP and SMTP |
Date: |
Fri, 17 Aug 2012 12:17:12 +0200 |
User-agent: |
SOGoMail 1.3.17 |
Hi,
with my investigations with regard why the autodetction of of the
authentication mechanism for SMTP is broken
I found that the same is true for the IMAP too.
In AccountEditorWindowController.m, in sendSupportedMechanismsButtonClicked:
and in _connectToIMAPServer:,
there a [aSMTP setDelegate:self] and respectively a [store setDelegate: self]
is given.
Then, when in those methods in AccountEditorWindowController.m the connect to
the server is initiated, it goes
to Pantomime CWService.m _addWatchers method, which in the end calls:
PERFORM_SELECTOR_1(_delegate, @selector(connectionEstablished:),
PantomimeConnectionEstablished);
but the connectionEstablished: method in AccountEditorWindowController.m
doesn't exist, and therefore
it just doesn't work.
I tried adding a connectionEstablished:method to the
AccountEditorWindowController.m, and I saw it getting
called, but still, I was not yet able to figure out, how then to get the
information needed to update the PopUp
fields with the right values.
I haven't checked yet, but I think the "List Folders" button in the receive
parameters tab in the AccountEditor preferences
has the same problem.
My patch below just disables/hides those buttons to check the server for
available mechanisms. It just
prefills the PopUp selections with the values that GNUMail is supposed to
support.
I know, probably implementing the delegate method and make the automatic
selection just work, would be better
but so far, I haven't been able to do so.
At least a user is now able to just select the right mechanism he needs, and
can configure SMTP AUTH.
Sebastian
$OpenBSD$
Do not dynamically check for SMTP and IMAP auth mechanisms
--- Bundles/Account/AccountEditorWindowController.m.orig Mon Aug 6
16:39:48 2012
+++ Bundles/Account/AccountEditorWindowController.m Tue Aug 14 15:45:35 2012
@@ -181,7 +181,7 @@
sendRememberPassword = ((SendSMTPView *)sendSMTPView)->sendRememberPassword;
sendUseSecureConnection = ((SendSMTPView
*)sendSMTPView)->sendUseSecureConnection;
sendAuthenticateUsingButton = ((SendSMTPView
*)sendSMTPView)->sendAuthenticateUsingButton;
- sendSupportedMechanismsButton = ((SendSMTPView
*)sendSMTPView)->sendSupportedMechanismsButton;
+ //sendSupportedMechanismsButton = ((SendSMTPView
*)sendSMTPView)->sendSupportedMechanismsButton;
sendSupportedMechanismsPopUp = ((SendSMTPView
*)sendSMTPView)->sendSupportedMechanismsPopUp;
RELEASE(aWindow);
@@ -230,6 +230,8 @@
// We set the supported IMAP AUTH mechanism. We must NOT localize the
"Password" item.
[imapSupportedMechanismsPopUp removeAllItems];
[imapSupportedMechanismsPopUp addItemWithTitle: @"Password"];
+ [imapSupportedMechanismsPopUp addItemWithTitle: @"LOGIN"];
+ [imapSupportedMechanismsPopUp addItemWithTitle: @"CRAM-MD5"];
// We select a default item in our send popup and we refresh the view
[sendTransportMethodPopUpButton selectItemWithTitle: _(@"SMTP")];
@@ -238,6 +240,9 @@
// We set the supported SMTP AUTH mechanisms
[sendSupportedMechanismsPopUp removeAllItems];
[sendSupportedMechanismsPopUp addItemWithTitle: _(@"None")];
+ [sendSupportedMechanismsPopUp addItemWithTitle: _(@"PLAIN")];
+ [sendSupportedMechanismsPopUp addItemWithTitle: _(@"LOGIN")];
+ [sendSupportedMechanismsPopUp addItemWithTitle: _(@"CRAM-MD5")];
// We initialize some ivars
allVisibleFolders = [[NSMutableArray alloc] init];
@@ -864,7 +869,7 @@
[sendSMTPPasswordSecureField setEditable: NO];
}
- [sendSupportedMechanismsButton setEnabled: aBOOL];
+ //[sendSupportedMechanismsButton setEnabled: aBOOL];
[sendSupportedMechanismsPopUp setEnabled: aBOOL];
//
@@ -873,8 +878,9 @@
if (aBOOL)
{
[sendAuthenticateUsingButton setNextKeyView:
sendSupportedMechanismsPopUp];
- [sendSupportedMechanismsPopUp setNextKeyView:
sendSupportedMechanismsButton];
- [sendSupportedMechanismsButton setNextKeyView: sendSMTPUsernameField];
+ [sendSupportedMechanismsPopUp setNextKeyView: sendSMTPUsernameField];
+ //[sendSupportedMechanismsPopUp setNextKeyView:
sendSupportedMechanismsButton];
+ //[sendSupportedMechanismsButton setNextKeyView: sendSMTPUsernameField];
[sendSMTPUsernameField setNextKeyView: sendRememberPassword];
[sendRememberPassword setNextKeyView: sendSMTPPasswordSecureField];
[sendSMTPPasswordSecureField setNextKeyView: sendSMTPHostField];
$OpenBSD$
Hide the Check supported button from the Receive Options tab
--- Bundles/Account/IMAPView.m.orig Tue Aug 14 15:41:30 2012
+++ Bundles/Account/IMAPView.m Tue Aug 14 15:44:12 2012
@@ -89,11 +89,11 @@ const NSString *IMAPViewSubscriptionTableColumnIdentif
imapSupportedMechanismsPopUp = [[NSPopUpButton alloc] initWithFrame:
NSMakeRect(130,245,100,ButtonHeight)];
[self addSubview: imapSupportedMechanismsPopUp];
- imapSupportedMechanismsButton = [[NSButton alloc] initWithFrame:
NSMakeRect(240,245,135,ButtonHeight)];
- [imapSupportedMechanismsButton setTitle: _(@"Check supported")];
- [imapSupportedMechanismsButton setTarget: parent];
- [imapSupportedMechanismsButton setAction:
@selector(imapSupportedMechanismsButtonClicked:)];
- [self addSubview: imapSupportedMechanismsButton];
+ //imapSupportedMechanismsButton = [[NSButton alloc] initWithFrame:
NSMakeRect(240,245,135,ButtonHeight)];
+ //[imapSupportedMechanismsButton setTitle: _(@"Check supported")];
+ //[imapSupportedMechanismsButton setTarget: parent];
+ //[imapSupportedMechanismsButton setAction:
@selector(imapSupportedMechanismsButtonClicked:)];
+ //[self addSubview: imapSupportedMechanismsButton];
//
//
$OpenBSD$
hide the check button
--- Bundles/Account/SendView.m.orig Sat Aug 11 19:52:02 2012
+++ Bundles/Account/SendView.m Sat Aug 11 19:52:58 2012
@@ -154,7 +154,7 @@
RELEASE(sendUseSecureConnection);
RELEASE(sendAuthenticateUsingButton);
- RELEASE(sendSupportedMechanismsButton);
+ //RELEASE(sendSupportedMechanismsButton);
RELEASE(sendSupportedMechanismsPopUp);
[super dealloc];
@@ -233,11 +233,11 @@
sendSupportedMechanismsPopUp = [[NSPopUpButton alloc] initWithFrame:
NSMakeRect(140,100,90,ButtonHeight)];
[self addSubview: sendSupportedMechanismsPopUp];
- sendSupportedMechanismsButton = [[NSButton alloc] initWithFrame:
NSMakeRect(240,100,135,ButtonHeight)];
- [sendSupportedMechanismsButton setTitle: _(@"Check supported")];
- [sendSupportedMechanismsButton setTarget: parent];
- [sendSupportedMechanismsButton setAction:
@selector(sendSupportedMechanismsButtonClicked:)];
- [self addSubview: sendSupportedMechanismsButton];
+ //sendSupportedMechanismsButton = [[NSButton alloc] initWithFrame:
NSMakeRect(240,100,135,ButtonHeight)];
+ //[sendSupportedMechanismsButton setTitle: _(@"Check supported")];
+ //[sendSupportedMechanismsButton setTarget: parent];
+ //[sendSupportedMechanismsButton setAction:
@selector(sendSupportedMechanismsButtonClicked:)];
+ //[self addSubview: sendSupportedMechanismsButton];
label = [LabelWidget labelWidgetWithFrame:
NSMakeRect(10,70,120,TextFieldHeight)
label: _(@"Username:")
- [Gap-dev-discuss] disable autodetect of supported authentication mechanisms for IMAP and SMTP,
Sebastian Reitenbach <=
Re: [Gap-dev-discuss] disable autodetect of supported authentication mechanisms for IMAP and SMTP, Riccardo Mottola, 2012/08/20