Hermes.dpr
上传用户:dh8233980
上传日期:2014-10-16
资源大小:1015k
文件大小:5k
源码类别:

Email服务器

开发平台:

Delphi

  1. program Hermes;
  2. (******************************************************************************)
  3. (*                                                                            *)
  4. (* Hermes Project                                                             *)
  5. (* Part of Hermes SMTP/POP3 Server.                                           *)
  6. (* Copyright(C) 2000 by Alexander J. Fanti, All Rights Reserver Worldwide.    *)
  7. (*                                                                            *)
  8. (* Created January 10, 2000 by Alexander J. Fanti.  See License.txt           *)
  9. (*                                                                            *)
  10. (* Hermes is a SMTP/POP3 EMail server.                                        *)
  11. (*                                                                            *)
  12. (* Please reference the following RFCs:                                       *)
  13. (*   RFC 821  - Simple Mail Transfer Protocol                                 *)
  14. (*   RFC 974  - Mail Routing and the Domain System                            *)
  15. (*   RFC 1725 - Post Office Protocol - Version 3                              *)
  16. (*   RFC 822  - Standard for the Format of ARPA Internet Text Messages        *)
  17. (*   RFC 1321 - The MD5 Message-Digest Algorithm                              *)
  18. (*                                                                            *)
  19. (* First Public Release: February 1, 2000  version 1.1.0.1                    *)
  20. (*                                                                            *)
  21. (******************************************************************************)
  22. uses
  23.   Forms,
  24.   Windows,
  25.   Dialogs,
  26.   Main in 'Main.pas' {frmMain},
  27.   About in 'About.pas' {frmAbout},
  28.   UtilU1 in 'UtilU1.pas',
  29.   License in 'License.pas' {frmLicense},
  30.   Pop3Server in 'Pop3Server.pas',
  31.   Settings_Pop3Server in 'Settings_Pop3Server.pas' {frmSettings_Pop3Server},
  32.   DataU1 in 'DataU1.pas',
  33.   ManageUsers in 'ManageUsers.pas' {frmManageUsers},
  34.   AddEditUser in 'AddEditUser.pas' {frmAddEditUser},
  35.   SmtpServer in 'SmtpServer.pas',
  36.   Settings_SmtpServer in 'Settings_SmtpServer.pas' {frmSettings_SmtpServer},
  37.   SmtpAgent in 'SmtpAgent.pas',
  38.   Settings_General in 'Settings_General.pas' {frmSettings_General},
  39.   ManageMailLists in 'ManageMailLists.pas' {frmManageMailLists},
  40.   AddEditMailList in 'AddEditMailList.pas' {frmAddEditMailList},
  41.   ManageAliases in 'ManageAliases.pas' {frmManageAliases},
  42.   AddEditAlias in 'AddEditAlias.pas' {frmAddEditAlias},
  43.   ChooseUser in 'ChooseUser.pas' {frmChooseUser},
  44.   MailRouting in 'MailRouting.pas',
  45.   Splash in 'Splash.pas' {frmSplash},
  46.   Settings_SmtpAgent in 'Settings_SmtpAgent.pas' {frmSettings_SmtpAgent},
  47.   FirstTime in 'FirstTime.pas' {frmFirstTime},
  48.   ViewMailListArchive in 'ViewMailListArchive.pas' {frmViewMailListArchive},
  49.   CloseQuery in 'CloseQuery.pas' {frmCloseQuery},
  50.   Settings_SmtpServerAccessControl in 'Settings_SmtpServerAccessControl.pas' {frmSettings_SmtpServerAccessControl};
  51. {$R *.RES}
  52. var
  53.   HermesMutex : integer;
  54. begin
  55.   // Create a Mutex to prevent multiple copies from being run...
  56.   HermesMutex := CreateMutex(nil, True, 'Hermes SMTP/POP3 Server');
  57.   if GetLastError = ERROR_ALREADY_EXISTS then begin
  58.     {Send all windows our custom message - only our other}
  59.     {instance will recognise it, and restore itself... then quit}
  60.     SendMessage(HWND_BROADCAST, RegisterWindowMessage('HermesRestore'), 0, 0);
  61.     Halt(0);
  62.   end;
  63.   Application.Initialize;
  64.   frmSplash := TfrmSplash.Create(Application);  // Create Splash
  65.   frmSplash.Show;                               // Show Splash
  66.   frmSplash.Refresh;
  67.   Application.Title := 'Hermes SMTP/POP3 Server';
  68.   Application.ShowMainForm := False;
  69.   Application.CreateForm(TfrmMain, frmMain);
  70.   Application.CreateForm(TfrmAbout, frmAbout);
  71.   Application.CreateForm(TfrmLicense, frmLicense);
  72.   Application.CreateForm(TfrmSettings_Pop3Server, frmSettings_Pop3Server);
  73.   Application.CreateForm(TfrmManageUsers, frmManageUsers);
  74.   Application.CreateForm(TfrmAddEditUser, frmAddEditUser);
  75.   Application.CreateForm(TfrmSettings_SmtpServer, frmSettings_SmtpServer);
  76.   Application.CreateForm(TfrmSettings_General, frmSettings_General);
  77.   Application.CreateForm(TfrmManageMailLists, frmManageMailLists);
  78.   Application.CreateForm(TfrmAddEditMailList, frmAddEditMailList);
  79.   Application.CreateForm(TfrmManageAliases, frmManageAliases);
  80.   Application.CreateForm(TfrmAddEditAlias, frmAddEditAlias);
  81.   Application.CreateForm(TfrmChooseUser, frmChooseUser);
  82.   Application.CreateForm(TfrmSettings_SmtpAgent, frmSettings_SmtpAgent);
  83.   Application.CreateForm(TfrmViewMailListArchive, frmViewMailListArchive);
  84.   Application.CreateForm(TfrmCloseQuery, frmCloseQuery);
  85.   Application.CreateForm(TfrmSettings_SmtpServerAccessControl, frmSettings_SmtpServerAccessControl);
  86.   frmSplash.Timer1.Enabled := True;  // allow Splash to go away
  87.   Application.Run;
  88.   ReleaseMutex(HermesMutex);
  89. end.