# Deploy Docker Mailserver with Easypanel

URL: /templates/docker-mailserver

A fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) running inside a container. It provides a complete email solution with features like spam filtering, virus scanning, and secure email delivery.

## Installation notes

Follow the guide to configure the mail server with environment variables.

## Benefits

### Complete Email Solution

Docker Mailserver provides a full-featured email server with SMTP, IMAP, and LDAP support. It includes all the essential components needed for a production-ready email system.

### Advanced Security Features

Built-in support for ClamAV antivirus, SpamAssassin spam filtering, and Fail2ban protection ensures your email server is secure and protected against common threats.

### Easy Deployment and Maintenance

As a Docker container, it's easy to deploy and maintain. The configuration is simple and version-controlled, making it perfect for both development and production environments.

## Features

### SMTP and IMAP Support

Full support for SMTP (port 25), IMAP (port 143), Submission (port 587), and IMAPS (port 993) protocols, making it compatible with all standard email clients.

### Antivirus and Spam Protection

Integrated ClamAV antivirus and SpamAssassin spam filtering provide comprehensive protection against malicious content and unwanted emails.

### Security Features

Includes Fail2ban protection against brute force attacks and Postgrey greylisting to reduce spam. Supports Let's Encrypt for SSL certificates.

### LDAP Integration

Built-in LDAP support allows for easy integration with existing directory services and user management systems.

### Customizable Configuration

Extensive configuration options through environment variables allow you to customize the server to your specific needs.

### Persistent Storage

Uses Docker volumes for persistent storage of mail data, logs, and SSL certificates, ensuring data is preserved across container restarts.

## Configuration

- `appServiceName` (App Service Name, required): mailserver

- `appServiceImage` (App Service Image, required): docker.io/mailserver/docker-mailserver:v15.1.0

- `hostname` (Hostname, required): mail.example.com

- `relayHost` (Relay Host, required): smtp.example.com

- `relayPort` (Relay Port, required): 587

- `relayUser` (Relay User, required): user

- `relayPassword` (Relay Password, required): password

## Services

- mailserver: app (docker.io/mailserver/docker-mailserver:v15.1.0)

## Resources

- [Github](https://github.com/docker-mailserver/docker-mailserver)

- [Guide](https://github.com/docker-mailserver/docker-mailserver/blob/master/mailserver.env)

- [Template source](https://github.com/easypanel-io/templates/tree/main/templates/docker-mailserver)