Email Server LANMailServer

IMAP, POP3, and SMTP for Local Networks with Autoresponder and Email Distribution Groups

 

Online help for LANMailServer

Email Server for Local Networks POP3 IMAP4 IMAP with Autoresponder, SMTP Relay Server, Email Distribution Groups, OAuth2 Support
 
 

In an email program, the server name for POP3/IMAP and SMTP is entered. When accessing via SSL, the server name must match the name in the SSL certificate; otherwise, the error "Target principal name is incorrect" will be displayed during access. LANMailServer is installed on a regular Windows computer (workstation or server), and this Windows computer has a name that can be used as the server name within the network. The SSL certificate must be issued for the server name to avoid errors in the email program.

Create Your Own SSL Certificate

Windows software OpenSSL is required to create the certificate. You can download the 32-bit or 64-bit Windows version from https://slproweb.com/products/Win32OpenSSL.html and then install it. It's best to install the software directly into C:\OpenSSL, D:\OpenSSL, etc., as the software is a console application without a graphical user interface, making it easier to navigate to the folder via the console. In this example, the software was installed to E:\OpenSSL-Win32.

 

  • Create a folder named "lanmailserver" in Windows Explorer, preferably directly in the root directory of drive C:, D:, E:, etc., as this saves time when typing.
  • Open the Command Prompt, navigate to the drive where OpenSSL is installed, then to the OpenSSL installation folder, and then to the bin subfolder.
  • Enter:

    openssl req -new -days 9999 -newkey rsa:4096bits -sha512 -x509 -nodes -passin pass:<password> -passout pass:<password> -out <drive>:\lanmailserver\lanmailserver.crt -keyout <drive>:\lanmailserver\lanmailserver.pem

    Replace <password> with a password without spaces, avoiding special characters or umlauts. Both passwords must be the same.
    Replace <drive> with the drive containing the "lanmailserver" folder.

    The -days parameter was set to 9999 so the certificate will be valid for 9999 days. If fewer days are specified, a new certificate will need to be created after expiration.


  • Press ENTER to begin generating a private key.
  • You will be prompted for various information. The most important detail is " Common Name (e.g. server FQDN or YOUR name)," where the correct email server name must be entered. This is the name that must later be entered in the email program. All other information can be provided, but avoid umlauts and special characters. Simply press ENTER/RETURN to accept default values.
  • Type "Exit" to close the Command Prompt.
  • In the LANMailServer settings, select the option for a custom SSL certificate, choose the files lanmailserver.crt and lanmailserver.pem located in <drive>:\lanmailserver, and enter the <password>. The files and folder <drive>:\lanmailserver must not be deleted.

 

Adding the Certificate to Trusted Root Certificates

  1. Press the Windows Key + R to open the Windows Run dialog.
  2. Type certmgr.msc in the Run dialog and click OK.
  3. In the Certificate Manager, select Trusted Root Certification Authorities and then Certificates on the left.
  4. Under the Action menu, select Import.
  5. Select the certificate lanmailserver.crt from the folder <drive>:\lanmailserver and let it import.
  6. On each computer that requires SSL access to LANMailServer, importing into Trusted Root Certificates may be necessary.

 

 

Simple Example: For the server name lanmailserver.de, OpenSSL was installed on drive E:\OpenSSL-Win32, and the password used is "GEHEIM":

In the email program, lanmailserver.de must be entered as the POP3 or IMAP4 and SMTP server for this example. Only this name can be used with the SSL certificate. If the server name is not correctly entered, the email program will display the error "Target principal name is incorrect."

 

Settings in LANMailServer:

 

In Windows Explorer, you can directly click on the file lanmailserver.crt to view details about the server name and validity.

 

 

 

Manual last updated: Sun, 30 Mar 2025 22:06:38 +0100

Manual as complete RSS feed: Manual as RSS feed

Manual localized with Microsoft Copilot

Erstellt mit RSSWriter https://www.rsswriter.de