You can configure different mail servers and accounts to use in other services. Learn about the different mail service authentication options and how to set them up for censhare.


Basic Mail Service Authentication

The configuration can be found in the censhare Admin Client under Configuration | Services | E-Mail.

Properties overview

  • Name - This is used as a label for your e-mail server settings and account and will be used as a reference in other configurations later. The first entry is labeled with "corpus" as this is already used by default at other internal services in censhare (e.g. sending passwords to users)

  • Store protocol - If you use a service to fetch e-mails, you can choose the protocol to be used for it. The options are pop3, pop3s, imap, imaps

  • Transport protocol - If you use a service to send e-mails, you can choose the protocol to be used for it. The options are smtp, smtps, imap, imaps

  • mail.from - The return e-mail address.

  • mail..host - The POP3/SMTP/IMAP server to connect to.

    • mail.pop3.host

    • mail.pop3s.host

    • mail.smtp.host

    • mail.smtps.host

    • mail.imap.host

    • mail.imaps.host

  • mail..ssl.trust - When using SSL, if set to "*", all hosts are trusted. If set to a whitespace-separated list of hosts, those hosts are trusted. If not set, you have to add trustworthy certificates of the server to the truststore.

    • mail.pop3s.ssl.trust

    • mail.smtps.ssl.trust

    • mail.imaps.ssl.trust

  • mail..port - A specific connect port for the mail host.

    • mail.pop3.port - The POP3 server port to connect to. Defaults to 110

    • mail.pop3s.port - The POP3s server port to connect to. Defaults to 995

    • mail.smtp.port - The SMTP server port to connect to. Defaults to 25

    • mail.smtps.port - The SMTPs server port to connect to. Defaults to 465

    • mail.imap.port - The IMAP server port to connect to. Defaults to 143

    • mail.imaps.port - The IMAPs server port to connect to. Defaults to 993

  • mail.smtp.auth - If set to false, no authentication to the mailserver is used and the censhare-Server IP should be allowed to relay with the mailserver. Also, mail.smtp.user and mail.smtp.password have to be removed to fully deactivate authentication.

  • mail..user - Default user name for POP3/SMTP/IMAP. If you don't use authentication, remove this property.

    • mail.pop3.user

    • mail.pop3s.user

    • mail.smtp.user

    • mail.smtps.user

    • mail.imap.user

    • mail.imaps.user

  • mail..password - Password for the given user. If you don't use authentication, remove this property.

    • mail.pop3.password

    • mail.pop3s.password

    • mail.smtp.password

    • mail.smtps.password

    • mail.imap.password

    • mail.imaps.password

  • mail..connectiontimeout - Socket connection timeout value in milliseconds. This timeout is implemented by java.net.Socket. Default is an infinite timeout.

    • mail.pop3.connectiontimeout

    • mail.smtp.connectiontimeout

    • mail.imap.connectiontimeout

  • mail..timeout - Socket read timeout value in milliseconds. This timeout is implemented by java.net.Socket. Default is an infinite timeout.

    • mail.pop3.timeout

    • mail.smtp.timeout

    • mail.imap.timeout

  • mail.debug - Gives out more debug messages to the server log

Modern Mail Service Authentication

Modern mail service authentication provides for modern mail providers. Currently, the censhare mail server system provides Microsoft Graph API as an external mail service. 

Microsoft Graph

Microsoft Graph is the gateway to data and intelligence in Microsoft 365. It provides a unified programmability model that you can use to access data in Microsoft 365, Windows, and Enterprise Mobility + Security. Use the wealth of data in Microsoft Graph to build apps for organizations and consumers that interact with millions of users. You can use any Microsoft service through Microsoft Graph API, including mail services, teams, calendars, etc. 



Basic Authentication and Exchange Online – September 2021 Update 

Microsoft announced disabling Basic Authentication for Exchange Online. Therefore, Microsft provides Microsoft Graph API to generate credentials to use Modern Authentication on Exchange Online with modern technology.

Prerequisites

Mail service - RPM-based installation

Sub page - for developers

Configuration 

The configuration can be found in the censhare Admin Client under Configuration | Services | E-Mail.


Properties overview

  • client.id - ID of the external e-mail service provider's client ID
  • client.secret - the client secret of the external mail service provider
  • tenant.id - ID of the tenant that is used
  • user.id  - user ID of the external mail service provider
  • mail.server - IP address of the computer that is running the mail service 
  • mail.from - mail address of user.id

Application Registration

Microsoft Graph API requires some application registration and configuration to authenticate and use as an external mail system.

To create an application registration, see Microsoft Docs and find more details in Mail Service app registration for OAuth 2.0.