nmailserver-commits Mailing List for NMail (Page 3)
Brought to you by:
dframpton-oss,
tmyroadctfig
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(13) |
Jun
(14) |
Jul
(8) |
Aug
|
Sep
|
Oct
(8) |
Nov
(22) |
Dec
(9) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(21) |
Feb
(31) |
Mar
(24) |
Apr
(8) |
May
(23) |
Jun
(40) |
Jul
(14) |
Aug
(5) |
Sep
(7) |
Oct
(10) |
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <tmy...@us...> - 2007-06-17 13:04:19
|
Revision: 237
http://svn.sourceforge.net/nmailserver/?rev=237&view=rev
Author: tmyroadctfig
Date: 2007-06-17 06:04:21 -0700 (Sun, 17 Jun 2007)
Log Message:
-----------
Added subscribe function. Added ref to LSD.NHibernate.
Modified Paths:
--------------
NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs
Added Paths:
-----------
NMail/trunk/NMail.RemoteAccessService/Bin/NMail.LocalStoreData.NHibernate.dll.refresh
Property Changed:
----------------
NMail/trunk/NMail.RemoteAccessService/Bin/
Modified: NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs
===================================================================
--- NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs 2007-06-17 13:03:18 UTC (rev 236)
+++ NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs 2007-06-17 13:04:21 UTC (rev 237)
@@ -141,6 +141,27 @@
}
#endregion
+ #region Subscribed
+ /// <summary>
+ /// Subscribes to a folders.
+ /// </summary>
+ /// <param name="folderId">The Id of the folder to subscribe to.</param>
+ /// <param name="authToken">The authentication credentials.</param>
+ [WebMethod]
+ public void Subscribe(string authToken, int folderId)
+ {
+ IAuthenticationToken token = ValidateAuthenticationToken(authToken);
+ if (token != null)
+ {
+ ServiceState.RemoteAdmin.NMailServer.LocalStore.Subscribe(token, folderId);
+ }
+ else
+ {
+ throw new InvalidOperationException("Authentication token is not valid.");
+ }
+ }
+ #endregion
+
#region GetFolderMessageCounts
/// <summary>
/// Gets the number of messages in each requested folder and then the number
Property changes on: NMail/trunk/NMail.RemoteAccessService/Bin
___________________________________________________________________
Name: svn:ignore
- Mono.Security.dll
NMail.dll
NMail.RemoteAccessService.Serializers.dll
NMail.RemoteAccessService.Serializers.pdb
NMail.Server.dll
log4net.dll
+ Mono.Security.dll
NMail.dll
NMail.RemoteAccessService.Serializers.dll
NMail.RemoteAccessService.Serializers.pdb
NMail.Server.dll
log4net.dll
Castle.DynamicProxy.dll
Castle.DynamicProxy.xml
Iesi.Collections.dll
Iesi.Collections.xml
log4net.xml
NHibernate.dll
NHibernate.xml
NMail.LocalStoreData.NHibernate.dll
NMail.LocalStoreData.NHibernate.pdb
Added: NMail/trunk/NMail.RemoteAccessService/Bin/NMail.LocalStoreData.NHibernate.dll.refresh
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.RemoteAccessService/Bin/NMail.LocalStoreData.NHibernate.dll.refresh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-17 13:03:16
|
Revision: 236
http://svn.sourceforge.net/nmailserver/?rev=236&view=rev
Author: tmyroadctfig
Date: 2007-06-17 06:03:18 -0700 (Sun, 17 Jun 2007)
Log Message:
-----------
Added support for mail domain mappings.
Modified Paths:
--------------
NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.DataTypes.LocalStore.MailDomain.hbm.xml
NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs
Modified: NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.DataTypes.LocalStore.MailDomain.hbm.xml
===================================================================
--- NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.DataTypes.LocalStore.MailDomain.hbm.xml 2007-06-17 10:01:32 UTC (rev 235)
+++ NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.DataTypes.LocalStore.MailDomain.hbm.xml 2007-06-17 13:03:18 UTC (rev 236)
@@ -26,6 +26,12 @@
<index column="ChildIndex" type="Int32" />
<element column="Host" unique="true" type="Serializable" />
</list>
+
+ <list name="MailboxMappings" table="MailDomainMailboxMappings">
+ <key column="MailboxMappingId" />
+ <index column="ChildIndex" type="Int32" />
+ <element column="MailboxMapping" type="Serializable" />
+ </list>
</class>
</hibernate-mapping>
\ No newline at end of file
Modified: NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs
===================================================================
--- NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs 2007-06-17 10:01:32 UTC (rev 235)
+++ NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs 2007-06-17 13:03:18 UTC (rev 236)
@@ -1923,6 +1923,7 @@
localMailDomain.PrimaryHost = new Host(Domain.LocalHost);
localMailDomain.UserIds.Add(administrator.UserId);
localMailDomain.GroupIds.Add(adminGroup.GroupId);
+ localMailDomain.MailboxMappings.Add(new NHibernateUserMap());
CreateMailDomain(localMailDomain);
}
#endregion
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-17 10:01:30
|
Revision: 235
http://svn.sourceforge.net/nmailserver/?rev=235&view=rev
Author: tmyroadctfig
Date: 2007-06-17 03:01:32 -0700 (Sun, 17 Jun 2007)
Log Message:
-----------
Added mail icons.
Added Paths:
-----------
NMail/trunk/NMail.WebAccess/Images/LGPL/22x22/actions/mail_generic.png
NMail/trunk/NMail.WebAccess/Images/LGPL/22x22/actions/mail_generic2.png
Added: NMail/trunk/NMail.WebAccess/Images/LGPL/22x22/actions/mail_generic.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.WebAccess/Images/LGPL/22x22/actions/mail_generic.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.WebAccess/Images/LGPL/22x22/actions/mail_generic2.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.WebAccess/Images/LGPL/22x22/actions/mail_generic2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-17 10:00:36
|
Revision: 234
http://svn.sourceforge.net/nmailserver/?rev=234&view=rev
Author: tmyroadctfig
Date: 2007-06-17 03:00:36 -0700 (Sun, 17 Jun 2007)
Log Message:
-----------
Icon changes.
Removed Paths:
-------------
NMail/trunk/NMail.WebAccess/Images/CrystalClear/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-17 09:59:54
|
Revision: 233
http://svn.sourceforge.net/nmailserver/?rev=233&view=rev
Author: tmyroadctfig
Date: 2007-06-17 02:59:46 -0700 (Sun, 17 Jun 2007)
Log Message:
-----------
Icon changes.
Added Paths:
-----------
NMail/trunk/NMail.WebAccess/Images/LGPL/16x16/
NMail/trunk/NMail.WebAccess/Images/LGPL/22x22/
NMail/trunk/NMail.WebAccess/Images/LGPL/32x32/
NMail/trunk/NMail.WebAccess/Images/LGPL/lgpl.txt
Removed Paths:
-------------
NMail/trunk/NMail.WebAccess/Images/Crystal/
NMail/trunk/NMail.WebAccess/Images/CrystalClear/16x16/
NMail/trunk/NMail.WebAccess/Images/CrystalClear/22x22/
NMail/trunk/NMail.WebAccess/Images/CrystalClear/32x32/
NMail/trunk/NMail.WebAccess/Images/CrystalClear/lgpl.txt
Deleted: NMail/trunk/NMail.WebAccess/Images/CrystalClear/lgpl.txt
===================================================================
--- NMail/trunk/NMail.WebAccess/Images/CrystalClear/lgpl.txt 2007-06-17 09:58:34 UTC (rev 232)
+++ NMail/trunk/NMail.WebAccess/Images/CrystalClear/lgpl.txt 2007-06-17 09:59:46 UTC (rev 233)
@@ -1,504 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
Copied: NMail/trunk/NMail.WebAccess/Images/LGPL/16x16 (from rev 192, NMail/trunk/NMail.WebAccess/Images/CrystalClear/16x16)
Copied: NMail/trunk/NMail.WebAccess/Images/LGPL/22x22 (from rev 192, NMail/trunk/NMail.WebAccess/Images/CrystalClear/22x22)
Copied: NMail/trunk/NMail.WebAccess/Images/LGPL/32x32 (from rev 192, NMail/trunk/NMail.WebAccess/Images/CrystalClear/32x32)
Copied: NMail/trunk/NMail.WebAccess/Images/LGPL/lgpl.txt (from rev 192, NMail/trunk/NMail.WebAccess/Images/CrystalClear/lgpl.txt)
===================================================================
--- NMail/trunk/NMail.WebAccess/Images/LGPL/lgpl.txt (rev 0)
+++ NMail/trunk/NMail.WebAccess/Images/LGPL/lgpl.txt 2007-06-17 09:59:46 UTC (rev 233)
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-17 09:58:32
|
Revision: 232
http://svn.sourceforge.net/nmailserver/?rev=232&view=rev
Author: tmyroadctfig
Date: 2007-06-17 02:58:34 -0700 (Sun, 17 Jun 2007)
Log Message:
-----------
Icon changes.
Added Paths:
-----------
NMail/trunk/NMail.WebAccess/Images/LGPL/
Removed Paths:
-------------
NMail/trunk/NMail.WebAccess/Images/Tango/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-17 09:43:55
|
Revision: 231
http://svn.sourceforge.net/nmailserver/?rev=231&view=rev
Author: tmyroadctfig
Date: 2007-06-17 02:43:57 -0700 (Sun, 17 Jun 2007)
Log Message:
-----------
Work the web admin site partially working again.
Modified Paths:
--------------
NMail/trunk/NMail.Administration.Web/App_Code/FolderDataSource.cs
NMail/trunk/NMail.Administration.Web/App_Code/MailDomainDataSource.cs
NMail/trunk/NMail.Administration.Web/App_Code/UserDataSource.cs
NMail/trunk/NMail.Administration.Web/App_Themes/Default/Default.skin
NMail/trunk/NMail.Administration.Web/App_Themes/Default/StyleSheet.css
NMail/trunk/NMail.Administration.Web/CreateFolder.aspx.cs
NMail/trunk/NMail.Administration.Web/CreateMailDomain.aspx.cs
NMail/trunk/NMail.Administration.Web/CreateUser.aspx.cs
NMail/trunk/NMail.Administration.Web/Default.aspx
NMail/trunk/NMail.Administration.Web/FolderDetails.aspx
NMail/trunk/NMail.Administration.Web/FolderDetails.aspx.cs
NMail/trunk/NMail.Administration.Web/Login.aspx
NMail/trunk/NMail.Administration.Web/Login.aspx.cs
NMail/trunk/NMail.Administration.Web/MailDomainDetails.aspx
NMail/trunk/NMail.Administration.Web/MailDomainDetails.aspx.cs
NMail/trunk/NMail.Administration.Web/MasterPage.master
NMail/trunk/NMail.Administration.Web/TaskList.ascx
NMail/trunk/NMail.Administration.Web/UserDetails.aspx
NMail/trunk/NMail.Administration.Web/UserDetails.aspx.cs
NMail/trunk/NMail.Administration.Web/ViewUsers.aspx
NMail/trunk/NMail.Administration.Web/Web.sitemap
NMail/trunk/NMail.Administration.Web/web.config
Added Paths:
-----------
NMail/trunk/NMail.Administration.Web/Bin/AjaxControlToolkit.dll
NMail/trunk/NMail.Administration.Web/Bin/NMail.LocalStoreData.NHibernate.dll.refresh
NMail/trunk/NMail.Administration.Web/Bin/ar/
NMail/trunk/NMail.Administration.Web/Bin/ar/AjaxControlToolkit.resources.dll
NMail/trunk/NMail.Administration.Web/Bin/cs/
NMail/trunk/NMail.Administration.Web/Bin/cs/AjaxControlToolkit.resources.dll
NMail/trunk/NMail.Administration.Web/Bin/de/
NMail/trunk/NMail.Administration.Web/Bin/de/AjaxControlToolkit.resources.dll
NMail/trunk/NMail.Administration.Web/Bin/es/
NMail/trunk/NMail.Administration.Web/Bin/es/AjaxControlToolkit.resources.dll
NMail/trunk/NMail.Administration.Web/Bin/fr/
NMail/trunk/NMail.Administration.Web/Bin/fr/AjaxControlToolkit.resources.dll
NMail/trunk/NMail.Administration.Web/Bin/he/
NMail/trunk/NMail.Administration.Web/Bin/he/AjaxControlToolkit.resources.dll
NMail/trunk/NMail.Administration.Web/Bin/hi/
NMail/trunk/NMail.Administration.Web/Bin/hi/AjaxControlToolkit.resources.dll
NMail/trunk/NMail.Administration.Web/Bin/it/
NMail/trunk/NMail.Administration.Web/Bin/it/AjaxControlToolkit.resources.dll
NMail/trunk/NMail.Administration.Web/Bin/ja/
NMail/trunk/NMail.Administration.Web/Bin/ja/AjaxControlToolkit.resources.dll
NMail/trunk/NMail.Administration.Web/Bin/ko/
NMail/trunk/NMail.Administration.Web/Bin/ko/AjaxControlToolkit.resources.dll
NMail/trunk/NMail.Administration.Web/Bin/pt/
NMail/trunk/NMail.Administration.Web/Bin/pt/AjaxControlToolkit.resources.dll
NMail/trunk/NMail.Administration.Web/Bin/ru/
NMail/trunk/NMail.Administration.Web/Bin/ru/AjaxControlToolkit.resources.dll
NMail/trunk/NMail.Administration.Web/Bin/zh-CHS/
NMail/trunk/NMail.Administration.Web/Bin/zh-CHS/AjaxControlToolkit.resources.dll
NMail/trunk/NMail.Administration.Web/Bin/zh-CHT/
NMail/trunk/NMail.Administration.Web/Bin/zh-CHT/AjaxControlToolkit.resources.dll
NMail/trunk/NMail.Administration.Web/Images/LGPL/
NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/
NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/CreateUser.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/Folder.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/Group.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/Login.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/MailDomain.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/Question.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/Spool.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/User.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/
NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/DeleteUser.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Error.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Folder.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Group.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Login.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Logout.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/MailDomain.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Services.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Spool.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/User.png
NMail/trunk/NMail.Administration.Web/Images/LGPL/LGPL.txt
NMail/trunk/NMail.Administration.Web/Images/down.png
NMail/trunk/NMail.Administration.Web/Images/up.png
Removed Paths:
-------------
NMail/trunk/NMail.Administration.Web/Images/Tango/
Modified: NMail/trunk/NMail.Administration.Web/App_Code/FolderDataSource.cs
===================================================================
--- NMail/trunk/NMail.Administration.Web/App_Code/FolderDataSource.cs 2007-06-16 15:54:29 UTC (rev 230)
+++ NMail/trunk/NMail.Administration.Web/App_Code/FolderDataSource.cs 2007-06-17 09:43:57 UTC (rev 231)
@@ -85,12 +85,22 @@
/// </summary>
/// <param name="folderId">The Id of the folder to delete.</param>
/// <returns>The result of the attempt to delete the folder.</returns>
- public static void DeleteFolder(int folderId)
+ public static LocalStoreFolderResult DeleteFolder(int folderId)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
- localStore.DeleteFolder(authToken, folderId);
+
+ try
+ {
+ localStore.DeleteFolder(authToken, folderId);
+ }
+ catch (Exception)
+ {
+ return LocalStoreFolderResult.NotPermitted;
+ }
+
+ return LocalStoreFolderResult.OkSuccessful;
}
/// <summary>
@@ -98,12 +108,22 @@
/// </summary>
/// <param name="folderName">The name of the folder to create.</param>
/// <returns>The result of the attempt to create the folder.</returns>
- public static void CreateFolder(string folderName)
+ public static LocalStoreFolderResult CreateFolder(string folderName)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
- localStore.CreateFolder(authToken, folderName);
+
+ try
+ {
+ localStore.CreateFolder(authToken, folderName);
+ }
+ catch (Exception)
+ {
+ return LocalStoreFolderResult.NotPermitted;
+ }
+
+ return LocalStoreFolderResult.OkSuccessful;
}
#endregion
@@ -383,4 +403,37 @@
}
}
#endregion
+
+ /// <summary>
+ /// Possible return results for local store folder operations.
+ /// </summary>
+ public enum LocalStoreFolderResult
+ {
+ /// <summary>
+ /// The operation was completed successfully.
+ /// </summary>
+ OkSuccessful = 0,
+
+ /// <summary>
+ /// The create or rename failed because a folder with the same name already existed.
+ /// </summary>
+ AlreadyExists = 1,
+
+ /// <summary>
+ /// The folder was not deleted because it contained child folders.
+ /// </summary>
+ HasChildren = 2,
+
+ /// <summary>
+ /// The operation failed because the source folder was not found on the server.
+ /// If the operation is on a subfolder that the user can't see due to permissions
+ /// this will be returned.
+ /// </summary>
+ NonExistent = 3,
+
+ /// <summary>
+ /// The user is not permitted to perform the operation.
+ /// </summary>
+ NotPermitted = 4
+ }
}
Modified: NMail/trunk/NMail.Administration.Web/App_Code/MailDomainDataSource.cs
===================================================================
--- NMail/trunk/NMail.Administration.Web/App_Code/MailDomainDataSource.cs 2007-06-16 15:54:29 UTC (rev 230)
+++ NMail/trunk/NMail.Administration.Web/App_Code/MailDomainDataSource.cs 2007-06-17 09:43:57 UTC (rev 231)
@@ -69,12 +69,22 @@
return null;
}
- public static void UpdateMailDomain(MailDomain updatedMailDomain)
+ public static LocalStoreMailDomainResult UpdateMailDomain(MailDomain updatedMailDomain)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
- localStore.UpdateMailDomain(authToken, updatedMailDomain);
+
+ try
+ {
+ localStore.UpdateMailDomain(authToken, updatedMailDomain);
+ }
+ catch (Exception)
+ {
+ return LocalStoreMailDomainResult.NotPermitted;
+ }
+
+ return LocalStoreMailDomainResult.OkSuccessful;
}
public static void AddMailboxMapping(int mailDomainId, Type mappingType)
@@ -87,20 +97,40 @@
throw new NotImplementedException();
}
- public static void CreateMailDomain(Host primaryHost)
+ public static LocalStoreMailDomainResult CreateMailDomain(Host primaryHost)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
- localStore.CreateMailDomain(authToken, new MailDomain(0, primaryHost));
+
+ try
+ {
+ localStore.CreateMailDomain(authToken, new MailDomain(0, primaryHost));
+ }
+ catch (Exception)
+ {
+ return LocalStoreMailDomainResult.NotPermitted;
+ }
+
+ return LocalStoreMailDomainResult.OkSuccessful;
}
- public static void DeleteMailDomain(int mailDomainId)
+ public static LocalStoreMailDomainResult DeleteMailDomain(int mailDomainId)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
- localStore.DeleteMailDomain(authToken, mailDomainId);
+
+ try
+ {
+ localStore.DeleteMailDomain(authToken, mailDomainId);
+ }
+ catch (Exception)
+ {
+ return LocalStoreMailDomainResult.NotPermitted;
+ }
+
+ return LocalStoreMailDomainResult.OkSuccessful;
}
public static List<LocalStoreUser> GetMailDomainUsers(int mailDomainId)
@@ -121,7 +151,7 @@
return users;
}
- public static void AddUser(int mailDomainId, int userId)
+ public static LocalStoreMailDomainResult AddUser(int mailDomainId, int userId)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
@@ -134,8 +164,17 @@
throw new ArgumentException("Invalid mail domain.");
}
- mailDomain.UserIds.Add(userId);
- localStore.UpdateMailDomain(authToken, mailDomain);
+ try
+ {
+ mailDomain.UserIds.Add(userId);
+ localStore.UpdateMailDomain(authToken, mailDomain);
+ }
+ catch (Exception)
+ {
+ return LocalStoreMailDomainResult.NotPermitted;
+ }
+
+ return LocalStoreMailDomainResult.OkSuccessful;
}
public static void RemoveUser(int mailDomainId, int userId)
@@ -166,4 +205,35 @@
return new List<ILocalStoreUserMap>(mailDomain.MailboxMappings);
}
}
+
+ /// <summary>
+ /// Possible return results for local store mail domain operations.
+ /// </summary>
+ public enum LocalStoreMailDomainResult
+ {
+ /// <summary>
+ /// The operation completed successfully.
+ /// </summary>
+ OkSuccessful = 0,
+
+ /// <summary>
+ /// A mail domain with the same primary host already exists.
+ /// </summary>
+ AlreadyExists = 1,
+
+ /// <summary>
+ /// No matching mail domain exists in the local store.
+ /// </summary>
+ NoSuchMailDomain = 2,
+
+ /// <summary>
+ /// The user is not permitted to perform the operation.
+ /// </summary>
+ NotPermitted = 3,
+
+ /// <summary>
+ /// The user doesn't exist in the mail domain.
+ /// </summary>
+ NoSuchUser = 4
+ }
}
Modified: NMail/trunk/NMail.Administration.Web/App_Code/UserDataSource.cs
===================================================================
--- NMail/trunk/NMail.Administration.Web/App_Code/UserDataSource.cs 2007-06-16 15:54:29 UTC (rev 230)
+++ NMail/trunk/NMail.Administration.Web/App_Code/UserDataSource.cs 2007-06-17 09:43:57 UTC (rev 231)
@@ -58,12 +58,22 @@
return localStore.GetUser(authToken, userId);
}
- public static void DeleteUser(int userId)
+ public static LocalStoreUserResult DeleteUser(int userId)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
- localStore.DeleteUser(authToken, userId);
+
+ try
+ {
+ localStore.DeleteUser(authToken, userId);
+ }
+ catch (Exception ex)
+ {
+ return LocalStoreUserResult.UnkownError;
+ }
+
+ return LocalStoreUserResult.OkSuccessful;
}
public static List<StoreFolder> GetUserFolders(int userId)
@@ -75,7 +85,7 @@
return new List<StoreFolder>(localStore.GetUserFolders(authToken, userId));
}
- public static void CreateUesr(string Username, int? QuotaWarnLimit, int? QuotaHardLimit)
+ public static LocalStoreUserResult CreateUesr(string Username, int? QuotaWarnLimit, int? QuotaHardLimit)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
@@ -84,7 +94,63 @@
user.Username = Username;
user.QuotaHardLimit = QuotaHardLimit;
user.QuotaWarnLimit = QuotaWarnLimit;
- localStore.CreateUser(authToken, user);
+
+ try
+ {
+ localStore.CreateUser(authToken, user);
+ }
+ catch (Exception ex)
+ {
+ return LocalStoreUserResult.UnkownError;
+ }
+
+ return LocalStoreUserResult.OkSuccessful;
}
}
+
+ /// <summary>
+ /// Possible return results for local store user operations.
+ /// </summary>
+ public enum LocalStoreUserResult
+ {
+ /// <summary>
+ /// The operation completed successfully.
+ /// </summary>
+ OkSuccessful = 0,
+
+ /// <summary>
+ /// A user with the same name already exists.
+ /// </summary>
+ AlreadyExists = 1,
+
+ /// <summary>
+ /// No matching user exists in the local store.
+ /// </summary>
+ NoSuchUser = 2,
+
+ /// <summary>
+ /// Cannot add or remove the user from the mail domain because it doens't exist.
+ /// </summary>
+ NoSuchMailDomain = 3,
+
+ /// <summary>
+ /// The user cannot be deleted because they still own folders.
+ /// </summary>
+ UserStillHasFolders = 4,
+
+ /// <summary>
+ /// The user is not permitted to perform the operation.
+ /// </summary>
+ NotPermitted = 5,
+
+ /// <summary>
+ /// The user cannot be created because there is existing folders with the same details.
+ /// </summary>
+ FoldersAlreadyExist = 6,
+
+ /// <summary>
+ /// An unknown error occurred trying to perform the operation.
+ /// </summary>
+ UnkownError = 7
+ }
}
Modified: NMail/trunk/NMail.Administration.Web/App_Themes/Default/Default.skin
===================================================================
--- NMail/trunk/NMail.Administration.Web/App_Themes/Default/Default.skin 2007-06-16 15:54:29 UTC (rev 230)
+++ NMail/trunk/NMail.Administration.Web/App_Themes/Default/Default.skin 2007-06-17 09:43:57 UTC (rev 231)
@@ -1,6 +1,6 @@
<asp:SiteMapPath runat="server" Font-Size="smaller" />
-<asp:LoginStatus runat="server" Font-Size="smaller" />
+<asp:LoginStatus runat="server" Font-Size="smaller" SkinId="LocationBar" />
<asp:DetailsView runat="server" CellPadding="4" ForeColor="#333333" GridLines="None">
<CommandRowStyle BackColor="#aaaaaa" Font-Bold="True" />
Modified: NMail/trunk/NMail.Administration.Web/App_Themes/Default/StyleSheet.css
===================================================================
--- NMail/trunk/NMail.Administration.Web/App_Themes/Default/StyleSheet.css 2007-06-16 15:54:29 UTC (rev 230)
+++ NMail/trunk/NMail.Administration.Web/App_Themes/Default/StyleSheet.css 2007-06-17 09:43:57 UTC (rev 231)
@@ -1,22 +1,50 @@
body
{
font-family: Sans-Serif;
+ height: 100%;
}
+html
+{
+ height: 99%;
+}
-A:link
+a
{
+ color: black;
+ text-decoration: none;
+}
+
+a:link
+{
color: Blue;
}
-A:visited
+a:visited
{
color: #101070;
}
+a:hover
+{
+ text-decoration: underline;
+}
+
+img
+{
+ border-top-style: none;
+ border-right-style: none;
+ border-left-style: none;
+ border-bottom-style: none;
+}
+
+h1
+{
+ font-size: x-large;
+}
+
.title
{
font-size: 24pt;
- color: white;
font-family: Tahoma, Arial, Sans-Serif;
padding: 0px;
margin: 0px;
@@ -27,15 +55,18 @@
font-weight: bold;
font-style: italic;
font-size: 24pt;
- color: white;
font-family: Tahoma, Arial, Sans-Serif;
padding: 0px;
margin: 0px;
+ padding-right: 1em;
+ padding-left: 0px;
+ padding-bottom: 0px;
+ padding-top: 0px;
}
.title-box
{
- background-color: #123785;
+ background-color: #7FAEFF;
border-top: black thin solid;
border-bottom: black thin solid;
padding: 0.5em;
@@ -43,7 +74,7 @@
.status-box
{
- background-color: #666666;
+ background-color: #cccccc;
border-bottom: black thin solid;
padding-left: 0.5em;
padding-right: 0.5em;
@@ -51,7 +82,7 @@
.side-bar
{
- background-color: #cccccc;
+ background-color: #B5B5B5;
border-right: black thin solid;
vertical-align: top;
height: 100%;
@@ -76,4 +107,22 @@
{
background-color: white;
padding: 4px;
+}
+
+.CollapsibleHeader
+{
+ background-color: #cccccc;
+ font-weight: bold;
+ margin-top: 1em;
+}
+
+.CollapsiblePanel
+{
+ background-color: #E2E2E2;
+ margin-bottom: 1em;
+}
+
+.CollapsibleImage
+{
+ text-align: right;
}
\ No newline at end of file
Added: NMail/trunk/NMail.Administration.Web/Bin/AjaxControlToolkit.dll
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/AjaxControlToolkit.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Bin/NMail.LocalStoreData.NHibernate.dll.refresh
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/NMail.LocalStoreData.NHibernate.dll.refresh
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Bin/ar/AjaxControlToolkit.resources.dll
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/ar/AjaxControlToolkit.resources.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Bin/cs/AjaxControlToolkit.resources.dll
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/cs/AjaxControlToolkit.resources.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Bin/de/AjaxControlToolkit.resources.dll
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/de/AjaxControlToolkit.resources.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Bin/es/AjaxControlToolkit.resources.dll
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/es/AjaxControlToolkit.resources.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Bin/fr/AjaxControlToolkit.resources.dll
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/fr/AjaxControlToolkit.resources.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Bin/he/AjaxControlToolkit.resources.dll
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/he/AjaxControlToolkit.resources.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Bin/hi/AjaxControlToolkit.resources.dll
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/hi/AjaxControlToolkit.resources.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Bin/it/AjaxControlToolkit.resources.dll
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/it/AjaxControlToolkit.resources.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Bin/ja/AjaxControlToolkit.resources.dll
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/ja/AjaxControlToolkit.resources.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Bin/ko/AjaxControlToolkit.resources.dll
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/ko/AjaxControlToolkit.resources.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Bin/pt/AjaxControlToolkit.resources.dll
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/pt/AjaxControlToolkit.resources.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Bin/ru/AjaxControlToolkit.resources.dll
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/ru/AjaxControlToolkit.resources.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Bin/zh-CHS/AjaxControlToolkit.resources.dll
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/zh-CHS/AjaxControlToolkit.resources.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Bin/zh-CHT/AjaxControlToolkit.resources.dll
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Bin/zh-CHT/AjaxControlToolkit.resources.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: NMail/trunk/NMail.Administration.Web/CreateFolder.aspx.cs
===================================================================
--- NMail/trunk/NMail.Administration.Web/CreateFolder.aspx.cs 2007-06-16 15:54:29 UTC (rev 230)
+++ NMail/trunk/NMail.Administration.Web/CreateFolder.aspx.cs 2007-06-17 09:43:57 UTC (rev 231)
@@ -37,12 +37,12 @@
case LocalStoreFolderResult.AlreadyExists:
this.StatusMessage.Text = string.Format("Folder \"{0}\" already exists.", this.folderName);
- this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/Tango/Error.png";
+ this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/LGPL/32x32/Error.png";
break;
default:
this.StatusMessage.Text = string.Format("Unknown error occured while attempting to create the folder \"{0}\": {1}", this.folderName, result.ToString());
- this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/Tango/Error.png";
+ this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/LGPL/32x32/Error.png";
break;
}
Modified: NMail/trunk/NMail.Administration.Web/CreateMailDomain.aspx.cs
===================================================================
--- NMail/trunk/NMail.Administration.Web/CreateMailDomain.aspx.cs 2007-06-16 15:54:29 UTC (rev 230)
+++ NMail/trunk/NMail.Administration.Web/CreateMailDomain.aspx.cs 2007-06-17 09:43:57 UTC (rev 231)
@@ -48,12 +48,12 @@
case LocalStoreMailDomainResult.AlreadyExists:
this.StatusMessage.Text = string.Format("Mail domain \"{0}\" already exists.", hostName);
- this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/Tango/Error.png";
+ this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/LGPL/32x32/Error.png";
break;
default:
this.StatusMessage.Text = string.Format("Unknown error occured while attempting to create mail domain \"{0}\": {1}", hostName, result.ToString());
- this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/Tango/Error.png";
+ this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/LGPL/32x32/Error.png";
break;
}
Modified: NMail/trunk/NMail.Administration.Web/CreateUser.aspx.cs
===================================================================
--- NMail/trunk/NMail.Administration.Web/CreateUser.aspx.cs 2007-06-16 15:54:29 UTC (rev 230)
+++ NMail/trunk/NMail.Administration.Web/CreateUser.aspx.cs 2007-06-17 09:43:57 UTC (rev 231)
@@ -37,12 +37,12 @@
case LocalStoreUserResult.AlreadyExists:
this.StatusMessage.Text = string.Format("User \"{0}\" already exists.", this.username);
- this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/Tango/Error.png";
+ this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/LGPL/32x32/Error.png";
break;
default:
this.StatusMessage.Text = string.Format("Unknown error occured while attempting to create the user \"{0}\": {1}", username, result.ToString());
- this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/Tango/Error.png";
+ this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/LGPL/32x32/Error.png";
break;
}
Modified: NMail/trunk/NMail.Administration.Web/Default.aspx
===================================================================
--- NMail/trunk/NMail.Administration.Web/Default.aspx 2007-06-16 15:54:29 UTC (rev 230)
+++ NMail/trunk/NMail.Administration.Web/Default.aspx 2007-06-17 09:43:57 UTC (rev 231)
@@ -1,6 +1,57 @@
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %>
<asp:Content ID="Content" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">
- Welcome to the NMail administration website.
+ <p>
+ <img src="Images/LGPL/32x32/User.png" />
+ You are currently logged in as "<asp:LoginName ID="LoginName" runat="server" />".
+ </p>
+
+ <p>
+ Welcome to the NMail administration website. You can now perform the following:
+ </p>
+
+ <div style="padding-left: 2em">
+ <p>
+ <a href="">
+ <img src="Images/LGPL/32x32/Services.png"/> Manage services.
+ </a>
+ </p>
+
+ <p>
+ <a href="SpoolDetails.aspx">
+ <img src="Images/LGPL/32x32/Spool.png"/> Manage the outgoing message spool.
+ </a>
+ </p>
+
+ <p>
+ <a href="ViewMailDomains.aspx">
+ <img src="Images/LGPL/32x32/MailDomain.png"/> Manage mail domains.
+ </a>
+ </p>
+
+ <p>
+ <a href="ViewUsers.aspx">
+ <img src="Images/LGPL/32x32/User.png"/> Manage users.
+ </a>
+ </p>
+
+ <p>
+ <a href="">
+ <img src="Images/LGPL/32x32/Group.png"/> Manage groups.
+ </a>
+ </p>
+
+ <p>
+ <a href="ViewFolders.aspx">
+ <img src="Images/LGPL/32x32/Folder.png"/> Manage folders.
+ </a>
+ </p>
+
+ <p>
+ <a href="">
+ <img src="Images/LGPL/32x32/Logout.png"/> <asp:LoginStatus ID="LoginStatus1" runat="server" />.
+ </a>
+ </p>
+ </div>
</asp:Content>
Modified: NMail/trunk/NMail.Administration.Web/FolderDetails.aspx
===================================================================
--- NMail/trunk/NMail.Administration.Web/FolderDetails.aspx 2007-06-16 15:54:29 UTC (rev 230)
+++ NMail/trunk/NMail.Administration.Web/FolderDetails.aspx 2007-06-17 09:43:57 UTC (rev 231)
@@ -6,7 +6,7 @@
<asp:Panel ID="ConfirmPanel" runat="server" Visible="false">
<br />
<div style="border-right: black thin solid; padding-right: 0.5em; border-top: black thin solid; padding-left: 0.5em; padding-bottom: 0.5em; border-left: black thin solid; color: red; padding-top: 0.5em; border-bottom: black thin solid;">
- <img src="Images/Tango/Question.png" />
+ <img src="Images/LGPL/32x32/Question.png" />
Really delete this folder?
<asp:Button ID="yesBtn" runat="server" Text="Yes" OnClick="yesBtn_Click" />
<asp:Button ID="noBtn" runat="server" Text="No" OnClick="noBtn_Click" /></div>
Modified: NMail/trunk/NMail.Administration.Web/FolderDetails.aspx.cs
===================================================================
--- NMail/trunk/NMail.Administration.Web/FolderDetails.aspx.cs 2007-06-16 15:54:29 UTC (rev 230)
+++ NMail/trunk/NMail.Administration.Web/FolderDetails.aspx.cs 2007-06-17 09:43:57 UTC (rev 231)
@@ -9,6 +9,7 @@
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
+using NMail.Administration.Web;
using NMail.DataTypes.ACLs;
using NMail.DataTypes.LocalStore;
@@ -45,17 +46,17 @@
case LocalStoreFolderResult.HasChildren:
this.StatusMessage.Text = "Cannot delete the folder because it still has sub-folders.";
- this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/Tango/Error.png";
+ this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/LGPL/32x32/Error.png";
break;
case LocalStoreFolderResult.NotPermitted:
this.StatusMessage.Text = "You are not permitted to delete this folder.";
- this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/Tango/Error.png";
+ this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/LGPL/32x32/Error.png";
break;
default:
this.StatusMessage.Text = string.Format("Unknown error occured while attempting to delete the folder: {0}", result.ToString());
- this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/Tango/Error.png";
+ this.StatusImage.ImageUrl = Request.ApplicationPath + @"/Images/LGPL/32x32/Error.png";
break;
}
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/CreateUser.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/CreateUser.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/Folder.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/Folder.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/Group.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/Group.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/Login.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/Login.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/MailDomain.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/MailDomain.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/Question.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/Question.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/Spool.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/Spool.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/User.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/22x22/User.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/DeleteUser.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/DeleteUser.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Error.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Error.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Folder.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Folder.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Group.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Group.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Login.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Login.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Logout.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Logout.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/MailDomain.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/MailDomain.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Services.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Services.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Spool.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/Spool.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/User.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.Web/Images/LGPL/32x32/User.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.Web/Images/LGPL/LGPL.txt
===================================================================
--- NMail/trunk/NMail.Administration.Web/Images/LGPL/LGPL.txt (rev 0)
+++ NMail/trunk/NMail.Administration.Web/Images/LGPL/LGPL.txt 2007-06-17 09:43:57 UTC (rev 231)
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this se...
[truncated message content] |
|
From: <tmy...@us...> - 2007-06-16 15:54:29
|
Revision: 230
http://svn.sourceforge.net/nmailserver/?rev=230&view=rev
Author: tmyroadctfig
Date: 2007-06-16 08:54:29 -0700 (Sat, 16 Jun 2007)
Log Message:
-----------
Got WebAccess talking to the server again. :|
Modified Paths:
--------------
NMail/trunk/NMail.RemoteAccessService/App_Code/ServiceState.cs
NMail/trunk/NMail.WebAccess/App_Code/AttachmentDataSource.cs
NMail/trunk/NMail.WebAccess/App_Code/Helper.cs
NMail/trunk/NMail.WebAccess/App_Code/HtmlEscaper.cs
NMail/trunk/NMail.WebAccess/App_Code/LinkButtonListItem.cs
NMail/trunk/NMail.WebAccess/App_Code/MailListDataSource.cs
NMail/trunk/NMail.WebAccess/App_Code/RowClickableGridView.cs
NMail/trunk/NMail.WebAccess/App_Code/SubscribedFolderDataSource.cs
NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.disco
NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.discomap
NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl
NMail/trunk/NMail.WebAccess/Calendar.aspx.cs
NMail/trunk/NMail.WebAccess/Controls/Calendar/Calendar.ascx.cs
NMail/trunk/NMail.WebAccess/Controls/LinkButtonList.ascx.cs
NMail/trunk/NMail.WebAccess/Controls/Mail/Attachment.aspx.cs
NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs
NMail/trunk/NMail.WebAccess/Default.aspx.cs
NMail/trunk/NMail.WebAccess/ErrorHandler.aspx.cs
NMail/trunk/NMail.WebAccess/Login.aspx.cs
NMail/trunk/NMail.WebAccess/Mail.aspx.cs
NMail/trunk/NMail.WebAccess/Web.config
Added Paths:
-----------
NMail/trunk/NMail.RemoteAccessService/Global.asax
Removed Paths:
-------------
NMail/trunk/NMail.RemoteAccessService/App_Data/Global.asax
Modified: NMail/trunk/NMail.RemoteAccessService/App_Code/ServiceState.cs
===================================================================
--- NMail/trunk/NMail.RemoteAccessService/App_Code/ServiceState.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.RemoteAccessService/App_Code/ServiceState.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -2,6 +2,7 @@
using System.Configuration;
using System.Collections.Generic;
using System.Data;
+using System.Runtime.Remoting;
using System.Runtime.Remoting.Lifetime;
using System.Web;
using System.Web.Security;
@@ -28,7 +29,7 @@
{
if (remoteAdmin == null)
{
- remoteAdmin = (RemoteAdministration)Activator.GetObject(typeof(RemoteAdministration), "tcp://localhost:7877/RemoteAdministration.rem");
+ remoteAdmin = (RemoteAdministration)RemotingServices.Connect(typeof(RemoteAdministration), "tcp://localhost:7877/RemoteAdministration.rem");
SetupSponsorship(remoteAdmin, TimeSpan.MaxValue);
}
Deleted: NMail/trunk/NMail.RemoteAccessService/App_Data/Global.asax
===================================================================
--- NMail/trunk/NMail.RemoteAccessService/App_Data/Global.asax 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.RemoteAccessService/App_Data/Global.asax 2007-06-16 15:54:29 UTC (rev 230)
@@ -1,39 +0,0 @@
-<%@ Application Language="C#" %>
-
-<script runat="server">
-
- void Application_Start(object sender, EventArgs e)
- {
- Hashtable properties = new Hashtable();
- properties.Add("secure", true);
- System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(new System.Runtime.Remoting.Channels.Tcp.TcpClientChannel(properties, null), false);
- }
-
- void Application_End(object sender, EventArgs e)
- {
- // Code that runs on application shutdown
-
- }
-
- void Application_Error(object sender, EventArgs e)
- {
- // Code that runs when an unhandled error occurs
-
- }
-
- void Session_Start(object sender, EventArgs e)
- {
- // Code that runs when a new session is started
-
- }
-
- void Session_End(object sender, EventArgs e)
- {
- // Code that runs when a session ends.
- // Note: The Session_End event is raised only when the sessionstate mode
- // is set to InProc in the Web.config file. If session mode is set to StateServer
- // or SQLServer, the event is not raised.
-
- }
-
-</script>
Added: NMail/trunk/NMail.RemoteAccessService/Global.asax
===================================================================
--- NMail/trunk/NMail.RemoteAccessService/Global.asax (rev 0)
+++ NMail/trunk/NMail.RemoteAccessService/Global.asax 2007-06-16 15:54:29 UTC (rev 230)
@@ -0,0 +1,39 @@
+<%@ Application Language="C#" %>
+
+<script runat="server">
+
+ void Application_Start(object sender, EventArgs e)
+ {
+ Hashtable properties = new Hashtable();
+ properties.Add("secure", true);
+ System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(new System.Runtime.Remoting.Channels.Tcp.TcpClientChannel(properties, null), false);
+ }
+
+ void Application_End(object sender, EventArgs e)
+ {
+ // Code that runs on application shutdown
+
+ }
+
+ void Application_Error(object sender, EventArgs e)
+ {
+ // Code that runs when an unhandled error occurs
+
+ }
+
+ void Session_Start(object sender, EventArgs e)
+ {
+ // Code that runs when a new session is started
+
+ }
+
+ void Session_End(object sender, EventArgs e)
+ {
+ // Code that runs when a session ends.
+ // Note: The Session_End event is raised only when the sessionstate mode
+ // is set to InProc in the Web.config file. If session mode is set to StateServer
+ // or SQLServer, the event is not raised.
+
+ }
+
+</script>
Modified: NMail/trunk/NMail.WebAccess/App_Code/AttachmentDataSource.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/App_Code/AttachmentDataSource.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/App_Code/AttachmentDataSource.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -23,10 +23,10 @@
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NMail.DataTypes;
+using NMail.DataTypes.Message;
using NMail.Helper;
namespace NMail.WebAccess
Modified: NMail/trunk/NMail.WebAccess/App_Code/Helper.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/App_Code/Helper.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/App_Code/Helper.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -23,10 +23,10 @@
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NMail.DataTypes;
+using NMail.DataTypes.Message;
using RemoteAccessService;
namespace NMail.WebAccess
Modified: NMail/trunk/NMail.WebAccess/App_Code/HtmlEscaper.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/App_Code/HtmlEscaper.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/App_Code/HtmlEscaper.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -22,7 +22,6 @@
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace NMail.WebAccess
Modified: NMail/trunk/NMail.WebAccess/App_Code/LinkButtonListItem.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/App_Code/LinkButtonListItem.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/App_Code/LinkButtonListItem.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -22,7 +22,6 @@
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public class LinkButtonListItem
Modified: NMail/trunk/NMail.WebAccess/App_Code/MailListDataSource.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/App_Code/MailListDataSource.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/App_Code/MailListDataSource.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -22,7 +22,6 @@
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.SessionState;
Modified: NMail/trunk/NMail.WebAccess/App_Code/RowClickableGridView.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/App_Code/RowClickableGridView.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/App_Code/RowClickableGridView.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -22,7 +22,6 @@
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace NMail.WebAccess
Modified: NMail/trunk/NMail.WebAccess/App_Code/SubscribedFolderDataSource.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/App_Code/SubscribedFolderDataSource.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/App_Code/SubscribedFolderDataSource.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -24,7 +24,6 @@
using System.Web.UI;
using System.Web.SessionState;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NMail.DataTypes.LocalStore;
@@ -87,20 +86,24 @@
public static NMail.DataTypes.LocalStore.StoreFolder GetStoreFolder(StoreFolderSerializer serializedFolder)
{
- return new NMail.DataTypes.LocalStore.StoreFolder(
- serializedFolder.NameSpace,
- serializedFolder.Name,
- serializedFolder.FolderId,
- serializedFolder.ParentId,
- serializedFolder.HasChildren);
+ NMail.DataTypes.LocalStore.StoreFolder result = new NMail.DataTypes.LocalStore.StoreFolder(serializedFolder.NameSpace, serializedFolder.Name);
+ result.FolderId = serializedFolder.FolderId;
+ result.ParentId = serializedFolder.ParentId;
+ result.HasChildren = serializedFolder.HasChildren;
+
+ return result;
}
}
public class StoreFolder : NMail.DataTypes.LocalStore.StoreFolder
{
public StoreFolder(StoreFolderSerializer serializedFolder)
- : base(serializedFolder.NameSpace, serializedFolder.Name, serializedFolder.FolderId, serializedFolder.ParentId, serializedFolder.HasChildren)
- {}
+ : base(serializedFolder.NameSpace, serializedFolder.Name)
+ {
+ this.FolderId = serializedFolder.FolderId;
+ this.ParentId = serializedFolder.ParentId;
+ this.HasChildren = serializedFolder.HasChildren;
+ }
private int totalMessages;
Modified: NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.disco
===================================================================
--- NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.disco 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.disco 2007-06-16 15:54:29 UTC (rev 230)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
- <contractRef ref="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx?wsdl" docRef="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
- <soap address="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx" xmlns:q1="http://nmailserver.sf.net/RemoteAccessService/1.0" binding="q1:RemoteAccessServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
- <soap address="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx" xmlns:q2="http://nmailserver.sf.net/RemoteAccessService/1.0" binding="q2:RemoteAccessServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
+ <contractRef ref="http://localhost:4065/NMail.RemoteAccessService/RemoteAccessService.asmx?wsdl" docRef="http://localhost:4065/NMail.RemoteAccessService/RemoteAccessService.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
+ <soap address="http://localhost:4065/NMail.RemoteAccessService/RemoteAccessService.asmx" xmlns:q1="http://nmailserver.sf.net/RemoteAccessService/1.0" binding="q1:RemoteAccessServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
+ <soap address="http://localhost:4065/NMail.RemoteAccessService/RemoteAccessService.asmx" xmlns:q2="http://nmailserver.sf.net/RemoteAccessService/1.0" binding="q2:RemoteAccessServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
</discovery>
\ No newline at end of file
Modified: NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.discomap
===================================================================
--- NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.discomap 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.discomap 2007-06-16 15:54:29 UTC (rev 230)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Results>
- <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx?wsdl" filename="RemoteAccessService.wsdl" />
- <DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx?disco" filename="RemoteAccessService.disco" />
+ <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://localhost:4065/NMail.RemoteAccessService/RemoteAccessService.asmx?wsdl" filename="RemoteAccessService.wsdl" />
+ <DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://localhost:4065/NMail.RemoteAccessService/RemoteAccessService.asmx?disco" filename="RemoteAccessService.disco" />
</Results>
</DiscoveryClientResultsFile>
\ No newline at end of file
Modified: NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl
===================================================================
--- NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl 2007-06-16 15:54:29 UTC (rev 230)
@@ -38,6 +38,7 @@
<s:element minOccurs="0" maxOccurs="1" name="NameSpace" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="HasChildren" type="s:boolean" />
<s:element minOccurs="1" maxOccurs="1" name="ParentId" nillable="true" type="s:int" />
+ <s:element minOccurs="1" maxOccurs="1" name="OwnerUserId" type="s:int" />
</s:sequence>
</s:complexType>
<s:element name="GetStoreFolderByFolderId">
@@ -513,10 +514,10 @@
</wsdl:binding>
<wsdl:service name="RemoteAccessService">
<wsdl:port name="RemoteAccessServiceSoap" binding="tns:RemoteAccessServiceSoap">
- <soap:address location="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx" />
+ <soap:address location="http://localhost:4065/NMail.RemoteAccessService/RemoteAccessService.asmx" />
</wsdl:port>
<wsdl:port name="RemoteAccessServiceSoap12" binding="tns:RemoteAccessServiceSoap12">
- <soap12:address location="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx" />
+ <soap12:address location="http://localhost:4065/NMail.RemoteAccessService/RemoteAccessService.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
\ No newline at end of file
Modified: NMail/trunk/NMail.WebAccess/Calendar.aspx.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/Calendar.aspx.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/Calendar.aspx.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -7,7 +7,6 @@
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Calendar : System.Web.UI.Page
Modified: NMail/trunk/NMail.WebAccess/Controls/Calendar/Calendar.ascx.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/Controls/Calendar/Calendar.ascx.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/Controls/Calendar/Calendar.ascx.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -23,7 +23,6 @@
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Controls_Calendar_Calendar : System.Web.UI.UserControl
Modified: NMail/trunk/NMail.WebAccess/Controls/LinkButtonList.ascx.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/Controls/LinkButtonList.ascx.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/Controls/LinkButtonList.ascx.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -24,7 +24,6 @@
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
/// <summary>
Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/Attachment.aspx.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/Controls/Mail/Attachment.aspx.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/Controls/Mail/Attachment.aspx.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -24,10 +24,10 @@
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NMail.DataTypes;
+using NMail.DataTypes.Message;
using NMail.Helper;
/// <summary>
@@ -119,7 +119,7 @@
// Get the part to send
string base64Body = ras.GetMessageMimePart(authToken, this.partNumber, this.messageId, this.folderId);
ByteString bodyData = new ByteString(Convert.FromBase64String(base64Body), Encoding.UTF8);
- SimpleBodyPart body = MessageHelper.ParseMessage(bodyData);
+ SimpleMessageBody body = MessageHelper.ParseMessage(bodyData);
// Send the part to the client
Response.ContentType = body.Headers["Content-type"];
Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -26,10 +26,10 @@
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NMail.DataTypes;
+using NMail.DataTypes.Message;
using NMail.Helper;
using NMail.WebAccess;
using RemoteAccessService;
@@ -102,10 +102,12 @@
{
html = false;
string result = string.Empty;
+ firstMimePart.ConvertToMultipartBody();
+ MultipartMessageBody multiPartBody = firstMimePart.Body as MultipartMessageBody;
- for (int i = 0; i < firstMimePart.MimeParts.Count; i++)
+ for (int i = 0; i < multiPartBody.MimeParts.Count; i++)
{
- IMessageBodyPart part = firstMimePart.MimeParts[i];
+ IMessageBodyPart part = multiPartBody.MimeParts[i];
contentType = MimeHelper.GetContentType(part.Headers, out subType, out parameters);
if (contentType == MimeContentType.Text)
Modified: NMail/trunk/NMail.WebAccess/Default.aspx.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/Default.aspx.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/Default.aspx.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -6,7 +6,6 @@
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ASP;
Modified: NMail/trunk/NMail.WebAccess/ErrorHandler.aspx.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/ErrorHandler.aspx.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/ErrorHandler.aspx.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -23,7 +23,6 @@
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class ErrorHandler : System.Web.UI.Page
Modified: NMail/trunk/NMail.WebAccess/Login.aspx.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/Login.aspx.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/Login.aspx.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -23,7 +23,6 @@
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using RemoteAccessService;
Modified: NMail/trunk/NMail.WebAccess/Mail.aspx.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/Mail.aspx.cs 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/Mail.aspx.cs 2007-06-16 15:54:29 UTC (rev 230)
@@ -24,7 +24,6 @@
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ASP;
@@ -54,7 +53,7 @@
void MailList_SelectedMessageChanged(object sender, EventArgs e)
{
- this.MessageViewer.MessageId = this.MailList.SelectedMessageId;
+ //this.MessageViewer.MessageId = this.MailList.SelectedMessageId;
}
protected void OnSelectedFolderIdChanged(int folderId)
@@ -72,7 +71,7 @@
this.SubscribedFolderList.SelectedFolderId = folderId;
this.MailList.SelectedFolderId = folderId;
this.MailList.FolderName = folderName;
- this.MessageViewer.FolderId = folderId;
+ //this.MessageViewer.FolderId = folderId;
}
protected void ShowCalendarView_Clicked(object sender, EventArgs ea)
Modified: NMail/trunk/NMail.WebAccess/Web.config
===================================================================
--- NMail/trunk/NMail.WebAccess/Web.config 2007-06-16 15:04:59 UTC (rev 229)
+++ NMail/trunk/NMail.WebAccess/Web.config 2007-06-16 15:54:29 UTC (rev 230)
@@ -17,7 +17,7 @@
</NamedServices>
</NMail>
<appSettings>
- <add key="RemoteAccessService.RemoteAccessService" value="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx"/>
+ <add key="RemoteAccessService.RemoteAccessService" value="http://localhost:4065/NMail.RemoteAccessService/RemoteAccessService.asmx"/>
</appSettings>
<connectionStrings/>
<system.web>
@@ -39,13 +39,6 @@
<authorization>
<deny users="?"/>
</authorization>
- <webParts enableExport="true">
- <personalization defaultProvider="XmlFileSharedPersonalizationProvider">
- <providers>
- <add applicationName="/" name="XmlFileSharedPersonalizationProvider" type="MarkItUp.SingleUserBlog.Web.WebParts.XmlFileSharedPersonalizationProvider"/>
- </providers>
- </personalization>
- </webParts>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-16 15:04:57
|
Revision: 229
http://svn.sourceforge.net/nmailserver/?rev=229&view=rev
Author: tmyroadctfig
Date: 2007-06-16 08:04:59 -0700 (Sat, 16 Jun 2007)
Log Message:
-----------
Fixed a defect in email address parsing.
Modified Paths:
--------------
NMail/trunk/NMail/DataTypes/EmailAddress.cs
Modified: NMail/trunk/NMail/DataTypes/EmailAddress.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/EmailAddress.cs 2007-06-16 15:04:06 UTC (rev 228)
+++ NMail/trunk/NMail/DataTypes/EmailAddress.cs 2007-06-16 15:04:59 UTC (rev 229)
@@ -116,12 +116,12 @@
this.mailbox = new Mailbox(parts[0], true);
if (parts[1].StartsWith("[") && parts[1].EndsWith("]")) {
- // this IS an IP address
+ // this should be an IP address
string ipAddress = parts[1].Substring(1, parts[1].Length - 2);
this.host = new Host(IPAddress.Parse(ipAddress));
} else {
- // this IS NOT an IP address
- this.host = new Host(new Domain(parts[1]));
+ // this should not be an IP address
+ this.host = new Host(parts[1]);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-16 15:04:06
|
Revision: 228
http://svn.sourceforge.net/nmailserver/?rev=228&view=rev
Author: tmyroadctfig
Date: 2007-06-16 08:04:06 -0700 (Sat, 16 Jun 2007)
Log Message:
-----------
Fixed remote access interface to use new ILocalStore interface.
Modified Paths:
--------------
NMail/trunk/NMail.Administration.Web/App_Code/FolderDataSource.cs
NMail/trunk/NMail.Administration.Web/App_Code/MailDomainDataSource.cs
NMail/trunk/NMail.Administration.Web/App_Code/SpooledMessageDataSource.cs
NMail/trunk/NMail.Administration.Web/App_Code/UserDataSource.cs
NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs
Added Paths:
-----------
NMail/trunk/NMail.RemoteAccessService/App_Data/Global.asax
Removed Paths:
-------------
NMail/trunk/NMail.RemoteAccessService/Global.asax
Modified: NMail/trunk/NMail.Administration.Web/App_Code/FolderDataSource.cs
===================================================================
--- NMail/trunk/NMail.Administration.Web/App_Code/FolderDataSource.cs 2007-06-16 15:02:35 UTC (rev 227)
+++ NMail/trunk/NMail.Administration.Web/App_Code/FolderDataSource.cs 2007-06-16 15:04:06 UTC (rev 228)
@@ -70,14 +70,14 @@
/// </summary>
/// <param name="folderId">The Id of the folder to get the sub-folders for.</param>
/// <returns>The list of folders.</returns>
- public static List<StoreFolder> GetSubFolders(int folderId)
+ public static IList<StoreFolder> GetSubFolders(int folderId)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
StoreFolder parent = localStore.GetStoreFolder(authToken, folderId);
- return new List<StoreFolder>(localStore.GetChildren(authToken, parent));
+ return localStore.GetChildren(authToken, parent.FolderId);
}
/// <summary>
@@ -85,13 +85,12 @@
/// </summary>
/// <param name="folderId">The Id of the folder to delete.</param>
/// <returns>The result of the attempt to delete the folder.</returns>
- public static LocalStoreFolderResult DeleteFolder(int folderId)
+ public static void DeleteFolder(int folderId)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
-
- return localStore.DeleteFolder(authToken, folderId);
+ localStore.DeleteFolder(authToken, folderId);
}
/// <summary>
@@ -99,13 +98,12 @@
/// </summary>
/// <param name="folderName">The name of the folder to create.</param>
/// <returns>The result of the attempt to create the folder.</returns>
- public static LocalStoreFolderResult CreateFolder(string folderName)
+ public static void CreateFolder(string folderName)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
-
- return localStore.CreateFolder(authToken, folderName);
+ localStore.CreateFolder(authToken, folderName);
}
#endregion
@@ -149,7 +147,7 @@
StoreFolder folder = localStore.GetStoreFolder(authToken, folderId);
GenericAce<StoreFolderPrivilege> ace = new GenericAce<StoreFolderPrivilege>(identifier, privilege, aceType);
- localStore.SetStoreFolderAce(authToken, folder, ace);
+ localStore.SetStoreFolderAce(authToken, folder.FolderId, ace);
}
/// <summary>
@@ -164,7 +162,7 @@
ILocalStore localStore = (ILocalStore)session["LocalStore"];
StoreFolder folder = localStore.GetStoreFolder(authToken, folderId);
- localStore.RemoveStoreFolderAce(authToken, folder, identifier);
+ localStore.RemoveStoreFolderAce(authToken, folder.FolderId, identifier);
}
#endregion
}
Modified: NMail/trunk/NMail.Administration.Web/App_Code/MailDomainDataSource.cs
===================================================================
--- NMail/trunk/NMail.Administration.Web/App_Code/MailDomainDataSource.cs 2007-06-16 15:02:35 UTC (rev 227)
+++ NMail/trunk/NMail.Administration.Web/App_Code/MailDomainDataSource.cs 2007-06-16 15:04:06 UTC (rev 228)
@@ -22,15 +22,13 @@
/// </summary>
public static class MailDomainDataSource
{
- public static List<MailDomain> GetMailDomains()
+ public static IList<MailDomain> GetMailDomains()
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
- MailDomain[] mailDomains = localStore.GetMailDomains(authToken);
-
- return new List<MailDomain>(mailDomains);
+ return localStore.GetMailDomains(authToken);
}
public static MailDomain GetMailDomain(int mailDomainId)
@@ -39,7 +37,7 @@
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
- MailDomain[] mailDomains = localStore.GetMailDomains(authToken);
+ IList<MailDomain> mailDomains = localStore.GetMailDomains(authToken);
foreach (MailDomain mailDomain in mailDomains)
{
@@ -58,7 +56,7 @@
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
- MailDomain[] mailDomains = localStore.GetMailDomains(authToken);
+ IList<MailDomain> mailDomains = localStore.GetMailDomains(authToken);
foreach (MailDomain mailDomain in mailDomains)
{
@@ -71,13 +69,12 @@
return null;
}
- public static LocalStoreMailDomainResult UpdateMailDomain(MailDomain updatedMailDomain)
+ public static void UpdateMailDomain(MailDomain updatedMailDomain)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
-
- return localStore.UpdateMailDomain(authToken, updatedMailDomain);
+ localStore.UpdateMailDomain(authToken, updatedMailDomain);
}
public static void AddMailboxMapping(int mailDomainId, Type mappingType)
@@ -90,22 +87,20 @@
throw new NotImplementedException();
}
- public static LocalStoreMailDomainResult CreateMailDomain(Host primaryHost)
+ public static void CreateMailDomain(Host primaryHost)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
-
- return localStore.CreateMailDomain(authToken, primaryHost);
+ localStore.CreateMailDomain(authToken, new MailDomain(0, primaryHost));
}
- public static LocalStoreMailDomainResult DeleteMailDomain(int mailDomainId)
+ public static void DeleteMailDomain(int mailDomainId)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
-
- return localStore.DeleteMailDomain(authToken, mailDomainId);
+ localStore.DeleteMailDomain(authToken, mailDomainId);
}
public static List<LocalStoreUser> GetMailDomainUsers(int mailDomainId)
@@ -126,7 +121,7 @@
return users;
}
- public static LocalStoreMailDomainResult AddUser(int mailDomainId, int userId)
+ public static void AddUser(int mailDomainId, int userId)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
@@ -136,15 +131,14 @@
if (mailDomain == null)
{
- return LocalStoreMailDomainResult.NoSuchMailDomain;
+ throw new ArgumentException("Invalid mail domain.");
}
mailDomain.UserIds.Add(userId);
-
- return localStore.UpdateMailDomain(authToken, mailDomain);
+ localStore.UpdateMailDomain(authToken, mailDomain);
}
- public static LocalStoreMailDomainResult RemoveUser(int mailDomainId, int userId)
+ public static void RemoveUser(int mailDomainId, int userId)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
@@ -154,17 +148,16 @@
if (mailDomain == null)
{
- return LocalStoreMailDomainResult.NoSuchMailDomain;
+ throw new ArgumentException("Invalid mail domain.");
}
if (!mailDomain.UserIds.Contains(userId))
{
- return LocalStoreMailDomainResult.NoSuchUser;
+ throw new ArgumentException("Invalid user.");
}
mailDomain.UserIds.Remove(userId);
-
- return localStore.UpdateMailDomain(authToken, mailDomain);
+ localStore.UpdateMailDomain(authToken, mailDomain);
}
public static List<ILocalStoreUserMap> GetMailboxMappings(int mailDomainId)
Modified: NMail/trunk/NMail.Administration.Web/App_Code/SpooledMessageDataSource.cs
===================================================================
--- NMail/trunk/NMail.Administration.Web/App_Code/SpooledMessageDataSource.cs 2007-06-16 15:02:35 UTC (rev 227)
+++ NMail/trunk/NMail.Administration.Web/App_Code/SpooledMessageDataSource.cs 2007-06-16 15:04:06 UTC (rev 228)
@@ -16,7 +16,7 @@
{
public static class SpooledMessageDataSource
{
- public static List<SpoolEnvelope> GetSpooledMessages()
+ public static IList<SpoolEnvelope> GetSpooledMessages()
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
ISpoolService spool = (ISpoolService)session["Spool"];
Modified: NMail/trunk/NMail.Administration.Web/App_Code/UserDataSource.cs
===================================================================
--- NMail/trunk/NMail.Administration.Web/App_Code/UserDataSource.cs 2007-06-16 15:02:35 UTC (rev 227)
+++ NMail/trunk/NMail.Administration.Web/App_Code/UserDataSource.cs 2007-06-16 15:04:06 UTC (rev 228)
@@ -26,15 +26,13 @@
/// Gets all users in the system.
/// </summary>
/// <returns>The list of users.</returns>
- public static List<LocalStoreUser> GetUsers()
+ public static IList<LocalStoreUser> GetUsers()
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
- LocalStoreUser[] users = localStore.GetUsers(authToken);
-
- return new List<LocalStoreUser>(users);
+ return localStore.GetUsers(authToken);
}
/// <summary>
@@ -60,13 +58,12 @@
return localStore.GetUser(authToken, userId);
}
- public static LocalStoreUserResult DeleteUser(int userId)
+ public static void DeleteUser(int userId)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
-
- return localStore.DeleteUser(authToken, userId);
+ localStore.DeleteUser(authToken, userId);
}
public static List<StoreFolder> GetUserFolders(int userId)
@@ -78,13 +75,16 @@
return new List<StoreFolder>(localStore.GetUserFolders(authToken, userId));
}
- public static LocalStoreUserResult CreateUesr(string Username, int? QuotaWarnLimit, int? QuotaHardLimit)
+ public static void CreateUesr(string Username, int? QuotaWarnLimit, int? QuotaHardLimit)
{
IHttpSessionState session = SessionStateUtility.GetHttpSessionStateFromContext(HttpContext.Current);
IAuthenticationToken authToken = (IAuthenticationToken)session["AuthToken"];
ILocalStore localStore = (ILocalStore)session["LocalStore"];
-
- return localStore.CreateUser(authToken, Username, QuotaWarnLimit, QuotaHardLimit);
+ LocalStoreUser user = new LocalStoreUser();
+ user.Username = Username;
+ user.QuotaHardLimit = QuotaHardLimit;
+ user.QuotaWarnLimit = QuotaWarnLimit;
+ localStore.CreateUser(authToken, user);
}
}
}
Modified: NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs
===================================================================
--- NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs 2007-06-16 15:02:35 UTC (rev 227)
+++ NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs 2007-06-16 15:04:06 UTC (rev 228)
@@ -9,6 +9,7 @@
using NMail.Authentication;
using NMail.DataTypes;
using NMail.DataTypes.LocalStore;
+using NMail.DataTypes.Message;
using NMail.Server;
using NMail.RemoteAccessService.Serializers.DataTypes;
using NMail.RemoteAccessService.Serializers.DataTypes.LocalStore;
@@ -168,36 +169,36 @@
if (storeFolder != null)
{
- addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCount(token, storeFolder));
+ addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCount(token, storeFolder.FolderId));
if ((messageFlags & StoreMessageFlags.Answered) != 0)
{
- addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Answered));
+ addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder.FolderId, StoreMessageFlags.Answered));
}
if ((messageFlags & StoreMessageFlags.Deleted) != 0)
{
- addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Deleted));
+ addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder.FolderId, StoreMessageFlags.Deleted));
}
if ((messageFlags & StoreMessageFlags.Draft) != 0)
{
- addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Draft));
+ addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder.FolderId, StoreMessageFlags.Draft));
}
if ((messageFlags & StoreMessageFlags.Flagged) != 0)
{
- addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Flagged));
+ addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder.FolderId, StoreMessageFlags.Flagged));
}
if ((messageFlags & StoreMessageFlags.Recent) != 0)
{
- addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Recent));
+ addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder.FolderId, StoreMessageFlags.Recent));
}
if ((messageFlags & StoreMessageFlags.Seen) != 0)
{
- addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Seen));
+ addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder.FolderId, StoreMessageFlags.Seen));
}
}
else
@@ -232,7 +233,7 @@
if (token != null)
{
List<KeyValuePair<int, EnvelopeSerializer>> result = new List<KeyValuePair<int, EnvelopeSerializer>>();
- List<int> messageIds = ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageIds(token, folderId);
+ IList<int> messageIds = ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageIds(token, folderId);
foreach (int messageId in messageIds)
{
@@ -361,7 +362,7 @@
public TValue Value
{
get { return value;}
- set { value = value;}
+ set { this.value = value;}
}
}
}
Added: NMail/trunk/NMail.RemoteAccessService/App_Data/Global.asax
===================================================================
--- NMail/trunk/NMail.RemoteAccessService/App_Data/Global.asax (rev 0)
+++ NMail/trunk/NMail.RemoteAccessService/App_Data/Global.asax 2007-06-16 15:04:06 UTC (rev 228)
@@ -0,0 +1,39 @@
+<%@ Application Language="C#" %>
+
+<script runat="server">
+
+ void Application_Start(object sender, EventArgs e)
+ {
+ Hashtable properties = new Hashtable();
+ properties.Add("secure", true);
+ System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(new System.Runtime.Remoting.Channels.Tcp.TcpClientChannel(properties, null), false);
+ }
+
+ void Application_End(object sender, EventArgs e)
+ {
+ // Code that runs on application shutdown
+
+ }
+
+ void Application_Error(object sender, EventArgs e)
+ {
+ // Code that runs when an unhandled error occurs
+
+ }
+
+ void Session_Start(object sender, EventArgs e)
+ {
+ // Code that runs when a new session is started
+
+ }
+
+ void Session_End(object sender, EventArgs e)
+ {
+ // Code that runs when a session ends.
+ // Note: The Session_End event is raised only when the sessionstate mode
+ // is set to InProc in the Web.config file. If session mode is set to StateServer
+ // or SQLServer, the event is not raised.
+
+ }
+
+</script>
Deleted: NMail/trunk/NMail.RemoteAccessService/Global.asax
===================================================================
--- NMail/trunk/NMail.RemoteAccessService/Global.asax 2007-06-16 15:02:35 UTC (rev 227)
+++ NMail/trunk/NMail.RemoteAccessService/Global.asax 2007-06-16 15:04:06 UTC (rev 228)
@@ -1,39 +0,0 @@
-<%@ Application Language="C#" %>
-
-<script runat="server">
-
- void Application_Start(object sender, EventArgs e)
- {
- Hashtable properties = new Hashtable();
- properties.Add("secure", true);
- System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(new System.Runtime.Remoting.Channels.Tcp.TcpClientChannel(properties, null), false);
- }
-
- void Application_End(object sender, EventArgs e)
- {
- // Code that runs on application shutdown
-
- }
-
- void Application_Error(object sender, EventArgs e)
- {
- // Code that runs when an unhandled error occurs
-
- }
-
- void Session_Start(object sender, EventArgs e)
- {
- // Code that runs when a new session is started
-
- }
-
- void Session_End(object sender, EventArgs e)
- {
- // Code that runs when a session ends.
- // Note: The Session_End event is raised only when the sessionstate mode
- // is set to InProc in the Web.config file. If session mode is set to StateServer
- // or SQLServer, the event is not raised.
-
- }
-
-</script>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-16 15:02:33
|
Revision: 227
http://svn.sourceforge.net/nmailserver/?rev=227&view=rev
Author: tmyroadctfig
Date: 2007-06-16 08:02:35 -0700 (Sat, 16 Jun 2007)
Log Message:
-----------
Work on the survey service.
Modified Paths:
--------------
NMail/trunk/NMail.Server/NMailServer.cs
NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj
NMail/trunk/NMail.SurveyService/NMail.SurveyService.csproj
NMail/trunk/NMail.SurveyService/SurveyEnvironment.cs
NMail/trunk/NMail.SurveyService/SurveyInformation.cs
NMail/trunk/NMail.SurveyService/SurveyService.cs
Added Paths:
-----------
NMail/trunk/NMail.SurveyService/SurveyNMail.cs
Modified: NMail/trunk/NMail.Server/NMailServer.cs
===================================================================
--- NMail/trunk/NMail.Server/NMailServer.cs 2007-06-16 15:01:45 UTC (rev 226)
+++ NMail/trunk/NMail.Server/NMailServer.cs 2007-06-16 15:02:35 UTC (rev 227)
@@ -325,7 +325,7 @@
/// <returns>The install location or null if an error occurs.</returns>
public static string GetInstallDirectory() {
string installDirectory = null;
- RegistryKey nmailServerKey = Registry.LocalMachine.OpenSubKey(@"Software\NMail\NMail Server 1.0", false);
+ RegistryKey nmailServerKey = Registry.LocalMachine.OpenSubKey(NMailRegistryKey, false);
if (nmailServerKey != null) {
installDirectory = nmailServerKey.GetValue("InstallDirectory") as string;
@@ -342,5 +342,10 @@
log.Debug("Installation directory: " + installDirectory);
return installDirectory;
}
+
+ /// <summary>
+ /// The base registry key for the NMail server.
+ /// </summary>
+ public const string NMailRegistryKey = @"Software\NMail\NMail Server 1.0";
}
}
Modified: NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj
===================================================================
--- NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj 2007-06-16 15:01:45 UTC (rev 226)
+++ NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj 2007-06-16 15:02:35 UTC (rev 227)
@@ -160,6 +160,10 @@
<Project>{81EA6856-1AA7-4278-B0CC-1F851B987DA0}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</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">
<Name>NMail</Name>
<Project>{5A5A5012-B157-49B1-A35F-67EC9680112A}</Project>
Modified: NMail/trunk/NMail.SurveyService/NMail.SurveyService.csproj
===================================================================
--- NMail/trunk/NMail.SurveyService/NMail.SurveyService.csproj 2007-06-16 15:01:45 UTC (rev 226)
+++ NMail/trunk/NMail.SurveyService/NMail.SurveyService.csproj 2007-06-16 15:02:35 UTC (rev 227)
@@ -29,16 +29,22 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
+ <Reference Include="System.configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="SurveyEnvironment.cs" />
<Compile Include="SurveyInformation.cs" />
+ <Compile Include="SurveyNMail.cs" />
<Compile Include="SurveyService.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\NMail.Server\NMail.Server.csproj">
+ <Project>{45123319-D913-4A92-BB67-C2C9E1A22A17}</Project>
+ <Name>NMail.Server</Name>
+ </ProjectReference>
<ProjectReference Include="..\NMail\NMail.csproj">
<Project>{5A5A5012-B157-49B1-A35F-67EC9680112A}</Project>
<Name>NMail</Name>
Modified: NMail/trunk/NMail.SurveyService/SurveyEnvironment.cs
===================================================================
--- NMail/trunk/NMail.SurveyService/SurveyEnvironment.cs 2007-06-16 15:01:45 UTC (rev 226)
+++ NMail/trunk/NMail.SurveyService/SurveyEnvironment.cs 2007-06-16 15:02:35 UTC (rev 227)
@@ -1,3 +1,20 @@
+/*
+ * Copyright 2004-2007 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.Text;
Modified: NMail/trunk/NMail.SurveyService/SurveyInformation.cs
===================================================================
--- NMail/trunk/NMail.SurveyService/SurveyInformation.cs 2007-06-16 15:01:45 UTC (rev 226)
+++ NMail/trunk/NMail.SurveyService/SurveyInformation.cs 2007-06-16 15:02:35 UTC (rev 227)
@@ -1,3 +1,20 @@
+/*
+ * Copyright 2004-2007 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.Text;
@@ -17,5 +34,15 @@
get { return environment; }
set { environment = value; }
}
+
+ private SurveyNMail nmail;
+
+ /// <summary>
+ /// The NMail details.
+ /// </summary>
+ public SurveyNMail NMail {
+ get { return nmail; }
+ set { nmail = value; }
+ }
}
}
Added: NMail/trunk/NMail.SurveyService/SurveyNMail.cs
===================================================================
--- NMail/trunk/NMail.SurveyService/SurveyNMail.cs (rev 0)
+++ NMail/trunk/NMail.SurveyService/SurveyNMail.cs 2007-06-16 15:02:35 UTC (rev 227)
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2004-2007 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.Reflection;
+using System.Text;
+
+using NMail.Configuration;
+
+namespace NMail.SurveyService {
+ /// <summary>
+ /// The NMail survey details.
+ /// </summary>
+ public class SurveyNMail {
+
+ private Version nmailVersion = Assembly.GetAssembly(typeof(NMailConfiguration)).GetName().Version;
+
+ /// <summary>
+ /// The version of the NMail library.
+ /// </summary>
+ public Version NMailVersion {
+ get { return nmailVersion; }
+ set { nmailVersion = value; }
+ }
+
+ private Version executingAssemblyVersion = Assembly.GetExecutingAssembly().GetName().Version;
+
+ /// <summary>
+ /// The version of the executing assembly.
+ /// </summary>
+ public Version ExecutingAssemblyVersion {
+ get { return executingAssemblyVersion; }
+ set { executingAssemblyVersion = value; }
+ }
+ }
+}
Modified: NMail/trunk/NMail.SurveyService/SurveyService.cs
===================================================================
--- NMail/trunk/NMail.SurveyService/SurveyService.cs 2007-06-16 15:01:45 UTC (rev 226)
+++ NMail/trunk/NMail.SurveyService/SurveyService.cs 2007-06-16 15:02:35 UTC (rev 227)
@@ -1,92 +1,314 @@
+/*
+ * Copyright 2004-2007 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.IO;
+using System.Net;
using System.Text;
+using System.Threading;
using System.Xml;
using System.Xml.Serialization;
using Microsoft.Win32;
+using NMail.Configuration;
+using NMail.DataTypes;
using NMail.DataTypes.Service;
+using NMail.DataTypes.Message;
+using NMail.Server;
namespace NMail.SurveyService {
/// <summary>
/// A service for periodically surveying the server details and reporting back usage stats.
/// </summary>
public class SurveyService : IService {
-
/// <summary>
/// Creates a new instance of the service.
/// </summary>
- public SurveyService() {
- }
+ public SurveyService() { }
- protected XmlDocument GatherData() {
- //log.Debug("NMail Console Server version: [" + Assembly.GetExecutingAssembly().GetName().Version + "]");
- // log.Debug("NMail Library version: [" + Assembly.GetAssembly(typeof(NMailConfiguration)).GetName().Version + "]");
-
+ /// <summary>
+ /// Gets the current survey information.
+ /// </summary>
+ /// <returns>An XML documeent containing the suvery details.</returns>
+ protected string GatherData() {
MemoryStream ms = new MemoryStream();
XmlSerializer serializer = new XmlSerializer(typeof(SurveyInformation));
serializer.Serialize(ms, new SurveyInformation());
- XmlDocument result = new XmlDocument();
- result.LoadXml(Encoding.Unicode.GetString(ms.ToArray()));
- return result;
+ return Encoding.Unicode.GetString(ms.ToArray());
}
+ /// <summary>
+ /// Gets the last date/time the survey information was sent.
+ /// </summary>
+ /// <returns>The datetime or null.</returns>
+ protected DateTime? GetLastSurveyTimestamp() {
+ RegistryKey nmailServerKey = Registry.LocalMachine.OpenSubKey(NMailServer.NMailRegistryKey, false);
+
+ if (nmailServerKey != null) {
+ string sentString = nmailServerKey.GetValue("LastSuveryTimestamp") as string;
+
+ DateTime sentTimestamp;
+ if (DateTime.TryParse(sentString, out sentTimestamp)) {
+ return sentTimestamp;
+ }
+ }
+
+ // Never sent details
+ return null;
+ }
+
+ /// <summary>
+ /// Sets the last date/time the survey information was sent.
+ /// </summary>
+ protected void SetLastSurveyTimestamp() {
+ RegistryKey nmailServerKey = Registry.LocalMachine.OpenSubKey(NMailServer.NMailRegistryKey, false);
+
+ if (nmailServerKey == null) {
+ nmailServerKey = Registry.LocalMachine.CreateSubKey(NMailServer.NMailRegistryKey);
+ }
+
+ nmailServerKey.SetValue("LastSuveryTimestamp", DateTime.Now.ToString());
+ }
+
+ protected TimeSpan GetWaitPeriod() {
+ DateTime? lastSent = GetLastSurveyTimestamp();
+
+ if (lastSent.HasValue) {
+ // TODO: obtain period from config file
+ return DateTime.Now - (lastSent.Value + TimeSpan.FromDays(30));
+ }
+
+ return TimeSpan.Zero;
+ }
+
+ protected void SendSurveyInformation() {
+ Message message = new Message();
+ message.Subject = "[NMail Survey Information]";
+ message.From = "NMail survey service";
+ message.SetSimpleBody(GatherData());
+
+ SmtpMessage smtpMessage = new SmtpMessage();
+ smtpMessage.Message = message;
+ smtpMessage.SourceAddress = IPAddress.Loopback;
+ smtpMessage.ReportedHost = IPAddress.Loopback;
+ smtpMessage.Sender = new EmailAddress(null, null);
+ smtpMessage.AddRecipient(new EmailAddress("tmy...@us..."));
+
+ NMailConfiguration.Current.Router.SpoolMessage(smtpMessage);
+ }
+
+ /// <summary>
+ /// An event to signal a quit.
+ /// </summary>
+ ManualResetEvent quitEvent = new ManualResetEvent(true);
+
+ /// <summary>
+ /// A flag indicating if the service is running.
+ /// </summary>
+ bool running = false;
+
+ protected void WaitForSurvey(object unused) {
+ // Flag that we're running
+ lock (this) {
+ running = true;
+ }
+
+ while (this.running) {
+ // Get the period to wait
+ TimeSpan waitPeriod = GetWaitPeriod();
+
+ bool quitSignalled = this.quitEvent.WaitOne((int) waitPeriod.TotalMilliseconds, true);
+
+ if (!quitSignalled) {
+ try {
+ // Send the survey information
+ SendSurveyInformation();
+
+ } catch (Exception ex) {
+ // Ignore
+ }
+
+ // Update the last sent time
+ SetLastSurveyTimestamp();
+
+ } else {
+ // Flag that we've quit
+ lock (this) {
+ running = false;
+ }
+ }
+ }
+ }
+
#region IService Members
+ /// <summary>
+ /// Initialise the service. All services are <b>Init</b>ialised before any services are <b>Start</b>ed.
+ /// </summary>
+ public void Init() { }
- public void Init() {}
-
+ /// <summary>
+ /// Start the service.
+ /// </summary>
+ /// <exception cref="System.InvalidOperationException">
+ /// If Start() is called before Init().
+ /// </exception>
public void Start() {
- XmlDocument doc = GatherData();
+ lock (this) {
+ if (!this.Running) {
+ this.quitEvent.Reset();
+ ThreadPool.QueueUserWorkItem(new WaitCallback(WaitForSurvey));
+ if (this.started != null) {
+ this.started(this, new EventArgs());
+ }
+ }
+ }
}
+ /// <summary>
+ /// Stop the service. It should be possible to resume the service with a subsequent call to Init and Start.
+ /// If you take too long (arbitrary) to Stop gracefully, then you may get an additional call to Stop
+ /// immediately on another thread, you must be able to handle this.
+ /// </summary>
public void Stop(bool runCurrentToCompletion) {
- throw new Exception("The method or operation is not implemented.");
+ lock (this) {
+ if (this.Running) {
+ this.quitEvent.Set();
+
+ if (this.stopped != null) {
+ this.stopped(this, new EventArgs());
+ }
+ }
+ }
}
+ /// <summary>
+ /// Returns true if this service supports pausing processing without performing a complete shutdown.
+ /// </summary>
public bool SupportsPause {
get { return false; }
}
+ /// <summary>
+ /// Pauses the service from processing but doesn't require a complete shutdown. E.g. a service may stop
+ /// accepting new connections or stop processing its work queue.
+ /// </summary>
+ /// <exception cref="System.InvalidOperationException">
+ /// If this service doesn't support pausing.
+ /// </exception>
public void Pause() {
- throw new InvalidOperationException("The method or operation is not implemented.");
+ throw new InvalidOperationException("Can't pause this service.");
}
+ /// <summary>
+ /// Continues processing following a pause command.
+ /// </summary>
+ /// <exception cref="System.InvalidOperationException">
+ /// If this service doesn't support pausing.
+ /// </exception>
public void Continue() {
- throw new InvalidOperationException("The method or operation is not implemented.");
+ throw new InvalidOperationException("Can't resume this service.");
}
+ /// <summary>
+ /// Reload the service configuration. This may recycle the service instance by stopping and discarding
+ /// the current IService and returning a new one.
+ /// </summary>
+ /// <remarks>
+ /// The service is <b>running</b> when this is called.
+ /// </remarks>
+ /// <exception cref="System.InvalidOperationException">
+ /// If this service is not running when this is called.
+ /// </exception>
public IService ReloadConfiguration() {
- throw new InvalidOperationException("The method or operation is not implemented.");
+ throw new InvalidOperationException("Can't reload configuration for this service.");
}
+ /// <summary>
+ /// Does this service support reloading configuration parameters on the fly?
+ /// </summary>
public bool AllowsReloadConfiguration {
get { return false; }
}
+ /// <summary>
+ /// Is the service currently running?
+ /// </summary>
public bool Running {
- get { throw new Exception("The method or operation is not implemented."); }
+ get { return this.running; }
}
+ /// <summary>
+ /// The name of this service.
+ /// </summary>
public string Name {
get { return "Survey Service"; }
}
+ /// <summary>
+ /// The description of this service.
+ /// </summary>
public string Description {
get { return "Periodically reports survey and usage information."; }
}
+ /// <summary>
+ /// A URL for details on this service.
+ /// </summary>
public Uri SupportUrl {
get { return new Uri("http://nmailserver.sf.net/support/services/survey"); }
}
- public event EventHandler Started;
+ private event EventHandler started;
- public event EventHandler Stopped;
+ /// <summary>
+ /// The event triggered when the service has been started.
+ /// </summary>
+ /// <remarks>
+ /// Running should return true when this event is received.
+ /// </remarks>
+ public event EventHandler Started {
+ add {
+ this.started += value;
+ }
+ remove {
+ this.started -= value;
+ }
+ }
+ private event EventHandler stopped;
+
+ /// <summary>
+ /// The event triggered when the sevice has been stopped.
+ /// </summary>
+ /// <remarks>
+ /// Running should return false when this event is received.
+ /// </remarks>
+ public event EventHandler Stopped {
+ add {
+ this.stopped += value;
+ }
+ remove {
+ this.stopped -= value;
+ }
+ }
#endregion
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-16 15:01:43
|
Revision: 226
http://svn.sourceforge.net/nmailserver/?rev=226&view=rev
Author: tmyroadctfig
Date: 2007-06-16 08:01:45 -0700 (Sat, 16 Jun 2007)
Log Message:
-----------
Granted user admin privileges to administrator.
Modified Paths:
--------------
NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs
Modified: NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs
===================================================================
--- NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs 2007-06-16 15:00:42 UTC (rev 225)
+++ NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs 2007-06-16 15:01:45 UTC (rev 226)
@@ -1900,6 +1900,19 @@
sysAce.Identifier = administrator.Username;
SetSystemPrivilegeAce(sysAce);
+ GenericAce<UserGroupAdminPrivilege> userGroupAce = new GenericAce<UserGroupAdminPrivilege>();
+ userGroupAce.AceType = AcePrivilegeType.Allow;
+ userGroupAce.Privilege = UserGroupAdminPrivilege.CreateGroups
+ | UserGroupAdminPrivilege.CreateUsers
+ | UserGroupAdminPrivilege.DeleteGroups
+ | UserGroupAdminPrivilege.DeleteUsers
+ | UserGroupAdminPrivilege.EditGroups
+ | UserGroupAdminPrivilege.EditUsers
+ | UserGroupAdminPrivilege.ViewAllGroups
+ | UserGroupAdminPrivilege.ViewAllUsers;
+ userGroupAce.Identifier = administrator.Username;
+ SetUserGroupAdminPrivilegeAce(userGroupAce);
+
// Create an administrator group
LocalStoreGroup adminGroup = new LocalStoreGroup();
adminGroup.Name = "Administrators"; // TODO: get from a global admin name or something
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-16 15:00:40
|
Revision: 225
http://svn.sourceforge.net/nmailserver/?rev=225&view=rev
Author: tmyroadctfig
Date: 2007-06-16 08:00:42 -0700 (Sat, 16 Jun 2007)
Log Message:
-----------
Changed get next delivery attempt to use a transaction.
Modified Paths:
--------------
NMail/trunk/NMail.SpoolData.NHibernate/NHibernateSpoolData.cs
Modified: NMail/trunk/NMail.SpoolData.NHibernate/NHibernateSpoolData.cs
===================================================================
--- NMail/trunk/NMail.SpoolData.NHibernate/NHibernateSpoolData.cs 2007-06-16 14:59:46 UTC (rev 224)
+++ NMail/trunk/NMail.SpoolData.NHibernate/NHibernateSpoolData.cs 2007-06-16 15:00:42 UTC (rev 225)
@@ -276,16 +276,20 @@
log.Debug("Checking the next scheduled delivery attempt.");
using (ISession session = this.hibernateFactory.OpenSession()) {
- // Get a lists of hosts with deliveries in progress
- IQuery query = session.CreateQuery("select mr1 from NMail.DataTypes.SmtpMessageRecipient as mr1 where mr1.InProgress = false and mr1.Message.Filtered = true and mr1.Host not in (select mr2.Host From NMail.DataTypes.SmtpMessageRecipient as mr2 where mr2.InProgress = true) order by mr1.NextDeliveryAttempt asc");
- IList<SmtpMessageRecipient> recipients = query.List<SmtpMessageRecipient>();
+ using (ITransaction tx = session.BeginTransaction()) {
+ // Get a lists of hosts with deliveries in progress
+ IQuery query = session.CreateQuery("select mr1 from NMail.DataTypes.SmtpMessageRecipient as mr1 where mr1.InProgress = false and mr1.Message.Filtered = true and mr1.Host not in (select mr2.Host From NMail.DataTypes.SmtpMessageRecipient as mr2 where mr2.InProgress = true) order by mr1.NextDeliveryAttempt asc");
+ IList<SmtpMessageRecipient> recipients = query.List<SmtpMessageRecipient>();
- if (recipients.Count > 0) {
- return recipients[0].NextDeliveryAttempt;
+ if (recipients.Count > 0) {
+ tx.Commit();
+ return recipients[0].NextDeliveryAttempt;
+ }
+
+ // No match
+ tx.Commit();
+ return DateTime.MaxValue;
}
-
- // No match
- return DateTime.MaxValue;
}
}
#endregion
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-16 14:59:44
|
Revision: 224
http://svn.sourceforge.net/nmailserver/?rev=224&view=rev
Author: tmyroadctfig
Date: 2007-06-16 07:59:46 -0700 (Sat, 16 Jun 2007)
Log Message:
-----------
Made some private fields actually private!
Modified Paths:
--------------
NMail/trunk/NMail/Configuration/NMailConfiguration.cs
Modified: NMail/trunk/NMail/Configuration/NMailConfiguration.cs
===================================================================
--- NMail/trunk/NMail/Configuration/NMailConfiguration.cs 2007-06-16 14:59:05 UTC (rev 223)
+++ NMail/trunk/NMail/Configuration/NMailConfiguration.cs 2007-06-16 14:59:46 UTC (rev 224)
@@ -204,7 +204,7 @@
}
}
- public AbstractMessageRouter router;
+ private AbstractMessageRouter router;
/// <summary>
/// The message router.
@@ -217,7 +217,7 @@
}
}
- public ISpoolService spoolService;
+ private ISpoolService spoolService;
/// <summary>
/// The SMTP spool.
@@ -230,7 +230,7 @@
}
}
- public ISpoolFilterService spoolFilter;
+ private ISpoolFilterService spoolFilter;
/// <summary>
/// The SMTP spool filter.
@@ -243,7 +243,7 @@
}
}
- public ISpoolData spoolData;
+ private ISpoolData spoolData;
/// <summary>
/// The spool data instance.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-16 14:59:03
|
Revision: 223
http://svn.sourceforge.net/nmailserver/?rev=223&view=rev
Author: tmyroadctfig
Date: 2007-06-16 07:59:05 -0700 (Sat, 16 Jun 2007)
Log Message:
-----------
Fixed a defect stopping all threads.
Modified Paths:
--------------
NMail/trunk/NMail/Threading/NMailThreadPool.cs
Modified: NMail/trunk/NMail/Threading/NMailThreadPool.cs
===================================================================
--- NMail/trunk/NMail/Threading/NMailThreadPool.cs 2007-06-16 14:58:16 UTC (rev 222)
+++ NMail/trunk/NMail/Threading/NMailThreadPool.cs 2007-06-16 14:59:05 UTC (rev 223)
@@ -65,7 +65,6 @@
} else {
wis.WorkerThread.Join();
}
- wisList.Remove(wis);
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-16 14:58:16
|
Revision: 222
http://svn.sourceforge.net/nmailserver/?rev=222&view=rev
Author: tmyroadctfig
Date: 2007-06-16 07:58:16 -0700 (Sat, 16 Jun 2007)
Log Message:
-----------
Fixed some silly spelling mistakes. Added some constants header values to MessageHeaders.
Modified Paths:
--------------
NMail/trunk/NMail/DataTypes/Message/Envelope.cs
NMail/trunk/NMail/DataTypes/Message/Message.cs
NMail/trunk/NMail/DataTypes/Message/MessageHeaders.cs
NMail/trunk/NMail/DataTypes/Message/SimpleMessageBody.cs
NMail/trunk/NMail/DataTypes/Service/IService.cs
NMail/trunk/NMail/DataTypes/SmtpMessage.cs
NMail/trunk/NMail.ImapService/State/AuthenticatedState.cs
NMail/trunk/NMail.LocalStore/DeliveryActions/ManageWhiteList.cs
NMail/trunk/NMail.Sendmail/Sendmail.cs
NMail/trunk/NMail.SmtpService/Command/DataCommand.cs
NMail/trunk/NMail.SmtpService/Command/RecipientCommand.cs
NMail/trunk/NMail.SmtpService/Command/SenderCommand.cs
NMail/trunk/NMail.SmtpService/Configuration/SmtpServiceConfiguration.cs
NMail/trunk/NMail.SmtpService/NMail.SmtpService.csproj
NMail/trunk/NMail.SmtpService/SmtpServiceConnection.cs
NMail/trunk/NMail.UnitTests/DataTypes/MessageHeaderTests.cs
Added Paths:
-----------
NMail/trunk/NMail.SmtpService/State/RecipientReceivedState.cs
NMail/trunk/NMail.SmtpService/State/SenderReceivedState.cs
Removed Paths:
-------------
NMail/trunk/NMail.SmtpService/State/RecipientRecievedState.cs
NMail/trunk/NMail.SmtpService/State/SenderRecievedState.cs
Modified: NMail/trunk/NMail/DataTypes/Message/Envelope.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Message/Envelope.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail/DataTypes/Message/Envelope.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -37,37 +37,37 @@
/// <param name="messageHeaders">The headers containing the envelope information.</param>
public Envelope(MessageHeaders messageHeaders) {
// These fields should never be null
- this.from = messageHeaders["From"];
- this.date = messageHeaders["Date"];
- this.subject = messageHeaders["Subject"];
+ this.from = messageHeaders[MessageHeaders.FromHeader];
+ this.date = messageHeaders[MessageHeaders.DateHeader];
+ this.subject = messageHeaders[MessageHeaders.SubjectHeader];
- this.sender = messageHeaders["Sender"];
+ this.sender = messageHeaders[MessageHeaders.SenderHeader];
if (this.sender == null || this.sender.Trim() == string.Empty) {
this.sender = this.from;
}
- this.replyTo = messageHeaders["Rely-To"];
+ this.replyTo = messageHeaders[MessageHeaders.ReplyToHeader];
if (this.replyTo == null || this.replyTo.Trim() == string.Empty) {
this.replyTo = this.from;
}
// These fields can be null
- this.messageId = messageHeaders["Message-Id"];
+ this.messageId = messageHeaders[MessageHeaders.MessageIdHeader];
if (this.messageId != null && this.messageId.Trim() == string.Empty) {
this.messageId = null;
}
- this.to = messageHeaders["To"];
+ this.to = messageHeaders[MessageHeaders.ToHeader];
if (this.to != null && this.to.Trim() == string.Empty) {
this.to = null;
}
- this.inReplyTo = messageHeaders["In-Reply-To"];
+ this.inReplyTo = messageHeaders[MessageHeaders.InReplyToHeader];
if (this.inReplyTo != null && this.inReplyTo.Trim() == string.Empty) {
this.inReplyTo = null;
}
- this.bcc = messageHeaders["Bcc"];
+ this.bcc = messageHeaders[MessageHeaders.BccHeader];
if (this.bcc != null && this.inReplyTo.Trim() == string.Empty) {
this.bcc = null;
}
- this.cc = messageHeaders["Cc"];
+ this.cc = messageHeaders[MessageHeaders.CcHeader];
if (this.cc != null && this.cc.Trim() == string.Empty) {
this.cc = null;
}
Modified: NMail/trunk/NMail/DataTypes/Message/Message.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Message/Message.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail/DataTypes/Message/Message.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -108,6 +108,40 @@
set { body = value; }
}
+ /// <summary>
+ /// The subject for this message.
+ /// </summary>
+ public string Subject {
+ get { return this.body.Headers[MessageHeaders.SubjectHeader]; }
+ set { this.body.Headers[MessageHeaders.SubjectHeader] = value; }
+ }
+
+ /// <summary>
+ /// The from address for this message.
+ /// </summary>
+ public string From {
+ get { return this.body.Headers[MessageHeaders.FromHeader]; }
+ set { this.body.Headers[MessageHeaders.FromHeader] = value; }
+ }
+
+ /// <summary>
+ /// The date for this message.
+ /// </summary>
+ public string Date {
+ get { return this.body.Headers[MessageHeaders.DateHeader]; }
+ set { this.body.Headers[MessageHeaders.DateHeader] = value; }
+ }
+
+ /// <summary>
+ /// Sets the body of this message to a simple string.
+ /// </summary>
+ /// <param name="bodyData">The string to use for the message body.</param>
+ public void SetSimpleBody(string bodyData) {
+ SimpleMessageBody newBody = new SimpleMessageBody(bodyData);
+ newBody.Headers = this.Headers;
+ this.body = newBody;
+ }
+
#region IMessageBodyPart
/// <summary>
/// Gets or sets the headers associated with this body part.
Modified: NMail/trunk/NMail/DataTypes/Message/MessageHeaders.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Message/MessageHeaders.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail/DataTypes/Message/MessageHeaders.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -228,5 +228,60 @@
this.AppendEnd(name, value);
}
}
+
+ /// <summary>
+ /// The Subject header.
+ /// </summary>
+ public const string SubjectHeader = "Subject";
+
+ /// <summary>
+ /// The Date header.
+ /// </summary>
+ public const string DateHeader = "Date";
+
+ /// <summary>
+ /// The From header.
+ /// </summary>
+ public const string FromHeader = "From";
+
+ /// <summary>
+ /// The Received header.
+ /// </summary>
+ public const string ReceivedHeader = "Received";
+
+ /// <summary>
+ /// The To header.
+ /// </summary>
+ public const string ToHeader = "To";
+
+ /// <summary>
+ /// The Cc header.
+ /// </summary>
+ public const string CcHeader = "Cc";
+
+ /// <summary>
+ /// The Bcc header.
+ /// </summary>
+ public const string BccHeader = "Bcc";
+
+ /// <summary>
+ /// The In-reply-to header.
+ /// </summary>
+ public const string InReplyToHeader = "In-Reply-To";
+
+ /// <summary>
+ /// The Reply-to header.
+ /// </summary>
+ public const string ReplyToHeader = "Reply-To";
+
+ /// <summary>
+ /// The Sender header.
+ /// </summary>
+ public const string SenderHeader = "Sender";
+
+ /// <summary>
+ /// The Message-Id header.
+ /// </summary>
+ public const string MessageIdHeader = "Message-Id";
}
}
Modified: NMail/trunk/NMail/DataTypes/Message/SimpleMessageBody.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Message/SimpleMessageBody.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail/DataTypes/Message/SimpleMessageBody.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -46,6 +46,12 @@
/// <summary>
/// Creates a message body part from the given lines.
/// </summary>
+ /// <param name="data">The lines to create the data from.</param>
+ public SimpleMessageBody(string data) : this(null, new ByteString(data, Encoding.ASCII)) { }
+
+ /// <summary>
+ /// Creates a message body part from the given lines.
+ /// </summary>
/// <param name="headers">The headers associated with this body part.</param>
/// <param name="data">The lines to create the data from.</param>
public SimpleMessageBody(MessageHeaders headers, ByteString data) : base(data) {
Modified: NMail/trunk/NMail/DataTypes/Service/IService.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Service/IService.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail/DataTypes/Service/IService.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -106,7 +106,7 @@
/// The event triggered when the service has been started.
/// </summary>
/// <remarks>
- /// Running should return true when this event is recieved.
+ /// Running should return true when this event is received.
/// </remarks>
event EventHandler Started;
@@ -114,7 +114,7 @@
/// The event triggered when the sevice has been stopped.
/// </summary>
/// <remarks>
- /// Running should return false when this event is recieved.
+ /// Running should return false when this event is received.
/// </remarks>
event EventHandler Stopped;
}
Modified: NMail/trunk/NMail/DataTypes/SmtpMessage.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/SmtpMessage.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail/DataTypes/SmtpMessage.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -153,7 +153,7 @@
private IPAddress sourceAddress;
/// <summary>
- /// Gets or sets the address from which this message was recieved.
+ /// Gets or sets the address from which this message was received.
/// </summary>
public IPAddress SourceAddress {
get{
Modified: NMail/trunk/NMail.ImapService/State/AuthenticatedState.cs
===================================================================
--- NMail/trunk/NMail.ImapService/State/AuthenticatedState.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail.ImapService/State/AuthenticatedState.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -365,19 +365,18 @@
// Parse the message headers
Message message = new Message(new ByteString(messageData, Encoding.ASCII));
- MessageHeaders headers = message.Headers;
// Prepare details for the headers
string currentTime = DateTime.Now.ToString("r", DateTimeFormatInfo.InvariantInfo);
- // TODO: is a Recieved header needed here?
+ // TODO: is a Received header needed here?
// All message must have a from address and a date.
- if (headers["From"] == null) {
- headers["From"] = Session.AuthenticationToken.Username;
+ if (message.From == null) {
+ message.From = Session.AuthenticationToken.Username;
}
- if (headers["Date"] == null) {
- headers["Date"] = currentTime;
+ if (message.Date == null) {
+ message.Date = currentTime;
}
// Attempt to spool the message
Modified: NMail/trunk/NMail.LocalStore/DeliveryActions/ManageWhiteList.cs
===================================================================
--- NMail/trunk/NMail.LocalStore/DeliveryActions/ManageWhiteList.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail.LocalStore/DeliveryActions/ManageWhiteList.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -146,7 +146,7 @@
public bool IsCommandMessage(Message message, EmailAddress sender, EmailAddress recipient) {
if (sender == recipient) {
- if (message.Headers["Subject"].Trim().ToLower() == ListCommand) {
+ if (message.Headers[MessageHeaders.SubjectHeader].Trim().ToLower() == ListCommand) {
return true;
}
}
@@ -155,7 +155,7 @@
}
public WhiteListCommandType GetCommand(Message message) {
- if (message.Headers["Subject"].Trim().ToLower() == ListCommand) {
+ if (message.Headers[MessageHeaders.SubjectHeader].Trim().ToLower() == ListCommand) {
return WhiteListCommandType.List;
}
Modified: NMail/trunk/NMail.Sendmail/Sendmail.cs
===================================================================
--- NMail/trunk/NMail.Sendmail/Sendmail.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail.Sendmail/Sendmail.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -74,7 +74,7 @@
// Get the recipients
if (options.ExtractRecipients) {
- string[] recipients = message.Headers["To"].Split(';');
+ string[] recipients = message.Headers[MessageHeaders.ToHeader].Split(';');
foreach (string recipient in recipients) {
string address = null;
Modified: NMail/trunk/NMail.SmtpService/Command/DataCommand.cs
===================================================================
--- NMail/trunk/NMail.SmtpService/Command/DataCommand.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail.SmtpService/Command/DataCommand.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -95,12 +95,13 @@
}
// Parse the message headers
- session.Message.Message = new Message(messageData.ToByteString());
- MessageHeaders headers = session.Message.Message.Headers;
+ Message message = new Message(messageData.ToByteString());
+ MessageHeaders headers = message.Headers;
+ session.Message.Message = message;
// Check the headers for signs of an endless SMTP loop
- if (headers.GetHeaders("Recieved") == null
- || headers.GetHeaders("Recieved").Length < SmtpServiceConfiguration.Current.MaximumRecievedCount) {
+ if (headers.GetHeaders(MessageHeaders.ReceivedHeader) == null
+ || headers.GetHeaders(MessageHeaders.ReceivedHeader).Length < SmtpServiceConfiguration.Current.MaximumReceivedCount) {
// Prepare details for the headers
string currentTime = DateTime.Now.ToString("r", DateTimeFormatInfo.InvariantInfo);
@@ -108,16 +109,21 @@
string transport = (session.Esmtp) ? "ESMTP" : "SMTP";
// Add the received header
- string recievedHeader = string.Format(RecievedHeader, session.ReportedHost,
- clientHost, session.ClientAddress, SmtpServiceConfiguration.Current.VisibleHost, transport, currentTime);
- headers.AppendStart("Recieved", recievedHeader);
+ string receivedHeader = string.Format(ReceivedHeaderFormat,
+ session.ReportedHost,
+ clientHost,
+ session.ClientAddress,
+ SmtpServiceConfiguration.Current.VisibleHost,
+ transport,
+ currentTime);
+ headers.AppendStart(MessageHeaders.ReceivedHeader, receivedHeader);
// All message must have a from address and a date.
- if (headers["From"] == null) {
- headers["From"] = session.Message.Sender.ToString(true);
+ if (message.From == null) {
+ message.From = session.Message.Sender.ToString(true);
}
- if (headers["Date"] == null) {
- headers["Date"] = currentTime;
+ if (message.Date == null) {
+ message.Date = currentTime;
}
try {
@@ -129,8 +135,8 @@
session.Connection.TemporaryBadResponse(ex.Message);
}
} else {
- // Too many "Recieved" headers - message rejected
- session.Log.Warn("Rejected message with too many \"Recieved\" headers.");
+ // Too many "Received" headers - message rejected
+ session.Log.Warn("Rejected message with too many \"Received\" headers.");
session.Connection.ErrorPossibleSmtpLoop();
}
@@ -141,7 +147,7 @@
/// <summary>
/// The format of the "Received:" header line that must be added to the message.
/// </summary>
- public const string RecievedHeader = "from {0} ({1} [{2}])\r\n\tby NMail ({3}) with {4} {5}";
+ public const string ReceivedHeaderFormat = "from {0} ({1} [{2}])\r\n\tby NMail ({3}) with {4} {5}";
#endregion
}
Modified: NMail/trunk/NMail.SmtpService/Command/RecipientCommand.cs
===================================================================
--- NMail/trunk/NMail.SmtpService/Command/RecipientCommand.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail.SmtpService/Command/RecipientCommand.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -72,7 +72,7 @@
if (session.Message.Recipients.Count <= SmtpServiceConfiguration.Current.RecipientLimit) {
session.Message.AddRecipient(recipient.Address);
session.Connection.OkRecipient(recipient.Address);
- session.CurrentState = new RecipientRecievedState(session);
+ session.CurrentState = new RecipientReceivedState(session);
} else {
session.Connection.TemporaryBadRecipient(recipient.Address);
}
Modified: NMail/trunk/NMail.SmtpService/Command/SenderCommand.cs
===================================================================
--- NMail/trunk/NMail.SmtpService/Command/SenderCommand.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail.SmtpService/Command/SenderCommand.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -91,7 +91,7 @@
session.SizeEstimate = sizeEstimate;
session.MessageEncoding = encoding;
session.Connection.Ok();
- session.CurrentState = new SenderRecievedState(session);
+ session.CurrentState = new SenderReceivedState(session);
}
}
Modified: NMail/trunk/NMail.SmtpService/Configuration/SmtpServiceConfiguration.cs
===================================================================
--- NMail/trunk/NMail.SmtpService/Configuration/SmtpServiceConfiguration.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail.SmtpService/Configuration/SmtpServiceConfiguration.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -123,17 +123,17 @@
}
/// <summary>
- /// The maximum number of "Recieved" header entries before a message is rejected
+ /// The maximum number of "Received" header entries before a message is rejected
/// being in an endless loop. Should be at least 100 RFC 2821 6.2
/// </summary>
- [ConfigurationProperty("MaxRecievedCount", DefaultValue = 100)]
+ [ConfigurationProperty("MaxReceivedCount", DefaultValue = 100)]
[IntegerValidator(MinValue = 10, MaxValue = Int32.MaxValue)]
- public int MaximumRecievedCount {
+ public int MaximumReceivedCount {
get {
- return (int) this["MaxRecievedCount"];
+ return (int) this["MaxReceivedCount"];
}
set {
- this["MaxRecievedCount"] = value;
+ this["MaxReceivedCount"] = value;
}
}
Modified: NMail/trunk/NMail.SmtpService/NMail.SmtpService.csproj
===================================================================
--- NMail/trunk/NMail.SmtpService/NMail.SmtpService.csproj 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail.SmtpService/NMail.SmtpService.csproj 2007-06-16 14:58:16 UTC (rev 222)
@@ -134,12 +134,8 @@
<Compile Include="State\NegotiatedState.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="State\RecipientRecievedState.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="State\SenderRecievedState.cs">
- <SubType>Code</SubType>
- </Compile>
+ <Compile Include="State\RecipientReceivedState.cs" />
+ <Compile Include="State\SenderReceivedState.cs" />
<Content Include="NMail.SmtpService.build" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
Modified: NMail/trunk/NMail.SmtpService/SmtpServiceConnection.cs
===================================================================
--- NMail/trunk/NMail.SmtpService/SmtpServiceConnection.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail.SmtpService/SmtpServiceConnection.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -165,7 +165,7 @@
}
/// <summary>
- /// Sends an error message reporting that too many "Recieved" headers have been
+ /// Sends an error message reporting that too many "Received" headers have been
/// detected.
/// </summary>
public void ErrorPossibleSmtpLoop() {
@@ -252,7 +252,7 @@
/// <summary>
/// The error response when a SMTP loop is detected.
/// </summary>
- private const string ErrorSmtpLoopDetected = "554 Error: Too many \"Recieved\" headers; possible SMTP loop.";
+ private const string ErrorSmtpLoopDetected = "554 Error: Too many \"Received\" headers; possible SMTP loop.";
#endregion
}
}
Copied: NMail/trunk/NMail.SmtpService/State/RecipientReceivedState.cs (from rev 192, NMail/trunk/NMail.SmtpService/State/RecipientRecievedState.cs)
===================================================================
--- NMail/trunk/NMail.SmtpService/State/RecipientReceivedState.cs (rev 0)
+++ NMail/trunk/NMail.SmtpService/State/RecipientReceivedState.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2004-2006 Luke Quinane, Daniel Frampton and Jared Hodges.
+ *
+ * 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 NMail.DataTypes;
+using NMail.SmtpService.Command;
+
+namespace NMail.SmtpService.State {
+ /// <summary>
+ /// Defines command behaviour in the recipient received state.
+ /// </summary>
+ public class RecipientReceivedState : AbstractSmtpState {
+ /// <summary>
+ /// Creates a new instance of the state.
+ /// </summary>
+ /// <param name="session">The session the owns this state.</param>
+ public RecipientReceivedState(SmtpSession session) : base(session) {
+ this.Commands["rcpt"] = new RecipientCommand();
+ this.Commands["data"] = new DataCommand();
+ this.Commands["rset"] = new ResetCommand(true);
+ }
+ }
+}
Deleted: NMail/trunk/NMail.SmtpService/State/RecipientRecievedState.cs
===================================================================
--- NMail/trunk/NMail.SmtpService/State/RecipientRecievedState.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail.SmtpService/State/RecipientRecievedState.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -1,38 +0,0 @@
-/*
- * Copyright 2004-2006 Luke Quinane, Daniel Frampton and Jared Hodges.
- *
- * 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 NMail.DataTypes;
-using NMail.SmtpService.Command;
-
-namespace NMail.SmtpService.State {
- /// <summary>
- /// Defines command behaviour in the recipient recieved state.
- /// </summary>
- public class RecipientRecievedState : AbstractSmtpState {
- /// <summary>
- /// Creates a new instance of the state.
- /// </summary>
- /// <param name="session">The session the owns this state.</param>
- public RecipientRecievedState(SmtpSession session) : base(session) {
- this.Commands["rcpt"] = new RecipientCommand();
- this.Commands["data"] = new DataCommand();
- this.Commands["rset"] = new ResetCommand(true);
- }
- }
-}
Copied: NMail/trunk/NMail.SmtpService/State/SenderReceivedState.cs (from rev 192, NMail/trunk/NMail.SmtpService/State/SenderRecievedState.cs)
===================================================================
--- NMail/trunk/NMail.SmtpService/State/SenderReceivedState.cs (rev 0)
+++ NMail/trunk/NMail.SmtpService/State/SenderReceivedState.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004-2006 Luke Quinane, Daniel Frampton and Jared Hodges.
+ *
+ * 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 NMail;
+using NMail.Configuration;
+using NMail.DataTypes;
+using NMail.SmtpService.Command;
+
+namespace NMail.SmtpService.State {
+ /// <summary>
+ /// Defines command behaviour in the sender received state.
+ /// </summary>
+ public class SenderReceivedState : AbstractSmtpState {
+ /// <summary>
+ /// Creates a new instance of the state.
+ /// </summary>
+ /// <param name="session">The session the owns this state.</param>
+ public SenderReceivedState(SmtpSession session) : base(session) {
+ this.Commands["rcpt"] = new RecipientCommand();
+ this.Commands["rset"] = new ResetCommand(true);
+ }
+ }
+}
Deleted: NMail/trunk/NMail.SmtpService/State/SenderRecievedState.cs
===================================================================
--- NMail/trunk/NMail.SmtpService/State/SenderRecievedState.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail.SmtpService/State/SenderRecievedState.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -1,39 +0,0 @@
-/*
- * Copyright 2004-2006 Luke Quinane, Daniel Frampton and Jared Hodges.
- *
- * 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 NMail;
-using NMail.Configuration;
-using NMail.DataTypes;
-using NMail.SmtpService.Command;
-
-namespace NMail.SmtpService.State {
- /// <summary>
- /// Defines command behaviour in the sender recieved state.
- /// </summary>
- public class SenderRecievedState : AbstractSmtpState {
- /// <summary>
- /// Creates a new instance of the state.
- /// </summary>
- /// <param name="session">The session the owns this state.</param>
- public SenderRecievedState(SmtpSession session) : base(session) {
- this.Commands["rcpt"] = new RecipientCommand();
- this.Commands["rset"] = new ResetCommand(true);
- }
- }
-}
Modified: NMail/trunk/NMail.UnitTests/DataTypes/MessageHeaderTests.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/DataTypes/MessageHeaderTests.cs 2007-06-16 14:54:29 UTC (rev 221)
+++ NMail/trunk/NMail.UnitTests/DataTypes/MessageHeaderTests.cs 2007-06-16 14:58:16 UTC (rev 222)
@@ -20,7 +20,7 @@
public const string BasicParsing2 = "From: \"Sample Person\" <sp...@sa...>\r\nTo: \"newuser\"\r\nSubject: Testing 123\r\nDate: Mon, 10 Jan 2020 18:00:00 +1030";
- public const string BasicParsing3 = "Recieved: from niknak3 (3.3.3.3 [3.3.3.3])\r\n by NMail (localhost) with SMTP Tue, 28 Nov 2006 08:21:04 GMT\r\nRecieved: from niknak2 (2.2.2.2 [2.2.2.2])\r\n by NMail (localhost) with SMTP Tue, 27 Nov 2006 08:21:04 GMT\r\nRecieved: from niknak1 (1.1.1.1 [1.1.1.1])\r\n by NMail (localhost) with SMTP Tue, 26 Nov 2006 08:21:04 GMT\r\nMessage-ID: <001a01c7126e$22ecdf40$01d1a8c0@niknak>\r\nFrom: \"Luke\" <luke@localhost>";
+ public const string BasicParsing3 = "Received: from niknak3 (3.3.3.3 [3.3.3.3])\r\n by NMail (localhost) with SMTP Tue, 28 Nov 2006 08:21:04 GMT\r\nReceived: from niknak2 (2.2.2.2 [2.2.2.2])\r\n by NMail (localhost) with SMTP Tue, 27 Nov 2006 08:21:04 GMT\r\nReceived: from niknak1 (1.1.1.1 [1.1.1.1])\r\n by NMail (localhost) with SMTP Tue, 26 Nov 2006 08:21:04 GMT\r\nMessage-ID: <001a01c7126e$22ecdf40$01d1a8c0@niknak>\r\nFrom: \"Luke\" <luke@localhost>";
[Test]
public void BasicParsing() {
@@ -32,16 +32,16 @@
Assert.AreEqual("image/jpeg;\r\n name=\"image001.jpg\"", headers["Content-Type"], "BasicParsing1");
headers = new MessageHeaders(new ByteString(BasicParsing2, Encoding.ASCII));
- Assert.IsNotNull(headers["From"], "BasicParsing2: from not null");
- Assert.IsNotNull(headers["Subject"], "BasicParsing2: subject not null");
- Assert.IsTrue(headers.GetHeaders("From").Length == 1, "BasicParsing2: from length == 1");
- Assert.IsTrue(headers.GetHeaders("Subject").Length == 1, "BasicParsing2: subject length == 1");
- Assert.AreEqual("Testing 123", headers["Subject"], "BasicParsing2: subject");
+ Assert.IsNotNull(headers[MessageHeaders.FromHeader], "BasicParsing2: from not null");
+ Assert.IsNotNull(headers[MessageHeaders.SubjectHeader], "BasicParsing2: subject not null");
+ Assert.IsTrue(headers.GetHeaders(MessageHeaders.FromHeader).Length == 1, "BasicParsing2: from length == 1");
+ Assert.IsTrue(headers.GetHeaders(MessageHeaders.SubjectHeader).Length == 1, "BasicParsing2: subject length == 1");
+ Assert.AreEqual("Testing 123", headers[MessageHeaders.SubjectHeader], "BasicParsing2: subject");
headers = new MessageHeaders(new ByteString(BasicParsing3, Encoding.ASCII));
- Assert.IsNotNull(headers["Recieved"], "BasicParsing3: not null");
- Assert.IsTrue(headers.GetHeaders("Recieved").Length == 3, "BasicParsing3: length == 3");
- Assert.AreEqual("from niknak3 (3.3.3.3 [3.3.3.3])\r\n by NMail (localhost) with SMTP Tue, 28 Nov 2006 08:21:04 GMT", headers["Recieved"], "BasicParsing3");
+ Assert.IsNotNull(headers[MessageHeaders.ReceivedHeader], "BasicParsing3: not null");
+ Assert.IsTrue(headers.GetHeaders(MessageHeaders.ReceivedHeader).Length == 3, "BasicParsing3: length == 3");
+ Assert.AreEqual("from niknak3 (3.3.3.3 [3.3.3.3])\r\n by NMail (localhost) with SMTP Tue, 28 Nov 2006 08:21:04 GMT", headers[MessageHeaders.ReceivedHeader], "BasicParsing3");
}
#endregion
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-16 14:54:29
|
Revision: 221
http://svn.sourceforge.net/nmailserver/?rev=221&view=rev
Author: tmyroadctfig
Date: 2007-06-16 07:54:29 -0700 (Sat, 16 Jun 2007)
Log Message:
-----------
Work on user/group administration.
Modified Paths:
--------------
NMail/trunk/NMail.Administration.WinForms/ExceptionDialog.Designer.cs
NMail/trunk/NMail.Administration.WinForms/ExceptionDialog.cs
NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs
NMail/trunk/NMail.Administration.WinForms/MainForm.cs
NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs
NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj
NMail/trunk/NMail.Administration.WinForms/Resources/Connected.html
NMail/trunk/NMail.Icons/NMail.Icons.csproj
Added Paths:
-----------
NMail/trunk/NMail.Administration.WinForms/Groups/
NMail/trunk/NMail.Administration.WinForms/Groups/GroupManager.Designer.cs
NMail/trunk/NMail.Administration.WinForms/Groups/GroupManager.cs
NMail/trunk/NMail.Administration.WinForms/Groups/GroupManager.resx
NMail/trunk/NMail.Administration.WinForms/Resources/LGPL/edit_user.png
NMail/trunk/NMail.Administration.WinForms/Users/
NMail/trunk/NMail.Administration.WinForms/Users/UserManager.Designer.cs
NMail/trunk/NMail.Administration.WinForms/Users/UserManager.cs
NMail/trunk/NMail.Administration.WinForms/Users/UserManager.resx
NMail/trunk/NMail.Icons/Resources/16x16/actions/edit_group.png
NMail/trunk/NMail.Icons/Resources/16x16/actions/edit_user.png
NMail/trunk/NMail.Icons/Resources/22x22/actions/edit_user.png
Modified: NMail/trunk/NMail.Administration.WinForms/ExceptionDialog.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/ExceptionDialog.Designer.cs 2007-06-11 05:34:02 UTC (rev 220)
+++ NMail/trunk/NMail.Administration.WinForms/ExceptionDialog.Designer.cs 2007-06-16 14:54:29 UTC (rev 221)
@@ -27,6 +27,7 @@
this.exceptionDetailBox = new System.Windows.Forms.TextBox();
this.errorIcon = new System.Windows.Forms.PictureBox();
this.exitButton = new System.Windows.Forms.Button();
+ this.reportButton = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize) (this.errorIcon)).BeginInit();
this.SuspendLayout();
//
@@ -66,10 +67,21 @@
this.exitButton.Name = "exitButton";
this.exitButton.Size = new System.Drawing.Size(75, 23);
this.exitButton.TabIndex = 3;
- this.exitButton.Text = "Exit";
+ this.exitButton.Text = "Quit";
this.exitButton.UseVisualStyleBackColor = true;
this.exitButton.Click += new System.EventHandler(this.exitButton_Click);
//
+ // reportButton
+ //
+ this.reportButton.Location = new System.Drawing.Point(140, 125);
+ this.reportButton.Name = "reportButton";
+ this.reportButton.Size = new System.Drawing.Size(75, 23);
+ this.reportButton.TabIndex = 4;
+ this.reportButton.Text = "Send Report";
+ this.reportButton.UseVisualStyleBackColor = true;
+ this.reportButton.Visible = false;
+ this.reportButton.Click += new System.EventHandler(this.reportButton_Click);
+ //
// ExceptionDialog
//
this.AcceptButton = this.okButton;
@@ -77,6 +89,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.okButton;
this.ClientSize = new System.Drawing.Size(391, 159);
+ this.Controls.Add(this.reportButton);
this.Controls.Add(this.exitButton);
this.Controls.Add(this.errorIcon);
this.Controls.Add(this.exceptionDetailBox);
@@ -100,5 +113,6 @@
private System.Windows.Forms.TextBox exceptionDetailBox;
private System.Windows.Forms.PictureBox errorIcon;
private System.Windows.Forms.Button exitButton;
+ private System.Windows.Forms.Button reportButton;
}
}
\ No newline at end of file
Modified: NMail/trunk/NMail.Administration.WinForms/ExceptionDialog.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/ExceptionDialog.cs 2007-06-11 05:34:02 UTC (rev 220)
+++ NMail/trunk/NMail.Administration.WinForms/ExceptionDialog.cs 2007-06-16 14:54:29 UTC (rev 221)
@@ -20,6 +20,7 @@
using System.ComponentModel;
using System.Data;
using System.Drawing;
+using System.Net.Mail;
using System.Text;
using System.Windows.Forms;
@@ -41,11 +42,37 @@
/// </summary>
/// <param name="ex">The exception to display.</param>
public void SetException(Exception ex) {
+ this.exceptionDetailBox.Text = GetExceptionMessage(ex);
+ }
+
+ private void okButton_Click(object sender, EventArgs e) {
+ this.Close();
+ }
+
+ private void exitButton_Click(object sender, EventArgs e) {
+ Application.Exit();
+ }
+
+ private void reportButton_Click(object sender, EventArgs e) {
+ //MailMessage message = new MailMessage("tmy...@us...", "tmy...@us...");
+ //message.Subject = "[NMail Admin Exception]";
+ //message.Body = this.exceptionDetailBox.Text;
+
+ //SmtpClient client = new SmtpClient("mail.sourceforge.net");
+ //client.Send(message);
+ }
+
+ /// <summary>
+ /// Gets the exception as a string.
+ /// </summary>
+ /// <param name="ex">The exception to process.</param>
+ /// <returns>The string.</returns>
+ public static string GetExceptionMessage(Exception ex) {
Exception inner = ex.InnerException;
StringBuilder message = new StringBuilder();
message.Append(string.Format(
- "Unhandled exception:\r\n" +
+ "Unhandled exception:\r\n" +
"{0}\r\n" +
"----------------------------------------\r\n" +
"{1}",
@@ -65,15 +92,7 @@
inner = inner.InnerException;
}
- this.exceptionDetailBox.Text = message.ToString();
+ return message.ToString();
}
-
- private void okButton_Click(object sender, EventArgs e) {
- this.Close();
- }
-
- private void exitButton_Click(object sender, EventArgs e) {
- Application.Exit();
- }
}
}
\ No newline at end of file
Added: NMail/trunk/NMail.Administration.WinForms/Groups/GroupManager.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Groups/GroupManager.Designer.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Groups/GroupManager.Designer.cs 2007-06-16 14:54:29 UTC (rev 221)
@@ -0,0 +1,132 @@
+namespace NMail.Administration.WinForms.Groups {
+ partial class GroupManager {
+ /// <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.components = new System.ComponentModel.Container();
+ this.bottomPanel = new System.Windows.Forms.Panel();
+ this.refreshButton = new System.Windows.Forms.Button();
+ this.groupsSplitContainer = new System.Windows.Forms.SplitContainer();
+ this.groupListView = new System.Windows.Forms.ListView();
+ this.groupIdColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.groupNameColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.imageList = new System.Windows.Forms.ImageList(this.components);
+ this.bottomPanel.SuspendLayout();
+ this.groupsSplitContainer.Panel1.SuspendLayout();
+ this.groupsSplitContainer.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // bottomPanel
+ //
+ this.bottomPanel.Controls.Add(this.refreshButton);
+ this.bottomPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.bottomPanel.Location = new System.Drawing.Point(0, 290);
+ this.bottomPanel.Name = "bottomPanel";
+ this.bottomPanel.Size = new System.Drawing.Size(416, 40);
+ this.bottomPanel.TabIndex = 1;
+ //
+ // refreshButton
+ //
+ this.refreshButton.Location = new System.Drawing.Point(4, 7);
+ this.refreshButton.Name = "refreshButton";
+ this.refreshButton.Size = new System.Drawing.Size(75, 23);
+ this.refreshButton.TabIndex = 0;
+ this.refreshButton.Text = "Refresh";
+ this.refreshButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
+ this.refreshButton.UseVisualStyleBackColor = true;
+ this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
+ //
+ // groupsSplitContainer
+ //
+ this.groupsSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupsSplitContainer.Location = new System.Drawing.Point(0, 0);
+ this.groupsSplitContainer.Name = "groupsSplitContainer";
+ this.groupsSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
+ //
+ // groupsSplitContainer.Panel1
+ //
+ this.groupsSplitContainer.Panel1.Controls.Add(this.groupListView);
+ this.groupsSplitContainer.Size = new System.Drawing.Size(416, 290);
+ this.groupsSplitContainer.SplitterDistance = 139;
+ this.groupsSplitContainer.TabIndex = 0;
+ //
+ // groupListView
+ //
+ this.groupListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.groupIdColumnHeader,
+ this.groupNameColumnHeader});
+ this.groupListView.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupListView.FullRowSelect = true;
+ this.groupListView.GridLines = true;
+ this.groupListView.HideSelection = false;
+ this.groupListView.Location = new System.Drawing.Point(0, 0);
+ this.groupListView.MultiSelect = false;
+ this.groupListView.Name = "groupListView";
+ this.groupListView.Size = new System.Drawing.Size(416, 139);
+ this.groupListView.SmallImageList = this.imageList;
+ this.groupListView.TabIndex = 0;
+ this.groupListView.UseCompatibleStateImageBehavior = false;
+ this.groupListView.View = System.Windows.Forms.View.Details;
+ //
+ // groupIdColumnHeader
+ //
+ this.groupIdColumnHeader.Text = "Group Id";
+ this.groupIdColumnHeader.Width = 59;
+ //
+ // groupNameColumnHeader
+ //
+ this.groupNameColumnHeader.Text = "Group Name";
+ this.groupNameColumnHeader.Width = 93;
+ //
+ // imageList
+ //
+ this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+ this.imageList.ImageSize = new System.Drawing.Size(16, 16);
+ this.imageList.TransparentColor = System.Drawing.Color.Transparent;
+ //
+ // GroupManager
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.groupsSplitContainer);
+ this.Controls.Add(this.bottomPanel);
+ this.Name = "GroupManager";
+ this.Size = new System.Drawing.Size(416, 330);
+ this.bottomPanel.ResumeLayout(false);
+ this.groupsSplitContainer.Panel1.ResumeLayout(false);
+ this.groupsSplitContainer.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Panel bottomPanel;
+ private System.Windows.Forms.Button refreshButton;
+ private System.Windows.Forms.SplitContainer groupsSplitContainer;
+ private System.Windows.Forms.ListView groupListView;
+ private System.Windows.Forms.ColumnHeader groupIdColumnHeader;
+ private System.Windows.Forms.ColumnHeader groupNameColumnHeader;
+ private System.Windows.Forms.ImageList imageList;
+ }
+}
Added: NMail/trunk/NMail.Administration.WinForms/Groups/GroupManager.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Groups/GroupManager.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Groups/GroupManager.cs 2007-06-16 14:54:29 UTC (rev 221)
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+
+using NMail.DataTypes.LocalStore;
+using NMail.Icons;
+
+namespace NMail.Administration.WinForms.Groups {
+ public partial class GroupManager : UserControl {
+
+ private MainForm mainForm;
+
+ public GroupManager(MainForm mainForm) {
+ InitializeComponent();
+
+ this.mainForm = mainForm;
+
+ this.imageList.Images.Add(IconHelper.GetImage("edit_group", "actions", IconSize.s16x16));
+ this.refreshButton.Image = IconHelper.GetImage("recur", "actions", IconSize.s16x16);
+ }
+
+ private void refreshButton_Click(object sender, EventArgs e) {
+ try {
+ // Get a list of users and groups
+ ILocalStore localStore = this.mainForm.RemoteAdministration.NMailServer.LocalStore;
+ IList<LocalStoreGroup> groups = localStore.GetGroups(this.mainForm.AuthenticationToken);
+
+ this.groupListView.Items.Clear();
+
+ // Add them to the list view
+ foreach (LocalStoreGroup group in groups) {
+ ListViewItem item = new GroupListViewItem(group);
+ this.groupListView.Items.Add(item);
+ }
+
+ } catch (Exception ex) {
+ // Something bad :(
+ Program.ShowExceptionDialog(ex);
+ }
+ }
+ }
+
+ /// <summary>
+ /// A list view item for displaying group.
+ /// </summary>
+ public class GroupListViewItem : ListViewItem {
+
+ public GroupListViewItem(LocalStoreGroup group) {
+ this.group = group;
+
+ this.SubItems[0] = new ListViewSubItem(this, group.GroupId.ToString());
+ this.SubItems.Add(new ListViewSubItem(this, group.Name));
+
+ this.ImageIndex = 0;
+ }
+
+ private LocalStoreGroup group;
+
+ public LocalStoreGroup LocalStorejGroup {
+ get { return group; }
+ }
+ }
+}
Added: NMail/trunk/NMail.Administration.WinForms/Groups/GroupManager.resx
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Groups/GroupManager.resx (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Groups/GroupManager.resx 2007-06-16 14:54:29 UTC (rev 221)
@@ -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>
+ <metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+</root>
\ No newline at end of file
Modified: NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs 2007-06-11 05:34:02 UTC (rev 220)
+++ NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs 2007-06-16 14:54:29 UTC (rev 221)
@@ -30,7 +30,9 @@
using NMail.Icons;
namespace NMail.Administration.WinForms.MailDomain {
-
+ /// <summary>
+ /// A control for managing mail domains.
+ /// </summary>
public partial class MailDomainManager : UserControl {
public MailDomainManager(MainForm mainForm) {
InitializeComponent();
Modified: NMail/trunk/NMail.Administration.WinForms/MainForm.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/MainForm.cs 2007-06-11 05:34:02 UTC (rev 220)
+++ NMail/trunk/NMail.Administration.WinForms/MainForm.cs 2007-06-16 14:54:29 UTC (rev 221)
@@ -39,22 +39,32 @@
using NMail.Server;
namespace NMail.Administration.WinForms {
+ /// <summary>
+ /// The main form for the administration tool.
+ /// </summary>
public partial class MainForm : Form {
/// <summary>
/// Logging support for this class
/// </summary>
private static ILog log = LogManager.GetLogger(typeof(MainForm));
+ /// <summary>
+ /// Creates a new instance of the main form.
+ /// </summary>
public MainForm() {
+ // Init this form
InitializeComponent();
InitialiseRemoting();
+ // Init each control
InitialiseStatusBrowser();
InitialiseManagementTree();
InitialiseServicesViewer();
InitialiseMailDomainManager();
InitialiseSpoolManager();
+ InitialiseUserManager();
+ InitialiseGroupManager();
this.connectionStatusLbl.Image = IconHelper.GetImage("connect_no", "actions", IconSize.s16x16);
this.connectMenuItem.Image = IconHelper.GetImage("connect_no", "actions", IconSize.s16x16);
@@ -170,6 +180,8 @@
}
private void connectMenuItem_Click(object sender, EventArgs e) {
+
+ throw new Exception("Testing 123");
// Prompt if already connected
if (this.remoteAdministration != null) {
DialogResult result = MessageBox.Show(
@@ -314,6 +326,10 @@
this.ShowUsersControl();
e.Cancel = true;
+ } else if (urlString == "groups:") {
+ this.ShowGroupsControl();
+ e.Cancel = true;
+
} else if (urlString == "folders:") {
this.ShowFoldersControl();
e.Cancel = true;
@@ -470,9 +486,88 @@
}
#endregion
+ #region User Manager
+ /// <summary>
+ /// The user manager.
+ /// </summary>
+ Users.UserManager userManager;
+
+ DockContent userManagerDock;
+
+ protected void InitialiseUserManager() {
+ this.userManager = new Users.UserManager(this);
+ this.userManager.Dock = DockStyle.Fill;
+
+ userManagerDock = new DockContent();
+ userManagerDock.Controls.Add(this.userManager);
+ userManagerDock.Text = "Users";
+ userManagerDock.DockPanel = this.dockPanel;
+ userManagerDock.DockState = DockState.Hidden;
+ userManagerDock.Icon = IconHelper.GetIcon("edit_user", "actions", IconSize.s16x16);
+ userManagerDock.FormClosing += new FormClosingEventHandler(userManagerDock_FormClosing);
+ }
+
+ void userManagerDock_FormClosing(object sender, FormClosingEventArgs e) {
+ if (e.CloseReason == CloseReason.UserClosing) {
+ e.Cancel = true;
+
+ this.userManagerDock.DockState = DockState.Hidden;
+ }
+ }
+
public void ShowUsersControl() {
+ if (!Connected) {
+ ShowStatusBrowser();
+
+ } else {
+ this.userManagerDock.DockState = DockState.Document;
+ this.userManagerDock.DockHandler.DockTo(this.dockPanel.DockWindows[DockState.Document].NestedPanes[0], DockStyle.Fill, 0);
+ this.userManagerDock.DockHandler.Show();
+ }
}
+ #endregion
+ #region Group Manager
+ /// <summary>
+ /// The group manager.
+ /// </summary>
+ Groups.GroupManager groupManager;
+
+ DockContent groupManagerDock;
+
+ protected void InitialiseGroupManager() {
+ this.groupManager = new Groups.GroupManager(this);
+ this.groupManager.Dock = DockStyle.Fill;
+
+ groupManagerDock = new DockContent();
+ groupManagerDock.Controls.Add(this.groupManager);
+ groupManagerDock.Text = "Groups";
+ groupManagerDock.DockPanel = this.dockPanel;
+ groupManagerDock.DockState = DockState.Hidden;
+ groupManagerDock.Icon = IconHelper.GetIcon("edit_group", "actions", IconSize.s16x16);
+ groupManagerDock.FormClosing += new FormClosingEventHandler(groupManagerDock_FormClosing);
+ }
+
+ void groupManagerDock_FormClosing(object sender, FormClosingEventArgs e) {
+ if (e.CloseReason == CloseReason.UserClosing) {
+ e.Cancel = true;
+
+ this.groupManagerDock.DockState = DockState.Hidden;
+ }
+ }
+
+ public void ShowGroupsControl() {
+ if (!Connected) {
+ ShowStatusBrowser();
+
+ } else {
+ this.groupManagerDock.DockState = DockState.Document;
+ this.groupManagerDock.DockHandler.DockTo(this.dockPanel.DockWindows[DockState.Document].NestedPanes[0], DockStyle.Fill, 0);
+ this.groupManagerDock.DockHandler.Show();
+ }
+ }
+ #endregion
+
public void ShowFoldersControl() {
}
Modified: NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs 2007-06-11 05:34:02 UTC (rev 220)
+++ NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs 2007-06-16 14:54:29 UTC (rev 221)
@@ -42,6 +42,7 @@
this.imageList.Images.Add(IconHelper.GetImage("edit_group", "actions", IconSize.s22x22));
this.imageList.Images.Add(IconHelper.GetImage("folder", "actions", IconSize.s22x22));
this.imageList.Images.Add(IconHelper.GetImage("queue", "actions", IconSize.s22x22));
+ this.imageList.Images.Add(IconHelper.GetImage("edit_user", "actions", IconSize.s22x22));
this.nmailNode = new TreeNode("NMail", 0, 0);
this.treeView.Nodes.Add(this.nmailNode);
@@ -55,9 +56,12 @@
this.mailDomainNode = new TreeNode("Mail Domains", 2, 2);
this.nmailNode.Nodes.Add(this.mailDomainNode);
- this.usersNode = new TreeNode("Users", 3, 3);
+ this.usersNode = new TreeNode("Users", 6, 6);
this.nmailNode.Nodes.Add(this.usersNode);
+ this.groupsNode = new TreeNode("Groups", 3, 3);
+ this.nmailNode.Nodes.Add(this.groupsNode);
+
this.foldersNode = new TreeNode("Folders", 4, 4);
this.nmailNode.Nodes.Add(this.foldersNode);
@@ -76,6 +80,8 @@
TreeNode usersNode;
+ TreeNode groupsNode;
+
TreeNode foldersNode;
private void treeView_AfterSelect(object sender, TreeViewEventArgs e) {
@@ -94,6 +100,9 @@
} else if (e.Node == usersNode) {
this.mainForm.ShowUsersControl();
+ } else if (e.Node == groupsNode) {
+ this.mainForm.ShowGroupsControl();
+
} else if (e.Node == foldersNode) {
this.mainForm.ShowFoldersControl();
Modified: NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj 2007-06-11 05:34:02 UTC (rev 220)
+++ NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj 2007-06-16 14:54:29 UTC (rev 221)
@@ -67,6 +67,12 @@
<Compile Include="ExceptionDialog.Designer.cs">
<DependentUpon>ExceptionDialog.cs</DependentUpon>
</Compile>
+ <Compile Include="Groups\GroupManager.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="Groups\GroupManager.Designer.cs">
+ <DependentUpon>GroupManager.cs</DependentUpon>
+ </Compile>
<Compile Include="MailDomain\MailDomainEditor.cs">
<SubType>Form</SubType>
</Compile>
@@ -105,6 +111,10 @@
<SubType>Designer</SubType>
<DependentUpon>ExceptionDialog.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="Groups\GroupManager.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>GroupManager.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="MailDomain\MailDomainEditor.resx">
<SubType>Designer</SubType>
<DependentUpon>MailDomainEditor.cs</DependentUpon>
@@ -138,6 +148,10 @@
<SubType>Designer</SubType>
<DependentUpon>SpoolMessageViewer.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="Users\UserManager.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>UserManager.cs</DependentUpon>
+ </EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
@@ -169,6 +183,12 @@
<Compile Include="Spool\SmtpSpoolManager.Designer.cs">
<DependentUpon>SmtpSpoolManager.cs</DependentUpon>
</Compile>
+ <Compile Include="Users\UserManager.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="Users\UserManager.Designer.cs">
+ <DependentUpon>UserManager.cs</DependentUpon>
+ </Compile>
</ItemGroup>
<ItemGroup>
<Content Include="Resources\ConnectFailed.html">
@@ -186,6 +206,9 @@
<Content Include="Resources\LGPL\edit_group.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="Resources\LGPL\edit_user.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="Resources\LGPL\exec.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Modified: NMail/trunk/NMail.Administration.WinForms/Resources/Connected.html
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Resources/Connected.html 2007-06-11 05:34:02 UTC (rev 220)
+++ NMail/trunk/NMail.Administration.WinForms/Resources/Connected.html 2007-06-16 14:54:29 UTC (rev 221)
@@ -30,12 +30,18 @@
</a>
</p>
- <p>
+ <p>
<a href="users:">
- <img src="LGPL/edit_group.png"/> Manage users and groups.
+ <img src="LGPL/edit_user.png"/> Manage users.
</a>
</p>
+ <p>
+ <a href="groups:">
+ <img src="LGPL/edit_group.png"/> Manage groups.
+ </a>
+ </p>
+
<p>
<a href="folders:">
<img src="LGPL/folder.png"/> Manage folders.
Added: NMail/trunk/NMail.Administration.WinForms/Resources/LGPL/edit_user.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Administration.WinForms/Resources/LGPL/edit_user.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Administration.WinForms/Users/UserManager.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Users/UserManager.Designer.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Users/UserManager.Designer.cs 2007-06-16 14:54:29 UTC (rev 221)
@@ -0,0 +1,153 @@
+namespace NMail.Administration.WinForms.Users {
+ partial class UserManager {
+ /// <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.components = new System.ComponentModel.Container();
+ this.bottomPanel = new System.Windows.Forms.Panel();
+ this.refreshButton = new System.Windows.Forms.Button();
+ this.userSplitContainer = new System.Windows.Forms.SplitContainer();
+ this.userListView = new System.Windows.Forms.ListView();
+ this.userIdColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.usernameColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.warnQuotaColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.hardQuotaColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.userFolderIdColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.imageList = new System.Windows.Forms.ImageList(this.components);
+ this.bottomPanel.SuspendLayout();
+ this.userSplitContainer.Panel1.SuspendLayout();
+ this.userSplitContainer.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // bottomPanel
+ //
+ this.bottomPanel.Controls.Add(this.refreshButton);
+ this.bottomPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.bottomPanel.Location = new System.Drawing.Point(0, 305);
+ this.bottomPanel.Name = "bottomPanel";
+ this.bottomPanel.Size = new System.Drawing.Size(633, 40);
+ this.bottomPanel.TabIndex = 0;
+ //
+ // refreshButton
+ //
+ this.refreshButton.Location = new System.Drawing.Point(4, 7);
+ this.refreshButton.Name = "refreshButton";
+ this.refreshButton.Size = new System.Drawing.Size(75, 23);
+ this.refreshButton.TabIndex = 0;
+ this.refreshButton.Text = "Refresh";
+ this.refreshButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
+ this.refreshButton.UseVisualStyleBackColor = true;
+ this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
+ //
+ // userSplitContainer
+ //
+ this.userSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.userSplitContainer.Location = new System.Drawing.Point(0, 0);
+ this.userSplitContainer.Name = "userSplitContainer";
+ this.userSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
+ //
+ // userSplitContainer.Panel1
+ //
+ this.userSplitContainer.Panel1.Controls.Add(this.userListView);
+ this.userSplitContainer.Size = new System.Drawing.Size(633, 305);
+ this.userSplitContainer.SplitterDistance = 146;
+ this.userSplitContainer.TabIndex = 0;
+ //
+ // userListView
+ //
+ this.userListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.userIdColumnHeader,
+ this.usernameColumnHeader,
+ this.warnQuotaColumnHeader,
+ this.hardQuotaColumnHeader,
+ this.userFolderIdColumnHeader});
+ this.userListView.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.userListView.FullRowSelect = true;
+ this.userListView.GridLines = true;
+ this.userListView.HideSelection = false;
+ this.userListView.Location = new System.Drawing.Point(0, 0);
+ this.userListView.MultiSelect = false;
+ this.userListView.Name = "userListView";
+ this.userListView.Size = new System.Drawing.Size(633, 146);
+ this.userListView.SmallImageList = this.imageList;
+ this.userListView.TabIndex = 0;
+ this.userListView.UseCompatibleStateImageBehavior = false;
+ this.userListView.View = System.Windows.Forms.View.Details;
+ //
+ // userIdColumnHeader
+ //
+ this.userIdColumnHeader.Text = "User Id";
+ this.userIdColumnHeader.Width = 44;
+ //
+ // usernameColumnHeader
+ //
+ this.usernameColumnHeader.Text = "Username";
+ this.usernameColumnHeader.Width = 106;
+ //
+ // warnQuotaColumnHeader
+ //
+ this.warnQuotaColumnHeader.Text = "Warning Quota";
+ //
+ // hardQuotaColumnHeader
+ //
+ this.hardQuotaColumnHeader.Text = "Hard Quota";
+ //
+ // userFolderIdColumnHeader
+ //
+ this.userFolderIdColumnHeader.Text = "User Folder Id";
+ //
+ // imageList
+ //
+ this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+ this.imageList.ImageSize = new System.Drawing.Size(16, 16);
+ this.imageList.TransparentColor = System.Drawing.Color.Transparent;
+ //
+ // UserManager
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.userSplitContainer);
+ this.Controls.Add(this.bottomPanel);
+ this.Name = "UserManager";
+ this.Size = new System.Drawing.Size(633, 345);
+ this.bottomPanel.ResumeLayout(false);
+ this.userSplitContainer.Panel1.ResumeLayout(false);
+ this.userSplitContainer.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Panel bottomPanel;
+ private System.Windows.Forms.SplitContainer userSplitContainer;
+ private System.Windows.Forms.ListView userListView;
+ private System.Windows.Forms.Button refreshButton;
+ private System.Windows.Forms.ColumnHeader userIdColumnHeader;
+ private System.Windows.Forms.ColumnHeader usernameColumnHeader;
+ private System.Windows.Forms.ColumnHeader warnQuotaColumnHeader;
+ private System.Windows.Forms.ColumnHeader hardQuotaColumnHeader;
+ private System.Windows.Forms.ColumnHeader userFolderIdColumnHeader;
+ private System.Windows.Forms.ImageList imageList;
+ }
+}
Added: NMail/trunk/NMail.Administration.WinForms/Users/UserManager.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Users/UserManager.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Users/UserManager.cs 2007-06-16 14:54:29 UTC (rev 221)
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2004-2007 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.Windows.Forms;
+
+using NMail.DataTypes.LocalStore;
+using NMail.Icons;
+
+namespace NMail.Administration.WinForms.Users {
+ /// <summary>
+ /// A control for managing users and groups.
+ /// </summary>
+ public partial class UserManager : UserControl {
+
+ private MainForm mainForm;
+
+ public UserManager(MainForm mainForm) {
+ InitializeComponent();
+
+ this.mainForm = mainForm;
+
+ this.imageList.Images.Add(IconHelper.GetImage("edit_user", "actions", IconSize.s16x16));
+ this.refreshButton.Image = IconHelper.GetImage("recur", "actions", IconSize.s16x16);
+ }
+
+ private void refreshButton_Click(object sender, EventArgs e) {
+ try {
+ // Get a list of users and groups
+ ILocalStore localStore = this.mainForm.RemoteAdministration.NMailServer.LocalStore;
+ IList<LocalStoreUser> users = localStore.GetUsers(this.mainForm.AuthenticationToken);
+
+ this.userListView.Items.Clear();
+
+ // Add them to the list view
+ foreach (LocalStoreUser user in users) {
+ ListViewItem item = new UserListViewItem(user);
+ this.userListView.Items.Add(item);
+ }
+
+ } catch (Exception ex) {
+ // Something bad :(
+ Program.ShowExceptionDialog(ex);
+ }
+ }
+ }
+
+ /// <summary>
+ /// A list view item for displaying users.
+ /// </summary>
+ public class UserListViewItem : ListViewItem {
+
+ public UserListViewItem(LocalStoreUser user) {
+ this.user = user;
+
+ this.SubItems[0] = new ListViewSubItem(this, user.UserId.ToString());
+ this.SubItems.Add(new ListViewSubItem(this, user.Username));
+ this.SubItems.Add(new ListViewSubItem(this, user.QuotaWarnLimit.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, user.QuotaHardLimit.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, user.UserFolderId.ToString()));
+
+ this.ImageIndex = 0;
+ }
+
+ private LocalStoreUser user;
+
+ public LocalStoreUser User {
+ get { return user; }
+ }
+ }
+}
Added: NMail/trunk/NMail.Administration.WinForms/Users/UserManager.resx
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Users/UserManager.resx (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Users/UserManager.resx 2007-06-16 14:54:29 UTC (rev 221)
@@ -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>
+ <metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+</root>
\ No newline at end of file
Modified: NMail/trunk/NMail.Icons/NMail.Icons.csproj
===================================================================
--- NMail/trunk/NMail.Icons/NMail.Icons.csproj 2007-06-11 05:34:02 UTC (rev 220)
+++ NMail/trunk/NMail.Icons/NMail.Icons.csproj 2007-06-16 14:54:29 UTC (rev 221)
@@ -61,6 +61,8 @@
<EmbeddedResource Include="Resources\16x16\actions\edit.png" />
<EmbeddedResource Include="Resources\16x16\actions\recur.png" />
<EmbeddedResource Include="Resources\16x16\actions\mail_generic.png" />
+ <EmbeddedResource Include="Resources\16x16\actions\edit_user.png" />
+ <EmbeddedResource Include="Resources\22x22\actions\edit_user.png" />
<Content Include="Resources\LGPL.txt" />
</ItemGroup>
<ItemGroup>
Added: NMail/trunk/NMail.Icons/Resources/16x16/actions/edit_group.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Icons/Resources/16x16/actions/edit_group.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Icons/Resources/16x16/actions/edit_user.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Icons/Resources/16x16/actions/edit_user.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Icons/Resources/22x22/actions/edit_user.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Icons/Resources/22x22/actions/edit_user.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-11 05:34:02
|
Revision: 220
http://svn.sourceforge.net/nmailserver/?rev=220&view=rev
Author: tmyroadctfig
Date: 2007-06-10 22:34:02 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
Work on spool manager.
Modified Paths:
--------------
NMail/trunk/NMail/DataTypes/Message/Envelope.cs
NMail/trunk/NMail/DataTypes/Spool/SpoolEnvelope.cs
NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainEditor.cs
NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs
NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs
NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs
NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj
NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.Designer.cs
NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.cs
Added Paths:
-----------
NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.Designer.cs
NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.cs
NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.resx
Removed Paths:
-------------
NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.Designer.cs
NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.cs
Modified: NMail/trunk/NMail/DataTypes/Message/Envelope.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Message/Envelope.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail/DataTypes/Message/Envelope.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -17,6 +17,7 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Text;
using NMail.Helper;
@@ -94,6 +95,8 @@
/// <summary>
/// Extracted from the Message-Id header.
/// </summary>
+ [Category("Envelope")]
+ [DisplayName("Message Id")]
public string MessageId {
get {
return this.messageId;
@@ -108,6 +111,7 @@
/// <summary>
/// The value extracted from the From header field.
/// </summary>
+ [Category("Envelope")]
public string From {
get {
return this.from;
@@ -122,6 +126,7 @@
/// <summary>
/// The value extracted from the Sender header field.
/// </summary>
+ [Category("Envelope")]
public string Sender {
get {
return this.sender;
@@ -136,6 +141,7 @@
/// <summary>
/// The value extracted from the To header field.
/// </summary>
+ [Category("Envelope")]
public string To {
get {
return this.to;
@@ -151,6 +157,8 @@
/// <summary>
/// The value extracted from the In-Reply-To header field.
/// </summary>
+ [Category("Envelope")]
+ [DisplayName("In Reply To")]
public string InReplyTo {
get {
return this.inReplyTo;
@@ -166,6 +174,8 @@
/// <summary>
/// The value extracted from the Reply-To header field.
/// </summary>
+ [Category("Envelope")]
+ [DisplayName("Reply To")]
public string ReplyTo {
get {
return this.replyTo;
@@ -181,6 +191,7 @@
/// <summary>
/// The value extracted from the Bcc header field.
/// </summary>
+ [Category("Envelope")]
public string Bcc {
get {
return this.bcc;
@@ -196,6 +207,7 @@
/// <summary>
/// The value extracted from the Cc header field.
/// </summary>
+ [Category("Envelope")]
public string Cc {
get {
return this.cc;
@@ -211,6 +223,7 @@
/// <summary>
/// The value extracted from the Subject header field.
/// </summary>
+ [Category("Envelope")]
public string Subject {
get {
return this.subject;
@@ -226,6 +239,7 @@
/// <summary>
/// The value extracted from the Date header field.
/// </summary>
+ [Category("Envelope")]
public string Date {
get {
return this.date;
Modified: NMail/trunk/NMail/DataTypes/Spool/SpoolEnvelope.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Spool/SpoolEnvelope.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail/DataTypes/Spool/SpoolEnvelope.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -17,6 +17,7 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Net;
using System.Text;
@@ -55,6 +56,8 @@
/// The Id of this message in the spool.
/// </summary>
/// <remarks>This is different to the Id stored in the message headers.</remarks>
+ [Category("Spool Details")]
+ [DisplayName("Spool Message Id")]
public Guid SpoolMessageId {
get {
return this.messageId;
@@ -69,6 +72,7 @@
/// <summary>
/// True if the message has been filtered.
/// </summary>
+ [Category("Spool Details")]
public bool Filtered {
get {
return this.filtered;
@@ -83,6 +87,8 @@
/// <summary>
/// True if the message is in the progress of being delivered or filtered.
/// </summary>
+ [Category("Spool Details")]
+ [DisplayName("Filtering In Progress")]
public bool InProgress {
get { return inProgress; }
set { inProgress = value; }
@@ -93,6 +99,8 @@
/// <summary>
/// The address that sent this message.
/// </summary>
+ [Category("Spool Details")]
+ [DisplayName("Source Address")]
public IPAddress SourceAddress {
get { return sourceAddress; }
set { sourceAddress = value; }
@@ -103,6 +111,8 @@
/// <summary>
/// The reported host.
/// </summary>
+ [Category("Spool Details")]
+ [DisplayName("Reported Host")]
public Host ReportedHost {
get { return reportedHost; }
set { reportedHost = value; }
@@ -113,6 +123,8 @@
/// <summary>
/// The email address given as the sender during SMTP negotiations.
/// </summary>
+ [Category("Spool Details")]
+ [DisplayName("SMTP Sender")]
public EmailAddress SmtpSender {
get { return smtpSender; }
set { smtpSender = value; }
@@ -123,6 +135,7 @@
/// <summary>
/// The recipients of this message still awaiting delivery.
/// </summary>
+ [Browsable(false)]
public IList<SmtpMessageRecipient> Recipients {
get {
return this.recipients;
Modified: NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainEditor.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainEditor.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainEditor.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -25,6 +25,8 @@
using WeifenLuo.WinFormsUI.Docking;
+using NMail.Icons;
+
namespace NMail.Administration.WinForms.MailDomain {
/// <summary>
/// A simple editor for mail domains.
@@ -34,6 +36,8 @@
InitializeComponent();
this.MailDomain = new NMail.DataTypes.LocalStore.MailDomain();
+
+ this.Icon = IconHelper.GetIcon("server", "actions", IconSize.s16x16);
}
/// <summary>
Modified: NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -52,6 +52,7 @@
this.mailDomainsListView.GridLines = true;
this.mailDomainsListView.HideSelection = false;
this.mailDomainsListView.Location = new System.Drawing.Point(0, 0);
+ this.mailDomainsListView.MultiSelect = false;
this.mailDomainsListView.Name = "mailDomainsListView";
this.mailDomainsListView.Size = new System.Drawing.Size(620, 369);
this.mailDomainsListView.SmallImageList = this.imageList;
Modified: NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -93,7 +93,6 @@
MailDomainEditor editor = new MailDomainEditor();
editor.TabText = "Add Mail Domain";
editor.OkButtonText = "Add";
- editor.Icon = IconHelper.GetIcon("server", "actions", IconSize.s16x16);
this.mainForm.DockFloat(editor, new Size(320, 440));
// Add a handler for the editor's closing event
@@ -118,10 +117,8 @@
if (this.clickedItem != null) {
// Create a new editor and display it
MailDomainEditor editor = new MailDomainEditor();
- editor.Dock = DockStyle.Fill;
editor.TabText = "Edit Mail Domain";
editor.OkButtonText = "Update";
- editor.Icon = IconHelper.GetIcon("server", "actions", IconSize.s16x16);
editor.MailDomain = this.clickedItem.MailDomain;
this.mainForm.DockFloat(editor, new Size(320, 440));
Modified: NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/ManagementTree/ManagementTree.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -85,8 +85,8 @@
} else if (e.Node == servicesNode) {
this.mainForm.ShowServicesControl();
- } else if (e.Node == servicesNode) {
- this.mainForm.ShowServicesControl();
+ } else if (e.Node == spoolNode) {
+ this.mainForm.ShowSpoolControl();
} else if (e.Node == mailDomainNode) {
this.mainForm.ShowMailDomainControl();
Modified: NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj 2007-06-11 05:34:02 UTC (rev 220)
@@ -134,6 +134,10 @@
<SubType>Designer</SubType>
<DependentUpon>SmtpSpoolManager.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="Spool\SpoolMessageViewer.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>SpoolMessageViewer.cs</DependentUpon>
+ </EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
@@ -153,11 +157,11 @@
<Compile Include="Services\ServicesViewer.Designer.cs">
<DependentUpon>ServicesViewer.cs</DependentUpon>
</Compile>
- <Compile Include="Spool\SmtpMessageRecipientViewer.cs">
+ <Compile Include="Spool\SpoolMessageViewer.cs">
<SubType>Form</SubType>
</Compile>
- <Compile Include="Spool\SmtpMessageRecipientViewer.Designer.cs">
- <DependentUpon>SmtpMessageRecipientViewer.cs</DependentUpon>
+ <Compile Include="Spool\SpoolMessageViewer.Designer.cs">
+ <DependentUpon>SpoolMessageViewer.cs</DependentUpon>
</Compile>
<Compile Include="Spool\SmtpSpoolManager.cs">
<SubType>UserControl</SubType>
Modified: NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.Designer.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.Designer.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -53,6 +53,7 @@
this.servicesListView.FullRowSelect = true;
this.servicesListView.GridLines = true;
this.servicesListView.Location = new System.Drawing.Point(0, 0);
+ this.servicesListView.MultiSelect = false;
this.servicesListView.Name = "servicesListView";
this.servicesListView.Size = new System.Drawing.Size(570, 384);
this.servicesListView.SmallImageList = this.imageList;
@@ -94,38 +95,38 @@
this.toolStripSeparator1,
this.refreshMenuItem});
this.servicesContextMenu.Name = "servicesContextMenu";
- this.servicesContextMenu.Size = new System.Drawing.Size(153, 120);
+ this.servicesContextMenu.Size = new System.Drawing.Size(124, 98);
//
// startMenuItem
//
this.startMenuItem.Name = "startMenuItem";
- this.startMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.startMenuItem.Size = new System.Drawing.Size(123, 22);
this.startMenuItem.Text = "Start";
this.startMenuItem.Click += new System.EventHandler(this.startMenuItem_Click);
//
// stopMenuItem
//
this.stopMenuItem.Name = "stopMenuItem";
- this.stopMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.stopMenuItem.Size = new System.Drawing.Size(123, 22);
this.stopMenuItem.Text = "Stop";
this.stopMenuItem.Click += new System.EventHandler(this.stopMenuItem_Click);
//
// restartMenuItem
//
this.restartMenuItem.Name = "restartMenuItem";
- this.restartMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.restartMenuItem.Size = new System.Drawing.Size(123, 22);
this.restartMenuItem.Text = "Restart";
this.restartMenuItem.Click += new System.EventHandler(this.restartMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
- this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6);
+ this.toolStripSeparator1.Size = new System.Drawing.Size(120, 6);
//
// refreshMenuItem
//
this.refreshMenuItem.Name = "refreshMenuItem";
- this.refreshMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.refreshMenuItem.Size = new System.Drawing.Size(123, 22);
this.refreshMenuItem.Text = "Refresh";
this.refreshMenuItem.Click += new System.EventHandler(this.refreshButton_Click);
//
Deleted: NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.Designer.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.Designer.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -1,32 +0,0 @@
-namespace NMail.Administration.WinForms.Spool {
- partial class SmtpMessageRecipientViewer {
- /// <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() {
- components = new System.ComponentModel.Container();
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- }
-
- #endregion
- }
-}
Deleted: NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Text;
-using System.Windows.Forms;
-
-using WeifenLuo.WinFormsUI.Docking;
-
-namespace NMail.Administration.WinForms.Spool {
- public partial class SmtpMessageRecipientViewer : DockContent {
- public SmtpMessageRecipientViewer() {
- InitializeComponent();
- }
- }
-}
Modified: NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.cs 2007-06-11 04:42:39 UTC (rev 219)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -115,31 +115,10 @@
}
private void ViewEnvelopeRecipients(SpoolEnvelope envelope) {
- //// Create a new editor and display it
- //MailDomainEditor editor = new MailDomainEditor();
- //editor.Dock = DockStyle.Fill;
- //editor.TabText = "Edit Mail Domain";
- //editor.OkButtonText = "Update";
- //editor.Icon = IconHelper.GetIcon("server", "actions", IconSize.s16x16);
- //editor.MailDomain = this.clickedItem.MailDomain;
- //this.mainForm.DockFloat(editor, new Size(320, 440));
-
- //// Add a handler for the editor's closing event
- //editor.FormClosing += delegate(object s, FormClosingEventArgs fea) {
-
- // if (editor.DialogResult == DialogResult.OK) {
- // // Attempt to add the mail domain
- // try {
- // NMail.Authentication.IAuthenticationToken authToken = this.mainForm.AuthenticationToken;
- // this.mainForm.RemoteAdministration.NMailServer.LocalStore.UpdateMailDomain(authToken, editor.MailDomain);
- // } catch (Exception ex) {
- // Program.ShowExceptionDialog(ex);
- // }
-
- // // Update the list of mail domains
- // refreshButton_Click(this, new EventArgs());
- // }
- //};
+ // Create a new editor and display it
+ SpoolMessageViewer viewer = new SpoolMessageViewer();
+ viewer.Envelope = envelope;
+ this.mainForm.DockFloat(viewer, new Size(600, 400));
}
private void deleteMenuItem_Click(object sender, EventArgs e) {
Added: NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.Designer.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.Designer.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -0,0 +1,176 @@
+namespace NMail.Administration.WinForms.Spool {
+ partial class SpoolMessageViewer {
+ /// <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.bottomPanel = new System.Windows.Forms.Panel();
+ this.okButton = new System.Windows.Forms.Button();
+ this.mainSplitContainer = new System.Windows.Forms.SplitContainer();
+ this.messageProperties = new System.Windows.Forms.PropertyGrid();
+ this.recipientsListView = new System.Windows.Forms.ListView();
+ this.recipientIdColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.addressColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.mailBoxColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.hostColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.deliveryAttemptsColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.inProgressColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.nextAttemptColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.bottomPanel.SuspendLayout();
+ this.mainSplitContainer.Panel1.SuspendLayout();
+ this.mainSplitContainer.Panel2.SuspendLayout();
+ this.mainSplitContainer.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // bottomPanel
+ //
+ this.bottomPanel.Controls.Add(this.okButton);
+ this.bottomPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.bottomPanel.Location = new System.Drawing.Point(0, 348);
+ this.bottomPanel.Name = "bottomPanel";
+ this.bottomPanel.Size = new System.Drawing.Size(733, 41);
+ this.bottomPanel.TabIndex = 0;
+ //
+ // okButton
+ //
+ this.okButton.Location = new System.Drawing.Point(13, 7);
+ this.okButton.Name = "okButton";
+ this.okButton.Size = new System.Drawing.Size(75, 23);
+ this.okButton.TabIndex = 0;
+ this.okButton.Text = "Ok";
+ this.okButton.UseVisualStyleBackColor = true;
+ this.okButton.Click += new System.EventHandler(this.okButton_Click);
+ //
+ // mainSplitContainer
+ //
+ this.mainSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.mainSplitContainer.Location = new System.Drawing.Point(0, 0);
+ this.mainSplitContainer.Name = "mainSplitContainer";
+ //
+ // mainSplitContainer.Panel1
+ //
+ this.mainSplitContainer.Panel1.Controls.Add(this.messageProperties);
+ //
+ // mainSplitContainer.Panel2
+ //
+ this.mainSplitContainer.Panel2.Controls.Add(this.recipientsListView);
+ this.mainSplitContainer.Size = new System.Drawing.Size(733, 348);
+ this.mainSplitContainer.SplitterDistance = 213;
+ this.mainSplitContainer.TabIndex = 1;
+ //
+ // messageProperties
+ //
+ this.messageProperties.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.messageProperties.HelpVisible = false;
+ this.messageProperties.Location = new System.Drawing.Point(0, 0);
+ this.messageProperties.Name = "messageProperties";
+ this.messageProperties.Size = new System.Drawing.Size(213, 348);
+ this.messageProperties.TabIndex = 0;
+ //
+ // recipientsListView
+ //
+ this.recipientsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.recipientIdColumnHeader,
+ this.addressColumnHeader,
+ this.mailBoxColumnHeader,
+ this.hostColumnHeader,
+ this.deliveryAttemptsColumnHeader,
+ this.inProgressColumnHeader,
+ this.nextAttemptColumnHeader});
+ this.recipientsListView.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.recipientsListView.FullRowSelect = true;
+ this.recipientsListView.GridLines = true;
+ this.recipientsListView.HideSelection = false;
+ this.recipientsListView.Location = new System.Drawing.Point(0, 0);
+ this.recipientsListView.MultiSelect = false;
+ this.recipientsListView.Name = "recipientsListView";
+ this.recipientsListView.Size = new System.Drawing.Size(516, 348);
+ this.recipientsListView.TabIndex = 0;
+ this.recipientsListView.UseCompatibleStateImageBehavior = false;
+ this.recipientsListView.View = System.Windows.Forms.View.Details;
+ //
+ // recipientIdColumnHeader
+ //
+ this.recipientIdColumnHeader.Text = "Recipient Id";
+ this.recipientIdColumnHeader.Width = 37;
+ //
+ // addressColumnHeader
+ //
+ this.addressColumnHeader.Text = "Address";
+ this.addressColumnHeader.Width = 111;
+ //
+ // mailBoxColumnHeader
+ //
+ this.mailBoxColumnHeader.Text = "Mailbox";
+ this.mailBoxColumnHeader.Width = 88;
+ //
+ // hostColumnHeader
+ //
+ this.hostColumnHeader.Text = "Host";
+ this.hostColumnHeader.Width = 89;
+ //
+ // deliveryAttemptsColumnHeader
+ //
+ this.deliveryAttemptsColumnHeader.Text = "Delivery Attempts";
+ this.deliveryAttemptsColumnHeader.Width = 43;
+ //
+ // inProgressColumnHeader
+ //
+ this.inProgressColumnHeader.Text = "In Progress";
+ //
+ // nextAttemptColumnHeader
+ //
+ this.nextAttemptColumnHeader.Text = "Next Attempt";
+ this.nextAttemptColumnHeader.Width = 123;
+ //
+ // SpoolMessageViewer
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(733, 389);
+ this.Controls.Add(this.mainSplitContainer);
+ this.Controls.Add(this.bottomPanel);
+ this.Name = "SpoolMessageViewer";
+ this.bottomPanel.ResumeLayout(false);
+ this.mainSplitContainer.Panel1.ResumeLayout(false);
+ this.mainSplitContainer.Panel2.ResumeLayout(false);
+ this.mainSplitContainer.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Panel bottomPanel;
+ private System.Windows.Forms.SplitContainer mainSplitContainer;
+ private System.Windows.Forms.ListView recipientsListView;
+ private System.Windows.Forms.PropertyGrid messageProperties;
+ private System.Windows.Forms.Button okButton;
+ private System.Windows.Forms.ColumnHeader recipientIdColumnHeader;
+ private System.Windows.Forms.ColumnHeader addressColumnHeader;
+ private System.Windows.Forms.ColumnHeader mailBoxColumnHeader;
+ private System.Windows.Forms.ColumnHeader hostColumnHeader;
+ private System.Windows.Forms.ColumnHeader deliveryAttemptsColumnHeader;
+ private System.Windows.Forms.ColumnHeader inProgressColumnHeader;
+ private System.Windows.Forms.ColumnHeader nextAttemptColumnHeader;
+ }
+}
Added: NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.cs 2007-06-11 05:34:02 UTC (rev 220)
@@ -0,0 +1,75 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+
+using WeifenLuo.WinFormsUI.Docking;
+
+using NMail.DataTypes;
+using NMail.DataTypes.Spool;
+using NMail.Icons;
+
+namespace NMail.Administration.WinForms.Spool {
+ public partial class SpoolMessageViewer : DockContent {
+
+ public SpoolMessageViewer() {
+ InitializeComponent();
+
+ this.Icon = IconHelper.GetIcon("mail_generic", "actions", IconSize.s16x16);
+ }
+
+ private void envelopeUpdated() {
+ this.messageProperties.SelectedObject = this.envelope;
+
+ this.recipientsListView.Items.Clear();
+
+ foreach (SmtpMessageRecipient recipient in this.envelope.Recipients) {
+ ListViewItem item = new SmtpMessageRecipientListViewItem(recipient);
+ this.recipientsListView.Items.Add(item);
+ }
+
+ this.TabText = string.Format("Spooled Message: {0}", this.envelope.Subject);
+ }
+
+ private SpoolEnvelope envelope;
+
+ /// <summary>
+ /// The envelope for this viewer.
+ /// </summary>
+ public SpoolEnvelope Envelope {
+ get { return envelope; }
+ set {
+ envelope = value;
+ envelopeUpdated();
+ }
+ }
+
+ private void okButton_Click(object sender, EventArgs e) {
+ this.Close();
+ }
+ }
+
+ public class SmtpMessageRecipientListViewItem : ListViewItem {
+
+ public SmtpMessageRecipientListViewItem(SmtpMessageRecipient recipient) {
+ this.recipient = recipient;
+
+ this.SubItems[0] = new ListViewSubItem(this, recipient.RecipientId.ToString());
+ this.SubItems.Add(new ListViewSubItem(this, recipient.Address.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, recipient.Mailbox.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, recipient.Host.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, recipient.DeliveryAttempts.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, recipient.InProgress.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, recipient.NextDeliveryAttempt.ToString()));
+ }
+
+ private SmtpMessageRecipient recipient;
+
+ public SmtpMessageRecipient Recipient {
+ get { return recipient; }
+ }
+ }
+}
Added: NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.resx
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.resx (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SpoolMessageViewer.resx 2007-06-11 05:34:02 UTC (rev 220)
@@ -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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-11 04:42:45
|
Revision: 219
http://svn.sourceforge.net/nmailserver/?rev=219&view=rev
Author: tmyroadctfig
Date: 2007-06-10 21:42:39 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
Added environment details to initial debugging messages.
Modified Paths:
--------------
NMail/trunk/NMail.Server.Console/NMailConsoleServer.cs
NMail/trunk/NMail.Server.Service/NMailService.cs
Modified: NMail/trunk/NMail.Server.Console/NMailConsoleServer.cs
===================================================================
--- NMail/trunk/NMail.Server.Console/NMailConsoleServer.cs 2007-06-11 04:41:38 UTC (rev 218)
+++ NMail/trunk/NMail.Server.Console/NMailConsoleServer.cs 2007-06-11 04:42:39 UTC (rev 219)
@@ -50,6 +50,7 @@
log.Debug("Platform: [" + Environment.OSVersion.Platform + "]");
log.Debug("Version: [" + Environment.OSVersion.Version + "]");
log.Debug("OS: [" + Environment.OSVersion.ToString() + "]");
+ log.Debug("Environment: [" + Environment.Version.ToString() + "]");
log.Debug("Current Dir: [" + Environment.CurrentDirectory + "]");
NMailServer server = new NMailServer();
Modified: NMail/trunk/NMail.Server.Service/NMailService.cs
===================================================================
--- NMail/trunk/NMail.Server.Service/NMailService.cs 2007-06-11 04:41:38 UTC (rev 218)
+++ NMail/trunk/NMail.Server.Service/NMailService.cs 2007-06-11 04:42:39 UTC (rev 219)
@@ -46,6 +46,7 @@
log.Debug("Platform: [" + Environment.OSVersion.Platform + "]");
log.Debug("Version: [" + Environment.OSVersion.Version + "]");
log.Debug("OS: [" + Environment.OSVersion.ToString() + "]");
+ log.Debug("Environment: [" + Environment.Version.ToString() + "]");
log.Debug("Current Dir: [" + Environment.CurrentDirectory + "]");
this.server = new NMailServer();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-11 04:41:43
|
Revision: 218
http://svn.sourceforge.net/nmailserver/?rev=218&view=rev
Author: tmyroadctfig
Date: 2007-06-10 21:41:38 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
Fixed a minor defect in the SMTP client.
Modified Paths:
--------------
NMail/trunk/NMail.SmtpClient/SmtpClient.cs
Modified: NMail/trunk/NMail.SmtpClient/SmtpClient.cs
===================================================================
--- NMail/trunk/NMail.SmtpClient/SmtpClient.cs 2007-06-10 14:34:21 UTC (rev 217)
+++ NMail/trunk/NMail.SmtpClient/SmtpClient.cs 2007-06-11 04:41:38 UTC (rev 218)
@@ -294,10 +294,17 @@
return false;
}
+ bool acceptedRecipient = false;
+
foreach (SmtpMessageRecipient recipient in currentMessage.Recipients) {
this.connection.RcptTo(recipient.Address);
this.response = this.connection.GetResponse(this.config.TimeoutRcptTo);
+ // Send data if any single recipient is accepted
+ if (this.response.Type == DeliveryResultType.Success) {
+ acceptedRecipient = true;
+ }
+
RecipientDeliveryResult recipientResult = new RecipientDeliveryResult(
recipient,
this.response.Type,
@@ -306,10 +313,15 @@
currentResult.AddRecipientResult(recipientResult);
}
+ if (!acceptedRecipient) {
+ // Remote end rejected all our recipients!
+ return false;
+ }
+
// commence data
this.connection.Data();
-
- return true;
+ this.response = this.connection.GetResponse(this.config.TimeoutData);
+ return (this.response.Continue);
}
/// <summary>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-10 14:34:19
|
Revision: 217
http://svn.sourceforge.net/nmailserver/?rev=217&view=rev
Author: tmyroadctfig
Date: 2007-06-10 07:34:21 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
Work on Spool and service administration.
Modified Paths:
--------------
NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainEditor.cs
NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs
NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs
NMail/trunk/NMail.Administration.WinForms/MainForm.cs
NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj
NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.Designer.cs
NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.cs
NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.resx
NMail/trunk/NMail.Icons/NMail.Icons.csproj
Added Paths:
-----------
NMail/trunk/NMail.Administration.WinForms/Spool/
NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.Designer.cs
NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.cs
NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.Designer.cs
NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.cs
NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.resx
NMail/trunk/NMail.Icons/Resources/16x16/actions/mail_generic.png
NMail/trunk/NMail.Icons/Resources/16x16/actions/recur.png
Modified: NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainEditor.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainEditor.cs 2007-06-10 14:33:07 UTC (rev 216)
+++ NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainEditor.cs 2007-06-10 14:34:21 UTC (rev 217)
@@ -1,3 +1,20 @@
+/*
+ * Copyright 2004-2007 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;
Modified: NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs 2007-06-10 14:33:07 UTC (rev 216)
+++ NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs 2007-06-10 14:34:21 UTC (rev 217)
@@ -35,6 +35,8 @@
this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.refreshMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bottomPanel.SuspendLayout();
this.mailDomainContextMenu.SuspendLayout();
this.SuspendLayout();
@@ -56,7 +58,7 @@
this.mailDomainsListView.TabIndex = 1;
this.mailDomainsListView.UseCompatibleStateImageBehavior = false;
this.mailDomainsListView.View = System.Windows.Forms.View.Details;
- this.mailDomainsListView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.mailDomainsListView_MouseClick);
+ this.mailDomainsListView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.mailDomainsListView_MouseUp);
//
// idColumnHeader
//
@@ -92,9 +94,10 @@
//
this.refreshButton.Location = new System.Drawing.Point(4, 7);
this.refreshButton.Name = "refreshButton";
- this.refreshButton.Size = new System.Drawing.Size(75, 23);
+ this.refreshButton.Size = new System.Drawing.Size(82, 23);
this.refreshButton.TabIndex = 0;
this.refreshButton.Text = "Refresh";
+ this.refreshButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.refreshButton.UseVisualStyleBackColor = true;
this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
//
@@ -103,31 +106,45 @@
this.mailDomainContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.addToolStripMenuItem,
this.editMenuItem,
- this.deleteToolStripMenuItem});
+ this.deleteToolStripMenuItem,
+ this.toolStripSeparator1,
+ this.refreshMenuItem});
this.mailDomainContextMenu.Name = "mailDomainContextMenu";
- this.mailDomainContextMenu.Size = new System.Drawing.Size(153, 92);
+ this.mailDomainContextMenu.Size = new System.Drawing.Size(124, 98);
//
// addToolStripMenuItem
//
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
- this.addToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.addToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
this.addToolStripMenuItem.Text = "Add";
this.addToolStripMenuItem.Click += new System.EventHandler(this.addToolStripMenuItem_Click);
//
// editMenuItem
//
this.editMenuItem.Name = "editMenuItem";
- this.editMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.editMenuItem.Size = new System.Drawing.Size(123, 22);
this.editMenuItem.Text = "Edit...";
this.editMenuItem.Click += new System.EventHandler(this.editMenuItem_Click);
//
// deleteToolStripMenuItem
//
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
- this.deleteToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.deleteToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
this.deleteToolStripMenuItem.Text = "Delete";
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click);
//
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(120, 6);
+ //
+ // refreshMenuItem
+ //
+ this.refreshMenuItem.Name = "refreshMenuItem";
+ this.refreshMenuItem.Size = new System.Drawing.Size(123, 22);
+ this.refreshMenuItem.Text = "Refresh";
+ this.refreshMenuItem.Click += new System.EventHandler(this.refreshButton_Click);
+ //
// MailDomainManager
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -155,6 +172,8 @@
private System.Windows.Forms.ToolStripMenuItem editMenuItem;
private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem addToolStripMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ private System.Windows.Forms.ToolStripMenuItem refreshMenuItem;
}
}
Modified: NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs 2007-06-10 14:33:07 UTC (rev 216)
+++ NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs 2007-06-10 14:34:21 UTC (rev 217)
@@ -37,10 +37,12 @@
this.mainForm = mainForm;
+ // Setup icons
this.imageList.Images.Add(IconHelper.GetImage("server", "actions", IconSize.s16x16));
-
this.editMenuItem.Image = IconHelper.GetImage("edit", "actions", IconSize.s16x16);
this.deleteToolStripMenuItem.Image = IconHelper.GetImage("delete", "actions", IconSize.s16x16);
+ this.refreshMenuItem.Image = IconHelper.GetImage("recur", "actions", IconSize.s16x16);
+ this.refreshButton.Image = IconHelper.GetImage("recur", "actions", IconSize.s16x16);
}
MainForm mainForm;
@@ -55,7 +57,7 @@
// Add them to the list view
foreach (NMail.DataTypes.LocalStore.MailDomain mailDomain in mailDomains) {
- ListViewItem item = new MailDomainListVieItem(mailDomain);
+ ListViewItem item = new MailDomainListViewItem(mailDomain);
this.mailDomainsListView.Items.Add(item);
}
@@ -65,15 +67,27 @@
}
}
- private MailDomainListVieItem clickedItem;
+ private MailDomainListViewItem clickedItem;
- private void mailDomainsListView_MouseClick(object sender, MouseEventArgs e) {
+ private void mailDomainsListView_MouseUp(object sender, MouseEventArgs e) {
if (e.Button == MouseButtons.Right) {
- this.clickedItem = this.mailDomainsListView.GetItemAt(e.X, e.Y) as MailDomainListVieItem;
+ // Get the item clicked on (if any)
+ this.clickedItem = this.mailDomainsListView.GetItemAt(e.X, e.Y) as MailDomainListViewItem;
+
+ // Update and show the context menu
+ updateContextMenu();
this.mailDomainContextMenu.Show(Control.MousePosition, ToolStripDropDownDirection.BelowRight);
}
}
+ /// <summary>
+ /// Updates the context menu based on the item clicked on
+ /// </summary>
+ private void updateContextMenu() {
+ this.editMenuItem.Enabled = (this.clickedItem != null);
+ this.deleteToolStripMenuItem.Enabled = (this.clickedItem != null);
+ }
+
private void addToolStripMenuItem_Click(object sender, EventArgs e) {
// Create a new editor and display it
MailDomainEditor editor = new MailDomainEditor();
@@ -160,16 +174,22 @@
} catch (Exception ex) {
Program.ShowExceptionDialog(ex);
}
+
+ // Update the list of mail domains
+ refreshButton_Click(this, new EventArgs());
}
}
}
}
- public class MailDomainListVieItem : ListViewItem {
+ /// <summary>
+ /// A list view item for displaying mail domains.
+ /// </summary>
+ public class MailDomainListViewItem : ListViewItem {
private NMail.DataTypes.LocalStore.MailDomain mailDomain;
- public MailDomainListVieItem(NMail.DataTypes.LocalStore.MailDomain mailDomain) {
+ public MailDomainListViewItem(NMail.DataTypes.LocalStore.MailDomain mailDomain) {
this.mailDomain = mailDomain;
this.SubItems[0] = new ListViewSubItem(this, mailDomain.MailDomainId.ToString());
Modified: NMail/trunk/NMail.Administration.WinForms/MainForm.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/MainForm.cs 2007-06-10 14:33:07 UTC (rev 216)
+++ NMail/trunk/NMail.Administration.WinForms/MainForm.cs 2007-06-10 14:34:21 UTC (rev 217)
@@ -54,6 +54,7 @@
InitialiseManagementTree();
InitialiseServicesViewer();
InitialiseMailDomainManager();
+ InitialiseSpoolManager();
this.connectionStatusLbl.Image = IconHelper.GetImage("connect_no", "actions", IconSize.s16x16);
this.connectMenuItem.Image = IconHelper.GetImage("connect_no", "actions", IconSize.s16x16);
@@ -387,8 +388,46 @@
}
#endregion
+ #region Spool Manager
+ /// <summary>
+ /// The spool manager.
+ /// </summary>
+ Spool.SmtpSpoolManager spoolManager;
+
+ DockContent spoolManagerDock;
+
+ protected void InitialiseSpoolManager() {
+ this.spoolManager = new Spool.SmtpSpoolManager(this);
+ this.spoolManager.Dock = DockStyle.Fill;
+
+ spoolManagerDock = new DockContent();
+ spoolManagerDock.Controls.Add(this.spoolManager);
+ spoolManagerDock.Text = "SMTP Spool";
+ spoolManagerDock.DockPanel = this.dockPanel;
+ spoolManagerDock.DockState = DockState.Hidden;
+ spoolManagerDock.Icon = IconHelper.GetIcon("queue", "actions", IconSize.s16x16);
+ spoolManagerDock.FormClosing += new FormClosingEventHandler(spoolManagerDock_FormClosing);
+ }
+
+ void spoolManagerDock_FormClosing(object sender, FormClosingEventArgs e) {
+ if (e.CloseReason == CloseReason.UserClosing) {
+ e.Cancel = true;
+
+ this.spoolManagerDock.DockState = DockState.Hidden;
+ }
+ }
+
public void ShowSpoolControl() {
+ if (!Connected) {
+ ShowStatusBrowser();
+
+ } else {
+ this.spoolManagerDock.DockState = DockState.Document;
+ this.spoolManagerDock.DockHandler.DockTo(this.dockPanel.DockWindows[DockState.Document].NestedPanes[0], DockStyle.Fill, 0);
+ this.spoolManagerDock.DockHandler.Show();
+ }
}
+ #endregion
#region Mail Domain Manager
/// <summary>
Modified: NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj 2007-06-10 14:33:07 UTC (rev 216)
+++ NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj 2007-06-10 14:34:21 UTC (rev 217)
@@ -130,6 +130,10 @@
<SubType>Designer</SubType>
<DependentUpon>ServicesViewer.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="Spool\SmtpSpoolManager.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>SmtpSpoolManager.cs</DependentUpon>
+ </EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
@@ -149,6 +153,18 @@
<Compile Include="Services\ServicesViewer.Designer.cs">
<DependentUpon>ServicesViewer.cs</DependentUpon>
</Compile>
+ <Compile Include="Spool\SmtpMessageRecipientViewer.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Spool\SmtpMessageRecipientViewer.Designer.cs">
+ <DependentUpon>SmtpMessageRecipientViewer.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Spool\SmtpSpoolManager.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="Spool\SmtpSpoolManager.Designer.cs">
+ <DependentUpon>SmtpSpoolManager.cs</DependentUpon>
+ </Compile>
</ItemGroup>
<ItemGroup>
<Content Include="Resources\ConnectFailed.html">
Modified: NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.Designer.cs 2007-06-10 14:33:07 UTC (rev 216)
+++ NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.Designer.cs 2007-06-10 14:34:21 UTC (rev 217)
@@ -24,72 +24,160 @@
/// </summary>
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
- this.mainListView = new System.Windows.Forms.ListView();
+ this.servicesListView = new System.Windows.Forms.ListView();
+ this.nameColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.descColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.runningColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.autoStartColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.imageList = new System.Windows.Forms.ImageList(this.components);
this.servicesContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.startMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.stopMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.restartMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.refreshMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.bottomPanel = new System.Windows.Forms.Panel();
+ this.refreshButton = new System.Windows.Forms.Button();
this.servicesContextMenu.SuspendLayout();
+ this.bottomPanel.SuspendLayout();
this.SuspendLayout();
//
- // mainListView
+ // servicesListView
//
- this.mainListView.ContextMenuStrip = this.servicesContextMenu;
- this.mainListView.Dock = System.Windows.Forms.DockStyle.Fill;
- this.mainListView.FullRowSelect = true;
- this.mainListView.GridLines = true;
- this.mainListView.Location = new System.Drawing.Point(0, 0);
- this.mainListView.Name = "mainListView";
- this.mainListView.Size = new System.Drawing.Size(570, 423);
- this.mainListView.TabIndex = 0;
- this.mainListView.UseCompatibleStateImageBehavior = false;
- this.mainListView.View = System.Windows.Forms.View.Details;
+ this.servicesListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.nameColumnHeader,
+ this.descColumnHeader,
+ this.runningColumnHeader,
+ this.autoStartColumnHeader});
+ this.servicesListView.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.servicesListView.FullRowSelect = true;
+ this.servicesListView.GridLines = true;
+ this.servicesListView.Location = new System.Drawing.Point(0, 0);
+ this.servicesListView.Name = "servicesListView";
+ this.servicesListView.Size = new System.Drawing.Size(570, 384);
+ this.servicesListView.SmallImageList = this.imageList;
+ this.servicesListView.TabIndex = 0;
+ this.servicesListView.UseCompatibleStateImageBehavior = false;
+ this.servicesListView.View = System.Windows.Forms.View.Details;
+ this.servicesListView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.servicesListView_MouseUp);
//
+ // nameColumnHeader
+ //
+ this.nameColumnHeader.Text = "Name";
+ this.nameColumnHeader.Width = 122;
+ //
+ // descColumnHeader
+ //
+ this.descColumnHeader.Text = "Description";
+ this.descColumnHeader.Width = 211;
+ //
+ // runningColumnHeader
+ //
+ this.runningColumnHeader.Text = "Running";
+ //
+ // autoStartColumnHeader
+ //
+ this.autoStartColumnHeader.Text = "Auto-Start";
+ //
+ // imageList
+ //
+ this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+ this.imageList.ImageSize = new System.Drawing.Size(16, 16);
+ this.imageList.TransparentColor = System.Drawing.Color.Transparent;
+ //
// servicesContextMenu
//
this.servicesContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.startMenuItem,
this.stopMenuItem,
- this.restartMenuItem});
+ this.restartMenuItem,
+ this.toolStripSeparator1,
+ this.refreshMenuItem});
this.servicesContextMenu.Name = "servicesContextMenu";
- this.servicesContextMenu.Size = new System.Drawing.Size(153, 92);
+ this.servicesContextMenu.Size = new System.Drawing.Size(153, 120);
//
// startMenuItem
//
this.startMenuItem.Name = "startMenuItem";
this.startMenuItem.Size = new System.Drawing.Size(152, 22);
this.startMenuItem.Text = "Start";
+ this.startMenuItem.Click += new System.EventHandler(this.startMenuItem_Click);
//
// stopMenuItem
//
this.stopMenuItem.Name = "stopMenuItem";
this.stopMenuItem.Size = new System.Drawing.Size(152, 22);
this.stopMenuItem.Text = "Stop";
+ this.stopMenuItem.Click += new System.EventHandler(this.stopMenuItem_Click);
//
// restartMenuItem
//
this.restartMenuItem.Name = "restartMenuItem";
this.restartMenuItem.Size = new System.Drawing.Size(152, 22);
this.restartMenuItem.Text = "Restart";
+ this.restartMenuItem.Click += new System.EventHandler(this.restartMenuItem_Click);
//
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6);
+ //
+ // refreshMenuItem
+ //
+ this.refreshMenuItem.Name = "refreshMenuItem";
+ this.refreshMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.refreshMenuItem.Text = "Refresh";
+ this.refreshMenuItem.Click += new System.EventHandler(this.refreshButton_Click);
+ //
+ // bottomPanel
+ //
+ this.bottomPanel.Controls.Add(this.refreshButton);
+ this.bottomPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.bottomPanel.Location = new System.Drawing.Point(0, 384);
+ this.bottomPanel.Name = "bottomPanel";
+ this.bottomPanel.Size = new System.Drawing.Size(570, 39);
+ this.bottomPanel.TabIndex = 1;
+ //
+ // refreshButton
+ //
+ this.refreshButton.Location = new System.Drawing.Point(3, 6);
+ this.refreshButton.Name = "refreshButton";
+ this.refreshButton.Size = new System.Drawing.Size(75, 23);
+ this.refreshButton.TabIndex = 0;
+ this.refreshButton.Text = "Refresh";
+ this.refreshButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
+ this.refreshButton.UseVisualStyleBackColor = true;
+ this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
+ //
// ServicesViewer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.Controls.Add(this.mainListView);
+ this.Controls.Add(this.servicesListView);
+ this.Controls.Add(this.bottomPanel);
this.Name = "ServicesViewer";
this.Size = new System.Drawing.Size(570, 423);
this.servicesContextMenu.ResumeLayout(false);
+ this.bottomPanel.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
- private System.Windows.Forms.ListView mainListView;
+ private System.Windows.Forms.ListView servicesListView;
private System.Windows.Forms.ContextMenuStrip servicesContextMenu;
private System.Windows.Forms.ToolStripMenuItem startMenuItem;
private System.Windows.Forms.ToolStripMenuItem stopMenuItem;
private System.Windows.Forms.ToolStripMenuItem restartMenuItem;
+ private System.Windows.Forms.ColumnHeader nameColumnHeader;
+ private System.Windows.Forms.ColumnHeader descColumnHeader;
+ private System.Windows.Forms.ColumnHeader runningColumnHeader;
+ private System.Windows.Forms.ColumnHeader autoStartColumnHeader;
+ private System.Windows.Forms.Panel bottomPanel;
+ private System.Windows.Forms.Button refreshButton;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ private System.Windows.Forms.ToolStripMenuItem refreshMenuItem;
+ private System.Windows.Forms.ImageList imageList;
}
}
Modified: NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.cs 2007-06-10 14:33:07 UTC (rev 216)
+++ NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.cs 2007-06-10 14:34:21 UTC (rev 217)
@@ -23,10 +23,141 @@
using System.Text;
using System.Windows.Forms;
+using NMail.DataTypes.Service;
+using NMail.Icons;
+
namespace NMail.Administration.WinForms.Services {
public partial class ServicesViewer : UserControl {
+
+ private MainForm mainForm;
+
public ServicesViewer(MainForm mainForm) {
InitializeComponent();
+
+ this.mainForm = mainForm;
+
+ // Setup icons
+ this.imageList.Images.Add(IconHelper.GetImage("exec", "actions", IconSize.s16x16));
+ this.refreshMenuItem.Image = IconHelper.GetImage("recur", "actions", IconSize.s16x16);
+ this.refreshButton.Image = IconHelper.GetImage("recur", "actions", IconSize.s16x16);
}
+
+ private void refreshButton_Click(object sender, EventArgs e) {
+ try {
+ // Get a list of mail domains
+ IList<ServiceStartInfo> services = this.mainForm.RemoteAdministration.NMailServer.Services;
+
+ this.servicesListView.Items.Clear();
+
+ // Add them to the list view
+ foreach (ServiceStartInfo service in services) {
+ ListViewItem item = new ServiceListViewItem(service);
+ this.servicesListView.Items.Add(item);
+ }
+
+ } catch (Exception ex) {
+ // Something bad :(
+ Program.ShowExceptionDialog(ex);
+ }
+ }
+
+ private ServiceListViewItem clickedItem;
+
+ private void servicesListView_MouseUp(object sender, MouseEventArgs e) {
+ if (e.Button == MouseButtons.Right) {
+ // Get the item clicked on (if any)
+ this.clickedItem = this.servicesListView.GetItemAt(e.X, e.Y) as ServiceListViewItem;
+
+ // Update and show the context menu
+ updateContextMenu();
+ this.servicesContextMenu.Show(Control.MousePosition, ToolStripDropDownDirection.BelowRight);
+ }
+ }
+
+ /// <summary>
+ /// Updates the context menu based on the item clicked on
+ /// </summary>
+ private void updateContextMenu() {
+ this.startMenuItem.Enabled = (this.clickedItem != null);
+ this.stopMenuItem.Enabled = (this.clickedItem != null);
+ this.restartMenuItem.Enabled = (this.clickedItem != null);
+ }
+
+ private void startMenuItem_Click(object sender, EventArgs e) {
+ if (this.clickedItem != null
+ && this.clickedItem.Service != null
+ && this.clickedItem.Service.Service != null) {
+
+ try {
+ // Attempt to start the service
+ this.clickedItem.Service.Service.Start();
+
+ } catch (Exception ex) {
+ Program.ShowExceptionDialog(ex);
+ }
+
+ // Update services list
+ refreshButton_Click(this, new EventArgs());
+ }
+ }
+
+ private void stopMenuItem_Click(object sender, EventArgs e) {
+ if (this.clickedItem != null
+ && this.clickedItem.Service != null
+ && this.clickedItem.Service.Service != null) {
+
+ try {
+ // Attempt to stop the service
+ this.clickedItem.Service.Service.Stop(true);
+
+ } catch (Exception ex) {
+ Program.ShowExceptionDialog(ex);
+ }
+
+ // Update services list
+ refreshButton_Click(this, new EventArgs());
+ }
+ }
+
+ private void restartMenuItem_Click(object sender, EventArgs e) {
+ if (this.clickedItem != null
+ && this.clickedItem.Service != null
+ && this.clickedItem.Service.Service != null) {
+
+ try {
+ // Attempt to restart the service
+ this.clickedItem.Service.Service.Stop(true);
+ this.clickedItem.Service.Service.Start();
+
+ } catch (Exception ex) {
+ Program.ShowExceptionDialog(ex);
+ }
+
+ // Update services list
+ refreshButton_Click(this, new EventArgs());
+ }
+ }
}
+
+ public class ServiceListViewItem : ListViewItem {
+
+ public ServiceListViewItem(ServiceStartInfo service) {
+ this.service = service;
+
+ this.SubItems[0] = new ListViewSubItem(this, service.Service.Name);
+ this.SubItems.Add(new ListViewSubItem(this, service.Service.Description));
+ this.SubItems.Add(new ListViewSubItem(this, service.Service.Running.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, service.AutomaticStart.ToString()));
+
+ this.ImageIndex = 0;
+ }
+
+ private ServiceStartInfo service;
+
+ public ServiceStartInfo Service {
+ get {
+ return this.service;
+ }
+ }
+ }
}
Modified: NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.resx
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.resx 2007-06-10 14:33:07 UTC (rev 216)
+++ NMail/trunk/NMail.Administration.WinForms/Services/ServicesViewer.resx 2007-06-10 14:34:21 UTC (rev 217)
@@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
+ <metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>173, 17</value>
+ </metadata>
<metadata name="servicesContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
Added: NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.Designer.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.Designer.cs 2007-06-10 14:34:21 UTC (rev 217)
@@ -0,0 +1,32 @@
+namespace NMail.Administration.WinForms.Spool {
+ partial class SmtpMessageRecipientViewer {
+ /// <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() {
+ components = new System.ComponentModel.Container();
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ }
+
+ #endregion
+ }
+}
Added: NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SmtpMessageRecipientViewer.cs 2007-06-10 14:34:21 UTC (rev 217)
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace NMail.Administration.WinForms.Spool {
+ public partial class SmtpMessageRecipientViewer : DockContent {
+ public SmtpMessageRecipientViewer() {
+ InitializeComponent();
+ }
+ }
+}
Added: NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.Designer.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.Designer.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.Designer.cs 2007-06-10 14:34:21 UTC (rev 217)
@@ -0,0 +1,209 @@
+namespace NMail.Administration.WinForms.Spool {
+ partial class SmtpSpoolManager {
+ /// <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.components = new System.ComponentModel.Container();
+ this.imageList = new System.Windows.Forms.ImageList(this.components);
+ this.spoolListView = new System.Windows.Forms.ListView();
+ this.guidColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.inProgressColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.filteredColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.sourceAddressColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.reportedHostColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.senderColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.recipientsColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.bottomPanel = new System.Windows.Forms.Panel();
+ this.refreshButton = new System.Windows.Forms.Button();
+ this.spoolContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.viewRecipientsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.deleteMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.refreshMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.subjectColumnHeader = new System.Windows.Forms.ColumnHeader();
+ this.bottomPanel.SuspendLayout();
+ this.spoolContextMenu.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // imageList
+ //
+ this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+ this.imageList.ImageSize = new System.Drawing.Size(16, 16);
+ this.imageList.TransparentColor = System.Drawing.Color.Transparent;
+ //
+ // spoolListView
+ //
+ this.spoolListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.guidColumnHeader,
+ this.inProgressColumnHeader,
+ this.filteredColumnHeader,
+ this.subjectColumnHeader,
+ this.sourceAddressColumnHeader,
+ this.reportedHostColumnHeader,
+ this.senderColumnHeader,
+ this.recipientsColumnHeader});
+ this.spoolListView.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.spoolListView.FullRowSelect = true;
+ this.spoolListView.GridLines = true;
+ this.spoolListView.HideSelection = false;
+ this.spoolListView.Location = new System.Drawing.Point(0, 0);
+ this.spoolListView.Name = "spoolListView";
+ this.spoolListView.Size = new System.Drawing.Size(755, 399);
+ this.spoolListView.SmallImageList = this.imageList;
+ this.spoolListView.TabIndex = 0;
+ this.spoolListView.UseCompatibleStateImageBehavior = false;
+ this.spoolListView.View = System.Windows.Forms.View.Details;
+ this.spoolListView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.spoolListView_MouseDoubleClick);
+ this.spoolListView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.spoolListView_MouseUp);
+ //
+ // guidColumnHeader
+ //
+ this.guidColumnHeader.Text = "Guid";
+ this.guidColumnHeader.Width = 45;
+ //
+ // inProgressColumnHeader
+ //
+ this.inProgressColumnHeader.Text = "In Progress";
+ this.inProgressColumnHeader.Width = 47;
+ //
+ // filteredColumnHeader
+ //
+ this.filteredColumnHeader.Text = "Filtered";
+ this.filteredColumnHeader.Width = 47;
+ //
+ // sourceAddressColumnHeader
+ //
+ this.sourceAddressColumnHeader.Text = "Source Address";
+ this.sourceAddressColumnHeader.Width = 75;
+ //
+ // reportedHostColumnHeader
+ //
+ this.reportedHostColumnHeader.Text = "Reported Host";
+ this.reportedHostColumnHeader.Width = 92;
+ //
+ // senderColumnHeader
+ //
+ this.senderColumnHeader.Text = "Sender";
+ this.senderColumnHeader.Width = 77;
+ //
+ // recipientsColumnHeader
+ //
+ this.recipientsColumnHeader.Text = "Recipients";
+ this.recipientsColumnHeader.Width = 347;
+ //
+ // bottomPanel
+ //
+ this.bottomPanel.Controls.Add(this.refreshButton);
+ this.bottomPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.bottomPanel.Location = new System.Drawing.Point(0, 399);
+ this.bottomPanel.Name = "bottomPanel";
+ this.bottomPanel.Size = new System.Drawing.Size(755, 33);
+ this.bottomPanel.TabIndex = 1;
+ //
+ // refreshButton
+ //
+ this.refreshButton.Location = new System.Drawing.Point(3, 6);
+ this.refreshButton.Name = "refreshButton";
+ this.refreshButton.Size = new System.Drawing.Size(75, 23);
+ this.refreshButton.TabIndex = 0;
+ this.refreshButton.Text = "Refresh";
+ this.refreshButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
+ this.refreshButton.UseVisualStyleBackColor = true;
+ this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
+ //
+ // spoolContextMenu
+ //
+ this.spoolContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.viewRecipientsMenuItem,
+ this.deleteMenuItem,
+ this.toolStripSeparator1,
+ this.refreshMenuItem});
+ this.spoolContextMenu.Name = "spoolContextMenu";
+ this.spoolContextMenu.Size = new System.Drawing.Size(160, 76);
+ //
+ // viewRecipientsMenuItem
+ //
+ this.viewRecipientsMenuItem.Name = "viewRecipientsMenuItem";
+ this.viewRecipientsMenuItem.Size = new System.Drawing.Size(159, 22);
+ this.viewRecipientsMenuItem.Text = "View Recipients";
+ this.viewRecipientsMenuItem.Click += new System.EventHandler(this.viewRecipientsMenuItem_Click);
+ //
+ // deleteMenuItem
+ //
+ this.deleteMenuItem.Name = "deleteMenuItem";
+ this.deleteMenuItem.Size = new System.Drawing.Size(159, 22);
+ this.deleteMenuItem.Text = "Delete";
+ this.deleteMenuItem.Click += new System.EventHandler(this.deleteMenuItem_Click);
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(156, 6);
+ //
+ // refreshMenuItem
+ //
+ this.refreshMenuItem.Name = "refreshMenuItem";
+ this.refreshMenuItem.Size = new System.Drawing.Size(159, 22);
+ this.refreshMenuItem.Text = "Refresh";
+ this.refreshMenuItem.Click += new System.EventHandler(this.refreshButton_Click);
+ //
+ // subjectColumnHeader
+ //
+ this.subjectColumnHeader.Text = "Subject";
+ this.subjectColumnHeader.Width = 83;
+ //
+ // SmtpSpoolManager
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.spoolListView);
+ this.Controls.Add(this.bottomPanel);
+ this.Name = "SmtpSpoolManager";
+ this.Size = new System.Drawing.Size(755, 432);
+ this.bottomPanel.ResumeLayout(false);
+ this.spoolContextMenu.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ImageList imageList;
+ private System.Windows.Forms.ListView spoolListView;
+ private System.Windows.Forms.Panel bottomPanel;
+ private System.Windows.Forms.ContextMenuStrip spoolContextMenu;
+ private System.Windows.Forms.ColumnHeader guidColumnHeader;
+ private System.Windows.Forms.ColumnHeader inProgressColumnHeader;
+ private System.Windows.Forms.ColumnHeader filteredColumnHeader;
+ private System.Windows.Forms.ColumnHeader sourceAddressColumnHeader;
+ private System.Windows.Forms.ColumnHeader reportedHostColumnHeader;
+ private System.Windows.Forms.ColumnHeader senderColumnHeader;
+ private System.Windows.Forms.ColumnHeader recipientsColumnHeader;
+ private System.Windows.Forms.Button refreshButton;
+ private System.Windows.Forms.ToolStripMenuItem viewRecipientsMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem deleteMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ private System.Windows.Forms.ToolStripMenuItem refreshMenuItem;
+ private System.Windows.Forms.ColumnHeader subjectColumnHeader;
+ }
+}
Added: NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.cs
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.cs (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.cs 2007-06-10 14:34:21 UTC (rev 217)
@@ -0,0 +1,198 @@
+/*
+ * Copyright 2004-2007 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.Windows.Forms;
+
+using NMail.DataTypes;
+using NMail.DataTypes.Service;
+using NMail.DataTypes.Spool;
+using NMail.Icons;
+
+namespace NMail.Administration.WinForms.Spool {
+ public partial class SmtpSpoolManager : UserControl {
+
+ private MainForm mainForm;
+
+ public SmtpSpoolManager(MainForm mainForm) {
+ InitializeComponent();
+
+ this.mainForm = mainForm;
+
+ // Setup icons
+ this.imageList.Images.Add(IconHelper.GetImage("mail_generic", "actions", IconSize.s16x16));
+ this.refreshButton.Image = IconHelper.GetImage("recur", "actions", IconSize.s16x16);
+ this.deleteMenuItem.Image = IconHelper.GetImage("delete", "actions", IconSize.s16x16);
+ this.refreshMenuItem.Image = IconHelper.GetImage("recur", "actions", IconSize.s16x16);
+ }
+
+ private ISpoolService GetSpool() {
+ ISpoolService spool = null;
+
+ foreach (ServiceStartInfo service in this.mainForm.RemoteAdministration.NMailServer.Services) {
+ if (service.Service is ISpoolService) {
+ spool = service.Service as ISpoolService;
+ break;
+ }
+ }
+
+ return spool;
+ }
+
+ private void refreshButton_Click(object sender, EventArgs e) {
+ try {
+ // Get a list of spooled messages
+ IList<SpoolEnvelope> envelopes = GetSpool().GetSpooledEnvelopes();
+
+ this.spoolListView.Items.Clear();
+
+ // Add them to the list view
+ foreach (SpoolEnvelope envelope in envelopes) {
+ ListViewItem item = new SpoolEnvelopeListViewItem(envelope);
+ this.spoolListView.Items.Add(item);
+ }
+
+ } catch (Exception ex) {
+ // Something bad :(
+ Program.ShowExceptionDialog(ex);
+ }
+ }
+
+ SpoolEnvelopeListViewItem clickedItem;
+
+ private void spoolListView_MouseUp(object sender, MouseEventArgs e) {
+ if (e.Button == MouseButtons.Right) {
+ // Get the item clicked on (if any)
+ this.clickedItem = this.spoolListView.GetItemAt(e.X, e.Y) as SpoolEnvelopeListViewItem;
+
+ // Update and show the context menu
+ updateContextMenu();
+ this.spoolContextMenu.Show(Control.MousePosition, ToolStripDropDownDirection.BelowRight);
+ }
+ }
+
+ /// <summary>
+ /// Updates the context menu based on the item clicked on
+ /// </summary>
+ private void updateContextMenu() {
+ this.viewRecipientsMenuItem.Enabled = (this.clickedItem != null);
+ this.deleteMenuItem.Enabled = (this.clickedItem != null);
+ }
+
+ private void spoolListView_MouseDoubleClick(object sender, MouseEventArgs e) {
+ if (e.Button == MouseButtons.Left) {
+ SpoolEnvelopeListViewItem item = this.spoolListView.GetItemAt(e.X, e.Y) as SpoolEnvelopeListViewItem;
+
+ if (item != null) {
+ ViewEnvelopeRecipients(item.Envelope);
+ }
+ }
+ }
+
+ private void viewRecipientsMenuItem_Click(object sender, EventArgs e) {
+ if (this.clickedItem != null) {
+ ViewEnvelopeRecipients(this.clickedItem.Envelope);
+ }
+ }
+
+ private void ViewEnvelopeRecipients(SpoolEnvelope envelope) {
+ //// Create a new editor and display it
+ //MailDomainEditor editor = new MailDomainEditor();
+ //editor.Dock = DockStyle.Fill;
+ //editor.TabText = "Edit Mail Domain";
+ //editor.OkButtonText = "Update";
+ //editor.Icon = IconHelper.GetIcon("server", "actions", IconSize.s16x16);
+ //editor.MailDomain = this.clickedItem.MailDomain;
+ //this.mainForm.DockFloat(editor, new Size(320, 440));
+
+ //// Add a handler for the editor's closing event
+ //editor.FormClosing += delegate(object s, FormClosingEventArgs fea) {
+
+ // if (editor.DialogResult == DialogResult.OK) {
+ // // Attempt to add the mail domain
+ // try {
+ // NMail.Authentication.IAuthenticationToken authToken = this.mainForm.AuthenticationToken;
+ // this.mainForm.RemoteAdministration.NMailServer.LocalStore.UpdateMailDomain(authToken, editor.MailDomain);
+ // } catch (Exception ex) {
+ // Program.ShowExceptionDialog(ex);
+ // }
+
+ // // Update the list of mail domains
+ // refreshButton_Click(this, new EventArgs());
+ // }
+ //};
+ }
+
+ private void deleteMenuItem_Click(object sender, EventArgs e) {
+ if (this.clickedItem != null) {
+ // Prompt the user to confirm deletion
+ DialogResult result = MessageBox.Show(
+ this,
+ string.Format("Really delete message: '{0}'?", this.clickedItem.Envelope.Subject),
+ "Confirm delete...",
+ MessageBoxButtons.YesNo,
+ MessageBoxIcon.Warning,
+ MessageBoxDefaultButton.Button2);
+
+ if (result == DialogResult.Yes) {
+ // Attempt to delete the message
+ try {
+ throw new NotImplementedException("Sorry - currently can't delete a spooled message!");
+ } catch (Exception ex) {
+ Program.ShowExceptionDialog(ex);
+ }
+
+ // Update the list of mail domains
+ refreshButton_Click(this, new EventArgs());
+ }
+ }
+ }
+ }
+
+ public class SpoolEnvelopeListViewItem : ListViewItem {
+
+ public SpoolEnvelopeListViewItem(SpoolEnvelope envelope) {
+ this.envelope = envelope;
+ this.ImageIndex = 0;
+
+ this.SubItems[0] = new ListViewSubItem(this, envelope.SpoolMessageId.ToString());
+ this.SubItems.Add(new ListViewSubItem(this, envelope.InProgress.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, envelope.Filtered.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, envelope.Subject));
+ this.SubItems.Add(new ListViewSubItem(this, envelope.SourceAddress.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, envelope.ReportedHost.ToString()));
+ this.SubItems.Add(new ListViewSubItem(this, envelope.Sender.ToString()));
+
+ string recipients = string.Empty;
+ foreach (SmtpMessageRecipient recipient in envelope.Recipients) {
+ recipients += recipient.Address.ToString() + "; ";
+ }
+ this.SubItems.Add(new ListViewSubItem(this, recipients));
+ }
+
+ private SpoolEnvelope envelope;
+
+ public SpoolEnvelope Envelope {
+ get { return envelope; }
+ }
+ }
+}
Added: NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.resx
===================================================================
--- NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.resx (rev 0)
+++ NMail/trunk/NMail.Administration.WinForms/Spool/SmtpSpoolManager.resx 2007-06-10 14:34:21 UTC (rev 217)
@@ -0,0 +1,126 @@
+<?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>
+ <metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <metadata name="spoolContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>116, 17</value>
+ </metadata>
+</root>
\ No newline at end of file
Modified: NMail/trunk/NMail.Icons/NMail.Icons.csproj
===================================================================
--- NMail/trunk/NMail.Icons/NMail.Icons.csproj 2007-06-10 14:33:07 UTC (rev 216)
+++ NMail/trunk/NMail.Icons/NMail.Icons.csproj 2007-06-10 14:34:21 UTC (rev 217)
@@ -59,6 +59,8 @@
<EmbeddedResource Include="Resources\32x32\apps\password.png" />
<EmbeddedResource Include="Resources\16x16\actions\delete.png" />
<EmbeddedResource Include="Resources\16x16\actions\edit.png" />
+ <EmbeddedResource Include="Resources\16x16\actions\recur.png" />
+ <EmbeddedResource Include="Resources\16x16\actions\mail_generic.png" />
<Content Include="Resources\LGPL.txt" />
</ItemGroup>
<ItemGroup>
Added: NMail/trunk/NMail.Icons/Resources/16x16/actions/mail_generic.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Icons/Resources/16x16/actions/mail_generic.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/NMail.Icons/Resources/16x16/actions/recur.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/NMail.Icons/Resources/16x16/actions/recur.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-10 14:33:05
|
Revision: 216
http://svn.sourceforge.net/nmailserver/?rev=216&view=rev
Author: tmyroadctfig
Date: 2007-06-10 07:33:07 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
Moved ServiceStartInfo.
Added Paths:
-----------
NMail/trunk/NMail/DataTypes/Service/ServiceStartInfo.cs
Added: NMail/trunk/NMail/DataTypes/Service/ServiceStartInfo.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Service/ServiceStartInfo.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Service/ServiceStartInfo.cs 2007-06-10 14:33:07 UTC (rev 216)
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2004-2006 Luke Quinane and Daniel Frampton
+ *
+ * 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.Diagnostics;
+
+namespace NMail.DataTypes.Service {
+ /// <summary>
+ /// Specifies the details of a service to start.
+ /// </summary>
+ public class ServiceStartInfo : MarshalByRefObject {
+ /// <summary>
+ /// Creates a new service start infomation object.
+ /// </summary>
+ /// <param name="service">The service to start.</param>
+ /// <param name="automatic">True if the service should be started when the system starts.</param>
+ public ServiceStartInfo(IService service, bool automatic) {
+ this.service = service;
+ this.automaticStart = automatic;
+ }
+
+ private IService service;
+
+ /// <summary>
+ /// The service to start.
+ /// </summary>
+ public IService Service {
+ get {
+ return this.service;
+ }
+ set {
+ this.service = value;
+ }
+ }
+
+ private bool automaticStart;
+
+ /// <summary>
+ /// Should the service be started automatically on system start?
+ /// </summary>
+ public bool AutomaticStart {
+ get {
+ return this.automaticStart;
+ }
+ set {
+ this.automaticStart = value;
+ }
+ }
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-10 14:32:18
|
Revision: 215
http://svn.sourceforge.net/nmailserver/?rev=215&view=rev
Author: tmyroadctfig
Date: 2007-06-10 07:32:15 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
Moved ServiceStartInfo. Added serializable tag to some classes.
Modified Paths:
--------------
NMail/trunk/NMail/Configuration/NMailConfiguration.cs
NMail/trunk/NMail/DataTypes/Classification.cs
NMail/trunk/NMail/DataTypes/DeliveryBatch.cs
NMail/trunk/NMail/DataTypes/DeliveryResult.cs
NMail/trunk/NMail/DataTypes/DeliveryResultType.cs
NMail/trunk/NMail/DataTypes/LatLong.cs
NMail/trunk/NMail/DataTypes/LocalStore/LocalStoreDelivery.cs
NMail/trunk/NMail/DataTypes/MimeContentTransferEncoding.cs
NMail/trunk/NMail/DataTypes/MimeContentType.cs
NMail/trunk/NMail/DataTypes/RecipientDeliveryResult.cs
NMail/trunk/NMail/DataTypes/SmtpDeliveryResult.cs
NMail/trunk/NMail/DataTypes/SmtpMessage.cs
NMail/trunk/NMail/DataTypes/SmtpMessageRecipient.cs
NMail/trunk/NMail/NMail.csproj
Removed Paths:
-------------
NMail/trunk/NMail/DataTypes/ServiceStartInfo.cs
Modified: NMail/trunk/NMail/Configuration/NMailConfiguration.cs
===================================================================
--- NMail/trunk/NMail/Configuration/NMailConfiguration.cs 2007-06-10 03:37:14 UTC (rev 214)
+++ NMail/trunk/NMail/Configuration/NMailConfiguration.cs 2007-06-10 14:32:15 UTC (rev 215)
@@ -23,6 +23,7 @@
using NMail.Authentication;
using NMail.DataTypes;
using NMail.DataTypes.LocalStore;
+using NMail.DataTypes.Service;
using NMail.DataTypes.Spool;
using NMail.Helper;
Modified: NMail/trunk/NMail/DataTypes/Classification.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Classification.cs 2007-06-10 03:37:14 UTC (rev 214)
+++ NMail/trunk/NMail/DataTypes/Classification.cs 2007-06-10 14:32:15 UTC (rev 215)
@@ -20,6 +20,7 @@
using System.Text;
namespace NMail.DataTypes {
+ [Serializable]
public enum Classification {
Public,
Modified: NMail/trunk/NMail/DataTypes/DeliveryBatch.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/DeliveryBatch.cs 2007-06-10 03:37:14 UTC (rev 214)
+++ NMail/trunk/NMail/DataTypes/DeliveryBatch.cs 2007-06-10 14:32:15 UTC (rev 215)
@@ -22,6 +22,7 @@
/// <summary>
/// Represents a batch of messages to be delivered to a single host.
/// </summary>
+ [Serializable]
public class DeliveryBatch {
/// <summary>
/// The host to deliver to.
Modified: NMail/trunk/NMail/DataTypes/DeliveryResult.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/DeliveryResult.cs 2007-06-10 03:37:14 UTC (rev 214)
+++ NMail/trunk/NMail/DataTypes/DeliveryResult.cs 2007-06-10 14:32:15 UTC (rev 215)
@@ -21,6 +21,7 @@
/// <summary>
/// Represents the results of a delivery attempt.
/// </summary>
+ [Serializable]
public class DeliveryResult {
protected DeliveryResultType type;
Modified: NMail/trunk/NMail/DataTypes/DeliveryResultType.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/DeliveryResultType.cs 2007-06-10 03:37:14 UTC (rev 214)
+++ NMail/trunk/NMail/DataTypes/DeliveryResultType.cs 2007-06-10 14:32:15 UTC (rev 215)
@@ -21,6 +21,7 @@
/// <summary>
/// Details the result of an attempt to deliver a message.
/// </summary>
+ [Serializable]
public enum DeliveryResultType {
/// <summary>
/// Success.
Modified: NMail/trunk/NMail/DataTypes/LatLong.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/LatLong.cs 2007-06-10 03:37:14 UTC (rev 214)
+++ NMail/trunk/NMail/DataTypes/LatLong.cs 2007-06-10 14:32:15 UTC (rev 215)
@@ -20,6 +20,7 @@
using System.Text;
namespace NMail.DataTypes {
+ [Serializable]
public struct LatLong {
public float Lat;
Modified: NMail/trunk/NMail/DataTypes/LocalStore/LocalStoreDelivery.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/LocalStore/LocalStoreDelivery.cs 2007-06-10 03:37:14 UTC (rev 214)
+++ NMail/trunk/NMail/DataTypes/LocalStore/LocalStoreDelivery.cs 2007-06-10 14:32:15 UTC (rev 215)
@@ -26,6 +26,7 @@
/// <summary>
/// Summary description for LocalStoreDelivery.
/// </summary>
+ [Serializable]
public class LocalStoreDelivery {
public LocalStoreDelivery(SmtpMessageRecipient recipient, Folder nominalTargetFolder) {
Modified: NMail/trunk/NMail/DataTypes/MimeContentTransferEncoding.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/MimeContentTransferEncoding.cs 2007-06-10 03:37:14 UTC (rev 214)
+++ NMail/trunk/NMail/DataTypes/MimeContentTransferEncoding.cs 2007-06-10 14:32:15 UTC (rev 215)
@@ -21,6 +21,7 @@
/// <summary>
/// The valid MIME content transfer encodings.
/// </summary>
+ [Serializable]
public enum MimeContentTransferEncoding {
/// <summary>
/// Seven bit ASCII.
Modified: NMail/trunk/NMail/DataTypes/MimeContentType.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/MimeContentType.cs 2007-06-10 03:37:14 UTC (rev 214)
+++ NMail/trunk/NMail/DataTypes/MimeContentType.cs 2007-06-10 14:32:15 UTC (rev 215)
@@ -21,6 +21,7 @@
/// <summary>
/// The valid MIME content types.
/// </summary>
+ [Serializable]
public enum MimeContentType {
/// <summary>
/// No MIME type was specified. A part with this type should be treated
Modified: NMail/trunk/NMail/DataTypes/RecipientDeliveryResult.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/RecipientDeliveryResult.cs 2007-06-10 03:37:14 UTC (rev 214)
+++ NMail/trunk/NMail/DataTypes/RecipientDeliveryResult.cs 2007-06-10 14:32:15 UTC (rev 215)
@@ -21,6 +21,7 @@
/// <summary>
/// Details the delivery result for a single recipient.
/// </summary>
+ [Serializable]
public class RecipientDeliveryResult : DeliveryResult {
private SmtpMessageRecipient recipient;
Deleted: NMail/trunk/NMail/DataTypes/ServiceStartInfo.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/ServiceStartInfo.cs 2007-06-10 03:37:14 UTC (rev 214)
+++ NMail/trunk/NMail/DataTypes/ServiceStartInfo.cs 2007-06-10 14:32:15 UTC (rev 215)
@@ -1,66 +0,0 @@
-/*
- * Copyright 2004-2006 Luke Quinane and Daniel Frampton
- *
- * 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.Diagnostics;
-
-using NMail.DataTypes.Service;
-
-namespace NMail.DataTypes {
- /// <summary>
- /// Specifies the details of a service to start.
- /// </summary>
- public class ServiceStartInfo : MarshalByRefObject {
- /// <summary>
- /// Creates a new service start infomation object.
- /// </summary>
- /// <param name="service">The service to start.</param>
- /// <param name="automatic">True if the service should be started when the system starts.</param>
- public ServiceStartInfo(IService service, bool automatic) {
- this.service = service;
- this.automaticStart = automatic;
- }
-
- private IService service;
-
- /// <summary>
- /// The service to start.
- /// </summary>
- public IService Service {
- get {
- return this.service;
- }
- set {
- this.service = value;
- }
- }
-
- private bool automaticStart;
-
- /// <summary>
- /// Should the service be started automatically on system start?
- /// </summary>
- public bool AutomaticStart {
- get {
- return this.automaticStart;
- }
- set {
- this.automaticStart = value;
- }
- }
- }
-}
Modified: NMail/trunk/NMail/DataTypes/SmtpDeliveryResult.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/SmtpDeliveryResult.cs 2007-06-10 03:37:14 UTC (rev 214)
+++ NMail/trunk/NMail/DataTypes/SmtpDeliveryResult.cs 2007-06-10 14:32:15 UTC (rev 215)
@@ -23,6 +23,7 @@
/// <summary>
/// Details the results of a delivery attempt of a SMTP message.
/// </summary>
+ [Serializable]
public class SmtpDeliveryResult {
/// <summary>
/// A list of results for the recipients of the message.
Modified: NMail/trunk/NMail/DataTypes/SmtpMessage.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/SmtpMessage.cs 2007-06-10 03:37:14 UTC (rev 214)
+++ NMail/trunk/NMail/DataTypes/SmtpMessage.cs 2007-06-10 14:32:15 UTC (rev 215)
@@ -30,6 +30,7 @@
/// sender and recipients that the message will be delivered to. The Message class
/// contains the message data that is displayed in the user's email client.
/// </remarks>
+ [Serializable]
public class SmtpMessage {
/// <summary>
/// Creates a new SMTP message.
Modified: NMail/trunk/NMail/DataTypes/SmtpMessageRecipient.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/SmtpMessageRecipient.cs 2007-06-10 03:37:14 UTC (rev 214)
+++ NMail/trunk/NMail/DataTypes/SmtpMessageRecipient.cs 2007-06-10 14:32:15 UTC (rev 215)
@@ -21,6 +21,7 @@
/// <summary>
/// A recipient of a SMTP message.
/// </summary>
+ [Serializable]
public class SmtpMessageRecipient {
/// <summary>
/// Creates a new message recipient.
Modified: NMail/trunk/NMail/NMail.csproj
===================================================================
--- NMail/trunk/NMail/NMail.csproj 2007-06-10 03:37:14 UTC (rev 214)
+++ NMail/trunk/NMail/NMail.csproj 2007-06-10 14:32:15 UTC (rev 215)
@@ -225,7 +225,7 @@
<Compile Include="DataTypes\RecipientDeliveryResult.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="DataTypes\ServiceStartInfo.cs">
+ <Compile Include="DataTypes\Service\ServiceStartInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="DataTypes\Service\IService.cs" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-10 03:37:13
|
Revision: 214
http://svn.sourceforge.net/nmailserver/?rev=214&view=rev
Author: tmyroadctfig
Date: 2007-06-09 20:37:14 -0700 (Sat, 09 Jun 2007)
Log Message:
-----------
Added some checks to local store to prevent initial mail domain from being deleted.
Modified Paths:
--------------
NMail/trunk/NMail.LocalStore/LocalStore.cs
Modified: NMail/trunk/NMail.LocalStore/LocalStore.cs
===================================================================
--- NMail/trunk/NMail.LocalStore/LocalStore.cs 2007-06-10 03:34:19 UTC (rev 213)
+++ NMail/trunk/NMail.LocalStore/LocalStore.cs 2007-06-10 03:37:14 UTC (rev 214)
@@ -1273,7 +1273,7 @@
/// <param name="authToken">The authentication credentials.</param>
/// <param name="mailDomainId">The Id of the mail domain to delete.</param>
public void DeleteMailDomain(IAuthenticationToken authToken, int mailDomainId) {
- if (hasSystemPrivilege(authToken.Username, SystemPrivilege.DeleteMailDomain)) {
+ if (mailDomainId != 1 && hasSystemPrivilege(authToken.Username, SystemPrivilege.DeleteMailDomain)) {
this.LocalStoreData.DeleteMailDomain(mailDomainId);
} else {
@@ -1288,6 +1288,12 @@
/// <param name="mailDomain">The mail domain to update.</param>
public void UpdateMailDomain(IAuthenticationToken authToken, MailDomain mailDomain) {
if (hasSystemPrivilege(authToken.Username, SystemPrivilege.UpdateMailDomain)) {
+
+ // Ensure the first mail domain is for localhost
+ if (mailDomain.MailDomainId == 1 && mailDomain.PrimaryHost != Domain.LocalHost) {
+ throw new InvalidOperationException("Not permitted to alter this mail domain's primary host.");
+ }
+
this.LocalStoreData.UpdateMailDomain(mailDomain);
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-06-10 03:34:16
|
Revision: 213
http://svn.sourceforge.net/nmailserver/?rev=213&view=rev
Author: tmyroadctfig
Date: 2007-06-09 20:34:19 -0700 (Sat, 09 Jun 2007)
Log Message:
-----------
Added descriptions to mail domain members.
Modified Paths:
--------------
NMail/trunk/NMail/DataTypes/LocalStore/MailDomain.cs
Modified: NMail/trunk/NMail/DataTypes/LocalStore/MailDomain.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/LocalStore/MailDomain.cs 2007-06-10 03:33:59 UTC (rev 212)
+++ NMail/trunk/NMail/DataTypes/LocalStore/MailDomain.cs 2007-06-10 03:34:19 UTC (rev 213)
@@ -17,6 +17,7 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Text;
using NMail;
@@ -50,6 +51,9 @@
/// <summary>
/// Gets and set the mail domain Id for this mail domain.
/// </summary>
+ [Browsable(false)]
+ [Category("Configuration")]
+ [Description("The Id for this mail domain.")]
public int MailDomainId {
get {
return this.mailDomainId;
@@ -64,6 +68,8 @@
/// <summary>
/// The main host that this domain accepts mail for.
/// </summary>
+ [Category("Configuration")]
+ [Description("The main host that this mail domain accepts mail for.")]
public Host PrimaryHost {
get {
return this.primaryHost;
@@ -78,6 +84,8 @@
/// <summary>
/// A list of Ids for users that are members of this mail domain.
/// </summary>
+ [Category("Membership")]
+ [Description("A list of Ids for users that are members of this mail domain.")]
public IList<int> UserIds {
get {
return this.mailDomainUserIds;
@@ -92,6 +100,8 @@
/// <summary>
/// A list of Ids for groups that are members of this mail domain.
/// </summary>
+ [Category("Membership")]
+ [Description("A list of Ids for groups that are members of this mail domain.")]
public IList<int> GroupIds {
get {
return this.mailDomainGroupIds;
@@ -106,6 +116,8 @@
/// <summary>
/// Other hosts that this domain accepts mail for.
/// </summary>
+ [Category("Configuration")]
+ [Description("Other hosts that this domain accepts mail for.")]
public IList<WildcardHost> AdditionalHosts {
get {
return this.additionalHosts;
@@ -113,13 +125,15 @@
set {
this.additionalHosts = value;
}
- }
+ }
private IList<ILocalStoreUserMap> mailboxMappings = new List<ILocalStoreUserMap>();
/// <summary>
/// Gets the mailbox mappings for this domain.
/// </summary>
+ [Category("Configuration")]
+ [Description("The mailbox mappings for this domain.")]
public IList<ILocalStoreUserMap> MailboxMappings {
get {
return this.mailboxMappings;
@@ -131,6 +145,8 @@
/// <summary>
/// The actions that user's of this domain are allowed to use.
/// </summary>
+ [Category("Actions")]
+ [Description("The actions that user's of this domain are allowed to use.")]
public IList<ILocalStoreDeliveryAction> AllowedActions {
get {
return this.allowedActions;
@@ -142,6 +158,8 @@
/// <summary>
/// The validators that user's of this domain are allowed to use.
/// </summary>
+ [Category("Actions")]
+ [Description("The validators that user's of this domain are allowed to use.")]
public IList<ILocalStoreRecipientValidator> AllowedValidators {
get {
return this.allowedValidators;
@@ -153,6 +171,8 @@
/// <summary>
/// The default set of actions to apply to incoming messages.
/// </summary>
+ [Category("Actions")]
+ [Description("The default set of actions to apply to incoming messages.")]
public IList<ILocalStoreDeliveryAction> DefaultActions {
get {
return this.defaultActions;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|