[Nmailserver-commits] SF.net SVN: nmailserver: [208] NMail/trunk
Brought to you by:
dframpton-oss,
tmyroadctfig
|
From: <tmy...@us...> - 2007-05-31 12:10:36
|
Revision: 208
http://svn.sourceforge.net/nmailserver/?rev=208&view=rev
Author: tmyroadctfig
Date: 2007-05-31 05:10:37 -0700 (Thu, 31 May 2007)
Log Message:
-----------
Work on the setup wizard.
Modified Paths:
--------------
NMail/trunk/NMail.Server/Configuration/ServerConfiguration.cs
NMail/trunk/NMail.Server/RemoteAdminAuthorisation.cs
NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.cs
NMail/trunk/NMail.SetupWizard/NMail.SetupWizard.csproj
NMail/trunk/NMail.SetupWizard/Properties/Settings.Designer.cs
NMail/trunk/NMail.SetupWizard/ServiceConfigPanel.cs
Added Paths:
-----------
NMail/trunk/NMail.SetupWizard/RemoteAdminConfigPanel.Designer.cs
NMail/trunk/NMail.SetupWizard/RemoteAdminConfigPanel.cs
NMail/trunk/NMail.SetupWizard/RemoteAdminConfigPanel.resx
NMail/trunk/NMail.SetupWizard/SurveyConfigPanel.Designer.cs
NMail/trunk/NMail.SetupWizard/SurveyConfigPanel.cs
NMail/trunk/NMail.SetupWizard/SurveyConfigPanel.resx
Modified: NMail/trunk/NMail.Server/Configuration/ServerConfiguration.cs
===================================================================
--- NMail/trunk/NMail.Server/Configuration/ServerConfiguration.cs 2007-05-31 12:07:34 UTC (rev 207)
+++ NMail/trunk/NMail.Server/Configuration/ServerConfiguration.cs 2007-05-31 12:10:37 UTC (rev 208)
@@ -74,6 +74,19 @@
}
/// <summary>
+ /// A flags indicating if unauthenticated users are allowed (Not recommended).
+ /// </summary>
+ [ConfigurationProperty("AllowUnauthenticatedUsers", DefaultValue=false)]
+ public bool AllowUnauthenticatedUsers {
+ get {
+ return (bool) this["AllowUnauthenticatedUsers"];
+ }
+ set {
+ this["AllowUnauthenticatedUsers"] = value;
+ }
+ }
+
+ /// <summary>
/// The list of users authorized to connect to the remote administration
/// remoting interface.
/// </summary>
Modified: NMail/trunk/NMail.Server/RemoteAdminAuthorisation.cs
===================================================================
--- NMail/trunk/NMail.Server/RemoteAdminAuthorisation.cs 2007-05-31 12:07:34 UTC (rev 207)
+++ NMail/trunk/NMail.Server/RemoteAdminAuthorisation.cs 2007-05-31 12:10:37 UTC (rev 208)
@@ -74,6 +74,11 @@
/// True if the user identity of the client is authorized; otherwise, false.
/// </returns>
public bool IsConnectingIdentityAuthorized(IIdentity identity) {
+ // Check if unsafe connections are allowed
+ if (ServerConfiguration.Current.AllowUnauthenticatedUsers) {
+ return true;
+ }
+
string connectingUser = identity.Name.Trim().ToLower();
CommaDelimitedStringCollection remoteAdminUsers = ServerConfiguration.Current.RemoteAdminAuthorizedUsers;
Modified: NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.cs
===================================================================
--- NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.cs 2007-05-31 12:07:34 UTC (rev 207)
+++ NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.cs 2007-05-31 12:10:37 UTC (rev 208)
@@ -32,7 +32,7 @@
this.localStoreConfigPanel = localStoreConfigPanel;
this.smtpConfigPanel = smtpConfigPanel;
this.PreviousPanel = previous;
- this.NextPanel = new ServiceConfigPanel(this.BaseForm, this);
+ this.NextPanel = new RemoteAdminConfigPanel(this.BaseForm, this);
loadConfiguration();
}
Modified: NMail/trunk/NMail.SetupWizard/NMail.SetupWizard.csproj
===================================================================
--- NMail/trunk/NMail.SetupWizard/NMail.SetupWizard.csproj 2007-05-31 12:07:34 UTC (rev 207)
+++ NMail/trunk/NMail.SetupWizard/NMail.SetupWizard.csproj 2007-05-31 12:10:37 UTC (rev 208)
@@ -50,6 +50,18 @@
<Compile Include="BasePanel.Designer.cs">
<DependentUpon>BasePanel.cs</DependentUpon>
</Compile>
+ <Compile Include="SurveyConfigPanel.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="SurveyConfigPanel.Designer.cs">
+ <DependentUpon>SurveyConfigPanel.cs</DependentUpon>
+ </Compile>
+ <Compile Include="RemoteAdminConfigPanel.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="RemoteAdminConfigPanel.Designer.cs">
+ <DependentUpon>RemoteAdminConfigPanel.cs</DependentUpon>
+ </Compile>
<Compile Include="DatabaseConfigPanel.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -102,6 +114,14 @@
<SubType>Designer</SubType>
<DependentUpon>BasePanel.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="SurveyConfigPanel.resx">
+ <DependentUpon>SurveyConfigPanel.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="RemoteAdminConfigPanel.resx">
+ <DependentUpon>RemoteAdminConfigPanel.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
<EmbeddedResource Include="DatabaseConfigPanel.resx">
<SubType>Designer</SubType>
<DependentUpon>DatabaseConfigPanel.cs</DependentUpon>
@@ -182,6 +202,10 @@
<Project>{0AB0E8BA-8CAE-479E-AC85-8255103A107C}</Project>
<Name>NMail.MessageRouter</Name>
</ProjectReference>
+ <ProjectReference Include="..\NMail.Server\NMail.Server.csproj">
+ <Project>{45123319-D913-4A92-BB67-C2C9E1A22A17}</Project>
+ <Name>NMail.Server</Name>
+ </ProjectReference>
<ProjectReference Include="..\NMail.SmtpClient\NMail.SmtpClient.csproj">
<Project>{8CDAF015-FF14-4960-BC91-6F2618A6FED3}</Project>
<Name>NMail.SmtpClient</Name>
@@ -202,6 +226,10 @@
<Project>{81EA6856-1AA7-4278-B0CC-1F851B987DA0}</Project>
<Name>NMail.SpoolService</Name>
</ProjectReference>
+ <ProjectReference Include="..\NMail.SurveyService\NMail.SurveyService.csproj">
+ <Project>{11BFAF65-FA51-4245-8747-F4BA39D10FA3}</Project>
+ <Name>NMail.SurveyService</Name>
+ </ProjectReference>
<ProjectReference Include="..\NMail\NMail.csproj">
<Project>{5A5A5012-B157-49B1-A35F-67EC9680112A}</Project>
<Name>NMail</Name>
Modified: NMail/trunk/NMail.SetupWizard/Properties/Settings.Designer.cs
===================================================================
--- NMail/trunk/NMail.SetupWizard/Properties/Settings.Designer.cs 2007-05-31 12:07:34 UTC (rev 207)
+++ NMail/trunk/NMail.SetupWizard/Properties/Settings.Designer.cs 2007-05-31 12:10:37 UTC (rev 208)
@@ -9,18 +9,18 @@
//------------------------------------------------------------------------------
namespace NMail.SetupWizard.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings) (global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
}
Added: NMail/trunk/NMail.SetupWizard/RemoteAdminConfigPanel.Designer.cs
===================================================================
--- NMail/trunk/NMail.SetupWizard/RemoteAdminConfigPanel.Designer.cs (rev 0)
+++ NMail/trunk/NMail.SetupWizard/RemoteAdminConfigPanel.Designer.cs 2007-05-31 12:10:37 UTC (rev 208)
@@ -0,0 +1,203 @@
+namespace NMail.SetupWizard {
+ partial class RemoteAdminConfigPanel {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing) {
+ if (disposing && (components != null)) {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent() {
+ this.descriptionTextBox = new System.Windows.Forms.TextBox();
+ this.addCnnBtn = new System.Windows.Forms.Button();
+ this.currentConnTextBox = new System.Windows.Forms.TextBox();
+ this.connectionsLbl = new System.Windows.Forms.Label();
+ this.allowedConnectionsList = new System.Windows.Forms.ListBox();
+ this.removeUserBtn = new System.Windows.Forms.Button();
+ this.addUserBtn = new System.Windows.Forms.Button();
+ this.currentUserTextBox = new System.Windows.Forms.TextBox();
+ this.usersLbl = new System.Windows.Forms.Label();
+ this.allowedUsersList = new System.Windows.Forms.ListBox();
+ this.removeCnnBtn = new System.Windows.Forms.Button();
+ this.allowUnauthCheckBox = new System.Windows.Forms.CheckBox();
+ this.mainPanel.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // titleLabel
+ //
+ this.titleLabel.Size = new System.Drawing.Size(277, 29);
+ this.titleLabel.Text = "Remote Administration";
+ //
+ // mainPanel
+ //
+ this.mainPanel.Controls.Add(this.allowUnauthCheckBox);
+ this.mainPanel.Controls.Add(this.removeCnnBtn);
+ this.mainPanel.Controls.Add(this.addCnnBtn);
+ this.mainPanel.Controls.Add(this.descriptionTextBox);
+ this.mainPanel.Controls.Add(this.currentConnTextBox);
+ this.mainPanel.Controls.Add(this.usersLbl);
+ this.mainPanel.Controls.Add(this.connectionsLbl);
+ this.mainPanel.Controls.Add(this.allowedUsersList);
+ this.mainPanel.Controls.Add(this.allowedConnectionsList);
+ this.mainPanel.Controls.Add(this.currentUserTextBox);
+ this.mainPanel.Controls.Add(this.removeUserBtn);
+ this.mainPanel.Controls.Add(this.addUserBtn);
+ //
+ // descriptionTextBox
+ //
+ this.descriptionTextBox.BackColor = System.Drawing.Color.White;
+ this.descriptionTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.descriptionTextBox.Location = new System.Drawing.Point(8, 8);
+ this.descriptionTextBox.Multiline = true;
+ this.descriptionTextBox.Name = "descriptionTextBox";
+ this.descriptionTextBox.ReadOnly = true;
+ this.descriptionTextBox.Size = new System.Drawing.Size(343, 40);
+ this.descriptionTextBox.TabIndex = 2;
+ this.descriptionTextBox.TabStop = false;
+ this.descriptionTextBox.Text = "NMail uses TCP port 7877 for remote administration. This administration interface" +
+ " can be protected with Windows authentication and restricted to cetain address r" +
+ "anges.";
+ //
+ // addCnnBtn
+ //
+ this.addCnnBtn.Location = new System.Drawing.Point(253, 206);
+ this.addCnnBtn.Name = "addCnnBtn";
+ this.addCnnBtn.Size = new System.Drawing.Size(42, 23);
+ this.addCnnBtn.TabIndex = 8;
+ this.addCnnBtn.Text = "Add";
+ this.addCnnBtn.UseVisualStyleBackColor = true;
+ this.addCnnBtn.Click += new System.EventHandler(this.addCnnBtn_Click);
+ //
+ // currentConnTextBox
+ //
+ this.currentConnTextBox.Location = new System.Drawing.Point(175, 180);
+ this.currentConnTextBox.Name = "currentConnTextBox";
+ this.currentConnTextBox.Size = new System.Drawing.Size(120, 20);
+ this.currentConnTextBox.TabIndex = 7;
+ this.currentConnTextBox.Text = "192.168.1.0/24";
+ //
+ // connectionsLbl
+ //
+ this.connectionsLbl.AutoSize = true;
+ this.connectionsLbl.Location = new System.Drawing.Point(172, 62);
+ this.connectionsLbl.Name = "connectionsLbl";
+ this.connectionsLbl.Size = new System.Drawing.Size(81, 13);
+ this.connectionsLbl.TabIndex = 6;
+ this.connectionsLbl.Text = "Allowed Clients:";
+ //
+ // allowedConnectionsList
+ //
+ this.allowedConnectionsList.FormattingEnabled = true;
+ this.allowedConnectionsList.Location = new System.Drawing.Point(175, 78);
+ this.allowedConnectionsList.Name = "allowedConnectionsList";
+ this.allowedConnectionsList.Size = new System.Drawing.Size(120, 95);
+ this.allowedConnectionsList.TabIndex = 5;
+ //
+ // removeUserBtn
+ //
+ this.removeUserBtn.Location = new System.Drawing.Point(46, 206);
+ this.removeUserBtn.Name = "removeUserBtn";
+ this.removeUserBtn.Size = new System.Drawing.Size(58, 23);
+ this.removeUserBtn.TabIndex = 4;
+ this.removeUserBtn.Text = "Remove";
+ this.removeUserBtn.UseVisualStyleBackColor = true;
+ this.removeUserBtn.Click += new System.EventHandler(this.removeUserBtn_Click);
+ //
+ // addUserBtn
+ //
+ this.addUserBtn.Location = new System.Drawing.Point(110, 206);
+ this.addUserBtn.Name = "addUserBtn";
+ this.addUserBtn.Size = new System.Drawing.Size(42, 23);
+ this.addUserBtn.TabIndex = 3;
+ this.addUserBtn.Text = "Add";
+ this.addUserBtn.UseVisualStyleBackColor = true;
+ this.addUserBtn.Click += new System.EventHandler(this.addUserBtn_Click);
+ //
+ // currentUserTextBox
+ //
+ this.currentUserTextBox.Location = new System.Drawing.Point(32, 180);
+ this.currentUserTextBox.Name = "currentUserTextBox";
+ this.currentUserTextBox.Size = new System.Drawing.Size(120, 20);
+ this.currentUserTextBox.TabIndex = 2;
+ this.currentUserTextBox.Text = "Domain\\Administrator";
+ //
+ // usersLbl
+ //
+ this.usersLbl.AutoSize = true;
+ this.usersLbl.Location = new System.Drawing.Point(29, 62);
+ this.usersLbl.Name = "usersLbl";
+ this.usersLbl.Size = new System.Drawing.Size(77, 13);
+ this.usersLbl.TabIndex = 1;
+ this.usersLbl.Text = "Allowed Users:";
+ //
+ // allowedUsersList
+ //
+ this.allowedUsersList.FormattingEnabled = true;
+ this.allowedUsersList.Location = new System.Drawing.Point(32, 78);
+ this.allowedUsersList.Name = "allowedUsersList";
+ this.allowedUsersList.Size = new System.Drawing.Size(120, 95);
+ this.allowedUsersList.TabIndex = 0;
+ //
+ // removeCnnBtn
+ //
+ this.removeCnnBtn.Location = new System.Drawing.Point(189, 206);
+ this.removeCnnBtn.Name = "removeCnnBtn";
+ this.removeCnnBtn.Size = new System.Drawing.Size(58, 23);
+ this.removeCnnBtn.TabIndex = 9;
+ this.removeCnnBtn.Text = "Remove";
+ this.removeCnnBtn.UseVisualStyleBackColor = true;
+ this.removeCnnBtn.Click += new System.EventHandler(this.removeCnnBtn_Click);
+ //
+ // allowUnauthCheckBox
+ //
+ this.allowUnauthCheckBox.AutoSize = true;
+ this.allowUnauthCheckBox.Location = new System.Drawing.Point(32, 252);
+ this.allowUnauthCheckBox.Name = "allowUnauthCheckBox";
+ this.allowUnauthCheckBox.Size = new System.Drawing.Size(242, 17);
+ this.allowUnauthCheckBox.TabIndex = 10;
+ this.allowUnauthCheckBox.Text = "Allow unauthorized users (Not recommended).";
+ this.allowUnauthCheckBox.UseVisualStyleBackColor = true;
+ this.allowUnauthCheckBox.CheckedChanged += new System.EventHandler(this.allowUnauthUsersCheckBox_CheckedChanged);
+ //
+ // RemoteAdminConfigPanel
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Name = "RemoteAdminConfigPanel";
+ this.mainPanel.ResumeLayout(false);
+ this.mainPanel.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox descriptionTextBox;
+ private System.Windows.Forms.TextBox currentUserTextBox;
+ private System.Windows.Forms.Label usersLbl;
+ private System.Windows.Forms.ListBox allowedUsersList;
+ private System.Windows.Forms.Button addCnnBtn;
+ private System.Windows.Forms.TextBox currentConnTextBox;
+ private System.Windows.Forms.Label connectionsLbl;
+ private System.Windows.Forms.ListBox allowedConnectionsList;
+ private System.Windows.Forms.Button removeUserBtn;
+ private System.Windows.Forms.Button addUserBtn;
+ private System.Windows.Forms.CheckBox allowUnauthCheckBox;
+ private System.Windows.Forms.Button removeCnnBtn;
+ }
+}
Added: NMail/trunk/NMail.SetupWizard/RemoteAdminConfigPanel.cs
===================================================================
--- NMail/trunk/NMail.SetupWizard/RemoteAdminConfigPanel.cs (rev 0)
+++ NMail/trunk/NMail.SetupWizard/RemoteAdminConfigPanel.cs 2007-05-31 12:10:37 UTC (rev 208)
@@ -0,0 +1,132 @@
+/*
+ * Copyright 2004-2006 Luke Quinane
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.ServiceProcess;
+using System.Windows.Forms;
+
+using NMail.Configuration;
+using NMail.DataTypes;
+using NMail.Server.Configuration;
+
+namespace NMail.SetupWizard {
+ public partial class RemoteAdminConfigPanel : BasePanel {
+
+ private ServerConfiguration config;
+
+ public RemoteAdminConfigPanel(BaseForm baseForm, BasePanel previous)
+ : base(baseForm) {
+ InitializeComponent();
+
+ this.PreviousPanel = previous;
+ this.NextPanel = new SurveyConfigPanel(this.BaseForm, this);
+
+ // Ensure the config has a server section
+ if (!ServerConfiguration.ConfigurationPresent) {
+ ServerConfiguration.AddToConfigFile();
+ }
+
+ config = ServerConfiguration.Current;
+
+ if (config.RemoteAdminAuthorizedUsers.Count > 0) {
+ // Add any allowed users from the current config
+ for (int i = 0; i < this.config.RemoteAdminAuthorizedUsers.Count; i++) {
+ this.allowedUsersList.Items.Add(this.config.RemoteAdminAuthorizedUsers[i]);
+ }
+ }
+
+ if (config.RemoteAdminClients.Count > 0) {
+ // Add any allowed clients from the current config
+ for (int i = 0; i < this.config.RemoteAdminClients.Count; i++) {
+ this.allowedConnectionsList.Items.Add(this.config.RemoteAdminClients[i].MatchWildcardHost);
+ }
+ }
+
+ this.allowUnauthCheckBox.Checked = config.AllowUnauthenticatedUsers;
+ }
+
+ private void addUserBtn_Click(object sender, EventArgs e) {
+ if (!this.allowedUsersList.Items.Contains(this.currentUserTextBox.Text)) {
+ this.allowedUsersList.Items.Add(this.currentUserTextBox.Text);
+
+ this.currentUserTextBox.Text = string.Empty;
+ }
+ }
+
+ private void removeUserBtn_Click(object sender, EventArgs e) {
+ if (this.allowedUsersList.SelectedItem != null) {
+ this.currentUserTextBox.Text = this.allowedUsersList.SelectedItem.ToString();
+ this.allowedUsersList.Items.Remove(this.allowedUsersList.SelectedItem);
+ }
+ }
+
+ private void addCnnBtn_Click(object sender, EventArgs e) {
+ try {
+ WildcardHost wildHost = new WildcardHost(this.currentConnTextBox.Text);
+
+ if (!this.allowedConnectionsList.Items.Contains(wildHost)) {
+ this.allowedConnectionsList.Items.Add(wildHost);
+
+ this.currentConnTextBox.Text = string.Empty;
+ }
+ } catch (Exception ex) {
+ MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void removeCnnBtn_Click(object sender, EventArgs e) {
+ if (this.allowedConnectionsList.SelectedItem != null) {
+ this.currentConnTextBox.Text = this.allowedConnectionsList.SelectedItem.ToString();
+ this.allowedConnectionsList.Items.Remove(this.allowedConnectionsList.SelectedItem);
+ }
+ }
+
+ private void allowUnauthUsersCheckBox_CheckedChanged(object sender, EventArgs e) {
+ this.addUserBtn.Enabled = !this.allowUnauthCheckBox.Checked;
+ this.removeUserBtn.Enabled = !this.allowUnauthCheckBox.Checked;
+ this.currentUserTextBox.Enabled = !this.allowUnauthCheckBox.Checked;
+ this.allowedUsersList.Enabled = !this.allowUnauthCheckBox.Checked;
+ }
+
+ protected override void OnNextButtonClick() {
+ // Clear the list of allowed users and connections
+ config.RemoteAdminAuthorizedUsers.Clear();
+ config.RemoteAdminClients.Clear();
+
+ // Add the list of allowed users
+ foreach (string user in this.allowedUsersList.Items) {
+ config.RemoteAdminAuthorizedUsers.Add(user);
+ }
+
+ // Add the list of allowed clients
+ foreach (WildcardHost host in this.allowedConnectionsList.Items) {
+ WildcardHostConfigurationElement element = new WildcardHostConfigurationElement();
+ element.Match = host.ToString();
+ config.RemoteAdminClients.Add(element);
+ }
+
+ config.AllowUnauthenticatedUsers = allowUnauthCheckBox.Checked;
+
+ base.OnNextButtonClick();
+ }
+ }
+}
Added: NMail/trunk/NMail.SetupWizard/RemoteAdminConfigPanel.resx
===================================================================
--- NMail/trunk/NMail.SetupWizard/RemoteAdminConfigPanel.resx (rev 0)
+++ NMail/trunk/NMail.SetupWizard/RemoteAdminConfigPanel.resx 2007-05-31 12:10:37 UTC (rev 208)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
Modified: NMail/trunk/NMail.SetupWizard/ServiceConfigPanel.cs
===================================================================
--- NMail/trunk/NMail.SetupWizard/ServiceConfigPanel.cs 2007-05-31 12:07:34 UTC (rev 207)
+++ NMail/trunk/NMail.SetupWizard/ServiceConfigPanel.cs 2007-05-31 12:10:37 UTC (rev 208)
@@ -1,3 +1,20 @@
+/*
+ * Copyright 2004-2006 Luke Quinane
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
using System;
using System.Collections.Generic;
using System.ComponentModel;
Added: NMail/trunk/NMail.SetupWizard/SurveyConfigPanel.Designer.cs
===================================================================
--- NMail/trunk/NMail.SetupWizard/SurveyConfigPanel.Designer.cs (rev 0)
+++ NMail/trunk/NMail.SetupWizard/SurveyConfigPanel.Designer.cs 2007-05-31 12:10:37 UTC (rev 208)
@@ -0,0 +1,82 @@
+namespace NMail.SetupWizard {
+ partial class SurveyConfigPanel {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing) {
+ if (disposing && (components != null)) {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent() {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SurveyConfigPanel));
+ this.allowSurveyCheckBox = new System.Windows.Forms.CheckBox();
+ this.descriptionTextBox = new System.Windows.Forms.RichTextBox();
+ this.mainPanel.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // titleLabel
+ //
+ this.titleLabel.Size = new System.Drawing.Size(197, 29);
+ this.titleLabel.Text = "Periodic Survey";
+ //
+ // mainPanel
+ //
+ this.mainPanel.Controls.Add(this.descriptionTextBox);
+ this.mainPanel.Controls.Add(this.allowSurveyCheckBox);
+ //
+ // allowSurveyCheckBox
+ //
+ this.allowSurveyCheckBox.AutoSize = true;
+ this.allowSurveyCheckBox.Checked = true;
+ this.allowSurveyCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.allowSurveyCheckBox.Location = new System.Drawing.Point(11, 110);
+ this.allowSurveyCheckBox.Name = "allowSurveyCheckBox";
+ this.allowSurveyCheckBox.Size = new System.Drawing.Size(217, 17);
+ this.allowSurveyCheckBox.TabIndex = 10;
+ this.allowSurveyCheckBox.Text = "Enable periodic survey (Recommended).";
+ this.allowSurveyCheckBox.UseVisualStyleBackColor = true;
+ //
+ // descriptionTextBox
+ //
+ this.descriptionTextBox.BackColor = System.Drawing.Color.White;
+ this.descriptionTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.descriptionTextBox.Location = new System.Drawing.Point(11, 8);
+ this.descriptionTextBox.Name = "descriptionTextBox";
+ this.descriptionTextBox.ReadOnly = true;
+ this.descriptionTextBox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.None;
+ this.descriptionTextBox.Size = new System.Drawing.Size(334, 96);
+ this.descriptionTextBox.TabIndex = 11;
+ this.descriptionTextBox.Text = resources.GetString("descriptionTextBox.Text");
+ //
+ // SurveyConfigPanel
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Name = "SurveyConfigPanel";
+ this.mainPanel.ResumeLayout(false);
+ this.mainPanel.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.CheckBox allowSurveyCheckBox;
+ private System.Windows.Forms.RichTextBox descriptionTextBox;
+ }
+}
Added: NMail/trunk/NMail.SetupWizard/SurveyConfigPanel.cs
===================================================================
--- NMail/trunk/NMail.SetupWizard/SurveyConfigPanel.cs (rev 0)
+++ NMail/trunk/NMail.SetupWizard/SurveyConfigPanel.cs 2007-05-31 12:10:37 UTC (rev 208)
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2004-2006 Luke Quinane
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.ServiceProcess;
+using System.Windows.Forms;
+
+using NMail.Configuration;
+
+namespace NMail.SetupWizard {
+ public partial class SurveyConfigPanel : BasePanel {
+
+ public SurveyConfigPanel(BaseForm baseForm, BasePanel previous)
+ : base(baseForm) {
+ InitializeComponent();
+
+ this.PreviousPanel = previous;
+ this.NextPanel = new ServiceConfigPanel(this.BaseForm, this);
+ }
+
+ protected override void OnNextButtonClick() {
+ // Ensure we are in the list of named services
+ NMailConfiguration nc = NMailConfiguration.Current;
+ bool foundSurveyService = false;
+ IServiceElement currentElement = null;
+
+ for (int i = 0; i < nc.ServiceDetails.Count; i++) {
+ if (nc.ServiceDetails[i].ObjectType == typeof(SurveyService.SurveyService)) {
+ foundSurveyService = true;
+ currentElement = nc.ServiceDetails[i];
+ break;
+ }
+ }
+
+ if (this.allowSurveyCheckBox.Checked) {
+ if (!foundSurveyService) {
+ // Add it
+ IServiceElement element = new IServiceElement();
+ element.ObjectType = typeof(SurveyService.SurveyService);
+ element.AutomaticStart = true;
+ nc.ServiceDetails.Add(element);
+ } else {
+ // Ensure auto-start
+ currentElement.AutomaticStart = true;
+ }
+ } else {
+ if (foundSurveyService) {
+ // Remove it
+ nc.ServiceDetails.Remove(currentElement);
+ }
+ }
+
+ base.OnNextButtonClick();
+ }
+ }
+}
Added: NMail/trunk/NMail.SetupWizard/SurveyConfigPanel.resx
===================================================================
--- NMail/trunk/NMail.SetupWizard/SurveyConfigPanel.resx (rev 0)
+++ NMail/trunk/NMail.SetupWizard/SurveyConfigPanel.resx 2007-05-31 12:10:37 UTC (rev 208)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="descriptionTextBox.Text" xml:space="preserve">
+ <value>To help better understand what environments NMail is running under, NMail can be configured to periodically send back survey information. More information about what information is collected can be found here: http://nmailserver.sf.net/survey and the privacy policy relating to the use of this information can be found here: http://nmailserver.sf.net/surveyprivacy</value>
+ </data>
+</root>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|