Giter Club home page Giter Club logo

docker-mailserver / docker-mailserver Goto Github PK

View Code? Open in Web Editor NEW
13.3K 197.0 1.7K 22.12 MB

Production-ready fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) running inside a container.

Home Page: https://docker-mailserver.github.io/docker-mailserver/latest/

License: MIT License

Shell 96.42% Makefile 0.52% Dockerfile 2.29% Sieve 0.06% Python 0.29% C++ 0.07% PHP 0.02% NASL 0.13% BitBake 0.21%
docker mailserver mail postfix dovecot ldap fail2ban imap smtp antispam

docker-mailserver's Introduction

Docker Mailserver

ci::status docker::pulls documentation::badge

๐Ÿ“ƒ About

A production-ready fullstack but simple containerized mail server (SMTP, IMAP, LDAP, Anti-spam, Anti-virus, etc.).

  • Only configuration files, no SQL database. Keep it simple and versioned. Easy to deploy and upgrade.
  • Originally created by @tomav, this project is now maintained by volunteers since January 2021.

Tip

Be sure to read our documentation. It provides guidance on initial setup of your mail server.

Important

If you have issues, please search through the documentation for your version before opening an issue.

The issue tracker is for issues, not for personal support.
Make sure the version of the documentation matches the image version you're using!

๐Ÿ”— Links to Useful Resources

  1. FAQ
  2. Usage
  3. Examples
  4. Issues and Contributing
  5. Release Notes
  6. Environment Variables
  7. Updating

๐Ÿ“ฆ Included Services

docker-mailserver's People

Contributors

00angus avatar 17halbe avatar alinmear avatar allcontributors[bot] avatar ap-wtioit avatar casperklein avatar chikamichi avatar crazystick avatar dependabot[bot] avatar dominikwinter avatar erik-wramner avatar fbartels avatar georglauterbach avatar github-actions[bot] avatar gmasse avatar johansmitsnl avatar josef-friedrich avatar martin-schulze-vireso avatar norsegaud avatar omarc1492 avatar phish108 avatar polarathene avatar stonemaster avatar svenyonson avatar swiesend avatar tomav avatar tve avatar wernerfred avatar williamdes avatar youtous avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-mailserver's Issues

554 5.7.1 : Relay access denied

554 5.7.1 [email protected]: Relay access denied
And mail is not send out yet.

I checked internet, the possible cause might be auth for SMTP is missing. Recv side server might reject such mail without auth to prevent spam mail. And it seems smtp is not require auth.

But it look strange that my iphone works fine and can send email to outside mailbox.

My personal mail address [email protected].

generate self-signed ssl certificate - fails.

Heyho,
I follow your instructions with docker run -ti --rm -v "$(pwd)"/postfix/ssl:/ssl -h mail.my-domain.com -t tvial/docker-mailserver generate-ssl-certificate but it fails in the end with

Using configuration from /usr/lib/ssl/openssl.cnf
unable to load CA private key
140046222562976:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: ANY PRIVATE KEY
cat: /ssl/unite.travel-cert.pem: No such file or directory

Apparently it fails here

openssl ca -out /ssl/$FQDN-cert.pem -infiles /ssl/$FQDN-req.pem

Improvement on virtual

Hi,

Once again, thanks for your job. It's pretty amazing to get a full working postfix + clamav + spamassassin server.

Is it possible to separate virtual and vmailbox configuration?

I need to have a contact email that relays its email on several other adresses (such as gmail, outlook etc.). To do this, I didn't find any other way than connect me on the container and modify the virtual file.
Then postmap it and reload postfix configuration.

The problem is that the virtual file is recreated each time I start the container.

Is there a way to make a new conf file (added in the postfix folder on the host machine) to set the virtual emails ?

Alias not working

Hi, I am using your mail stack with docker-compose. It works great for smtp, but for receiving emails, I could not get it to work. I get always the message:

An error occurred while sending mail. The mail server responded: 5.1.1 [email protected]: Recipient address rejected: User unknown in virtual mailbox table. Please check the message recipient [email protected] and try again.

In my docker-compose, I have tried many aliases configurations, but any of them worked.
Any idea?

Error while generating SSL keys/cert

Hi,
I've been using your explanations to generate the certificates, with the docker container and the generate-ssl-certificate command. At the very end of the procedure I get:

Certificate is to be certified until Oct 21 13:34:19 2016 GMT (365 days)
Sign the certificate? [y/n]:y
failed to update database
TXT_DB error number 2

Most of my files has been generated, but the cert.pem file is empty:

drwxr-xr-x 6 root root 4096 oct.  22 15:33 demoCA/
-rw-r--r-- 1 root root    0 oct.  22 15:34 mail.mydomain.fr-cert.pem
-rw-r--r-- 1 root root 1708 oct.  22 15:34 mail.mydomain.fr-combined.pem
-rw-r--r-- 1 root root 1708 oct.  22 15:34 mail.mydomain.fr-key.pem
-rw-r--r-- 1 root root 1066 oct.  22 15:34 mail.mydomain.fr-req.pem

Do you have any idea where this comes from? What openssl command is perfomed by generate-ssl-certificate ? Thanks!

Jk.

User-Creation

I have some issues to make my mailserver work and i think it's due to my wrong user creation. I took your template and pasted in a new file accounts.cf under ./postfix and filled my data in there. somehow like this:

imap

username: [email protected]
password:
server: <123.132.123.123>
imap port: 993
imap path prefix: INBOX
auth method: md5 challenge-response

smtp

smtp port: 587
username: [email protected]
password:
auth method: md5 challenge-response

or is it supposed to be:

imap

username: [email protected]
password: mypassword
server: 123.132.123.123
imap port: 993
imap path prefix: INBOX
auth method: md5 challenge-response

smtp

smtp port: 587
username: [email protected]
password: mypassword
auth method: md5 challenge-response

either way, i cant connect a client to the server and when i send an e-mail to it, nothing is saved under /var/mail (also did postfix reload)
i could access the ports with telnet so i'm pretty shure something is wrong with the server-setup

How to install signed certs, and configure sub domain for domain delivery

Hi, I am pretty new to postfix, I was using iRedmail and didn't have to care about postfix configuration.
I need to dockerize my mail server, that's why after testing a bunch of image, I choosed your configuration.

Could you provide further information for

  • domain configuration
  • signed certs configuration

I have a mail server which is at mail.mydomain.com, I want it to be able to manage mail @mydomain.com

I also have wildcard certs from Gandi.
I want to use it for not having to confirm the security exception.
I was able to configure some nginx reverse proxy, iredmail and other SSL conf, but I will ask just for being sure because I can't make it work, if I should modify some files (eg: main.cf) and where

# postfix/ssl/mail.my-domain.com-key.pem (used in postfix)

This one seems to be the one key

# postfix/ssl/mail.my-domain.com-req.pem (only used to generate other files)

Don't know what it is

# postfix/ssl/mail.my-domain.com-cert.pem (used in postfix)

Seems to be the cert

# postfix/ssl/mail.my-domain.com-combined.pem (used in courier)

Seems to be the certs combined with gandi certs.

smtpd_proxy_filter - rejecting bad stuff and telling the sender about it

See http://www.postfix.org/SMTPD_PROXY_README.html

It's possible to configure postfix and amavis to pre-process email and reject it back, rather than the more standard way of accepting it and then deleting/tagging it.

It does have some con's - mainly around the max throughput. This isn't generally a problem on modern servers for small domains, but then again who knows who'll use your image. So it might not be appropriate.

So can you consider it? It's quite satisfying to reject spam at the outset, and it has the nice side-effect of bounce messages being sent back by the initiating mail server/person so a false positive has a better chance of being noticed.

Undelivered Mail Returned to Sender.

Hi,

I have setup the docker container on my server. Here is its diagnostic.

When I am trying to send a mail to an icloud email, I always get a mail saying that my mail hasn't been delivered:

This is the mail system at host mail.cnode.fr.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                  The mail system

<[email protected]>: host mx1.mail.icloud.com[17.158.8.68] said: 550 5.7.0
   Blocked - see
   https://support.proofpoint.com/dnsbl-lookup.cgi?ip=62.210.110.165:
   [email protected] (in reply to RCPT TO command)
Reporting-MTA: dns; mail.cnode.fr
X-Postfix-Queue-ID: 11227CE2
X-Postfix-Sender: rfc822; [email protected]
Arrival-Date: Thu,  1 Oct 2015 19:47:05 +0000 (UTC)

Final-Recipient: rfc822; [email protected]
Original-Recipient: rfc822;[email protected]
Action: failed
Status: 5.7.0
Remote-MTA: dns; mx1.mail.icloud.com
Diagnostic-Code: smtp; 550 5.7.0 Blocked - see
   https://support.proofpoint.com/dnsbl-lookup.cgi?ip=62.210.110.165:
   [email protected]

Do you have any idea why?

Thanks in advance.

own ssl certs

Hi, I am trying to setup a container with my own ssl certificates (not self-signed, bought, signed by GeoTrust).

I have generated the files into ./postfix/ssl, combining private key and ca into mail.grupocitec.com-combined.pem and putting the key into mail.grupocitec.com-key.pem and putting cert into mail.grupocitec.com-cert.pem.
My certificate is a wildcard one for *.grupocitec.com
Then I have set, in the docker-container.yml file, this:
hostname: mail
domainname: grupocitec.com
environment:

  • DMS_SSL=self-signed

When I try to connect to the server, using a test@ account for grupocitec.com, it returns me with a certificate for common name 'localhost', why it doesn't take my certificate?

What am I doing wrong?
Thanks

SASL LOGIN authentication failed

Hello

I am not sure if this is the same issue as #18 but Im going to report this anyways

So I am trying to set up gitlab docker containers to use this magnificent mailserver but I am unable to connect to the server.

The error that i am getting is

Dec 31 14:10:39 mail postfix/submission/smtpd[591]: connect from unknown[172.17.0.6]
Dec 31 14:10:39 mail postfix/submission/smtpd[591]: warning: SASL authentication failure: Couldn't find mech LOGIN
Dec 31 14:10:39 mail postfix/submission/smtpd[591]: warning: unknown[172.17.0.6]: SASL LOGIN authentication failed: no mechanism available
Dec 31 14:10:39 mail postfix/submission/smtpd[591]: lost connection after AUTH from unknown[172.17.0.6]
Dec 31 14:10:39 mail postfix/submission/smtpd[591]: disconnect from unknown[172.17.0.6]

I am able to connect to the mail server and use it with a python script but not with gitlab.
The gitlab compose offers environment variables which are and set to:

- SMTP_STARTTLS=true
- SMTP_AUTHENTICATION=login

Is this a issue with the mailServer or gitlab it self?

About pop3 support

Hi,

Is there any special reason about not installing pop3 (and pop3-ssl)? Seems that with the courier modules and a couple of lines in the config (TLS certs and port), it should work.

I'm asking because if you want to use the mail server with gmail pop3 check, it may not work since this only supports imap.

Great work anyway, these docker images is really helpful.

UPDATE: just saw this issue #32, sorry about the duplication.

Some ideas ( out of office, config script, push mail )

Perhaps a nice feature to have is an out of office feature.
And a simple script you can run in the terminal to manage the account creation, editing , removal out of office. Although both are minor I would love to contribute to this repo and have thought of writing such a solution myself for a non dockerized mailserver setup I currently run in production. ( but plan to move to the base of this docker solution )

Auto responders would be nice:
https://www.howtoforge.com/how-to-set-up-a-postfix-autoresponder-with-autoresponse

Probably overkill:
https://www.mnxsolutions.com/scripts/postfix-dovecot-user-admin-script.html

Push email to clients:
http://mishmashmoo.com.au/blog/?p=208

Add DMARC support

As DKIM and SPF should work now in this image, we can look at DMARC support.
I have working setup in my local image, just need time to send a pull request.

Dummy Question: load balancing docker-mailserver

Hello,
this is dummy question, but it can be helpful for someone like me. I don't know much about docker even about postfix, but if I would like to install your image(s) is there way how to create some load balancing between them?

what about balancing on same host (one linux machine) and what about balancing on many hosts (many linux machines)

Thanks in advance.

time out on port 25

Hi,
The configuration went well, I'm able to fetch messages using STARTTLS for my different users.
But I'm unable to send any messages from some mail clients (Thunderbird can, but Evolution can't).

I'm seeing a strange behaviour of the port 25:

$ telnet mail.myserver.net 25

gets a timeout from a remote host, but works on the server itself.
Whereas,

$ telnet mail.myserver.net 587
Trying 94.23.54.109...
Connected to mail.myserver.net.
Escape character is '^]'.
220 mail.myserver.net ESMTP Postfix (Ubuntu)
EHLO moi
250-mail.myserver.net
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

is OK from a remote host.
It seems to be related to my server configuration, but I didn't find any conflicting postfix running, I didn't have any specific iptables configuration.
Did I miss something?

CoreOS support?

This Repo looks great and Im in the need for setting up an easy dockerized mailservice.
But, how does this work for a coreOS read only file system.

What would be the best way to add the mail accounts on a coreOS system where you cannot mount a filesystem on the host to the docker container?

Filesystem notification initialization error, check for configuration error with the FAM/Gamin library

Get notification message after configured mail on outlook
Filesystem notification initialization error -- contact your mail administrator (check for configuration errors with the FAM/Gamin library)

Command for run the docker
docker run --name mail -v "/data/mail/postfix":/tmp/postfix -v "/data/mail/spamassassin":/tmp/spamassassin -p "25:25" -p "143:143" -p "587:587" -p "993:993" -h mail.1day.cn -t tvial/docker-mailserver

How to install signed SSL certs

I want to install my signed gandi certificate.

In start-mailserver.sh you have if [ -e "/tmp/postfix/ssl/$(hostname)-cert.pem" ], the file doesn't exist but another file is present and not used by the script : mail.domain.com-req

  • Should I rename the file ?

I have tried by renaming it and it didn't worked :

CONNECTED(00000003)
140445282178704:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:184:

---
no peer certificate available

---
No client certificate CA names sent

---
SSL handshake has read 0 bytes and written 295 bytes

---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE

---

Looking at the script :

  # Postfix configuration
  sed -i -r 's/smtpd_tls_cert_file=\/etc\/ssl\/certs\/ssl-cert-snakeoil.pem/smtpd_tls_cert_file=\/etc\/postfix\/ssl\/'$(hostname)'-cert.pem/g' /etc/postfix/main.cf
  sed -i -r 's/smtpd_tls_key_file=\/etc\/ssl\/private\/ssl-cert-snakeoil.key/smtpd_tls_key_file=\/etc\/postfix\/ssl\/'$(hostname)'-key.pem/g' /etc/postfix/main.cf
  sed -i -r 's/#smtpd_tls_CAfile=/smtpd_tls_CAfile=\/etc\/postfix\/ssl\/cacert.pem/g' /etc/postfix/main.cf
  sed -i -r 's/#smtp_tls_CAfile=/smtp_tls_CAfile=\/etc\/postfix\/ssl\/cacert.pem/g' /etc/postfix/main.cf
  ln -s /etc/postfix/ssl/cacert.pem /etc/ssl/certs/cacert-$(hostname).pem

  # Courier configuration
  sed -i -r 's/TLS_CERTFILE=\/etc\/courier\/imapd.pem/TLS_CERTFILE=\/etc\/postfix\/ssl\/'$(hostname)'-combined.pem/g' /etc/courier/imapd-ssl

Because the provided sample is not working, I am trying to guess how it should work using this explanation

The servers only needs these 4 files :

  1. mail.domain.com-cert.pem
  2. mail.domain.com-key.pem
  3. cacert.pem
  4. mail.domain.com-combined.pem

I have buy my certs on Gandi, I was able to prepare this :

  1. mail.domain.com-cert.pem > certificat -> provided by gandi and contain 1 key
  2. mail.domain.com-key.pem > generated key -> provided when generating the csr, contain 1 key
  3. cacert.pem > GandiStandardSSLCA2.pem > provided by gandi, contain 2 keys
  4. mail.domain.com-combiner.pem > concatened certificate > made by me, contain 4 keys (mine x 1 + gandi x 2 + comodo x 1)

Everything seems ok to me, I have tried, still not working.

Does anyone did tried to add their own signed certs ?

Does it allow multiple domains?

Hi, I have a question. Does this stack allow multiple domains? As it open the common ports, I wonder if it allows multiple domains, so I can deploy just one instance of it without the need for a proxy to separate domains.

Password encryption

I wan't to know how hard would it be to have encrypted password in a file.
Just in case some users get the access to the git project.

missing: how to

  1. Thanks for your Docker-"Image"
  2. it would be nice to have a >how to< ... to a running docker instance
    2.1) add accounts
    2.2) change passwords
    2.3) add/remove aliases

BIG THANK YOU

How to make pop3 enabled?

imap and smtp was perfect with webmail interface. With pop3 enabled, it will match perfectly with mail client. How to make it enabled?

Imap folders

Hi.

First of all, thanks for this docker image. It works great and it is very easy to setup!
Almost everything works on my server but I cannot create mail folders.
I am using Mail from OS X and it cannot create Sent, Drafts and Trash folders.

I tried to use maildirmake into /var/mail/mydomain/myaccount/ and update courierimapsubscribed with

.Trash
.Sent
.Drafts

but it doesn't work.

Do you have a solution?

Thanks in advance.

Accounts.cf file example

Hello,
First of all, thank you for your work. I was able to run the smtp server and the imap server very fast.
I just had some trouble with the virtual.db map. I had to touch a new virtual file and postmap it.

But I was a bit confused with accounts.cf file, because there is not example of it in this project, and the documentation is still based on the previous account management with the env vars.

Could you update your documentation and put an example file ?
Thank you !

Starting ClamAV daemon clamd: fail!

Using docker-compose up
Ubuntu 14.04

mail_1 | Starting SpamAssassin Mail Filter Daemon: spamd.
mail_1 |  * Starting ClamAV daemon clamd 
mail_1 |    ...fail!
mail_1 | Starting amavisd: amavisd-new.
mail_1 |  * Starting Postfix Mail Transport Agent postfix
mail_1 |    ...done.
mail_1 | Listing SASL users
mail_1 | [email protected]: userPassword
mail_1 | Starting...
mail_1 | May 12 11:49:51 mail amavis[506]: Found decoder for    .zoo  at /usr/bin/zoo
mail_1 | May 12 11:49:51 mail amavis[506]: No decoder for       .doc  tried: ripole
mail_1 | May 12 11:49:51 mail amavis[506]: Found decoder for    .cab  at /usr/bin/cabextract
mail_1 | May 12 11:49:51 mail amavis[506]: No decoder for       .tnef
mail_1 | May 12 11:49:51 mail amavis[506]: Internal decoder for .tnef
mail_1 | May 12 11:49:51 mail amavis[506]: Found decoder for    .exe  at /usr/bin/arj
mail_1 | May 12 11:49:51 mail amavis[506]: Using primary internal av scanner code for ClamAV-clamd
mail_1 | May 12 11:49:51 mail amavis[506]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
mail_1 | May 12 11:49:51 mail amavis[506]: Deleting db files  in /var/lib/amavis/db
mail_1 | May 12 11:49:51 mail amavis[506]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.54, libdb 5.3
mail_1 | May 12 11:49:52 mail postfix/master[600]: daemon started -- version 2.11.0, configuration /etc/postfix

When sending to the server:

mail_1 | May 12 11:38:00 mail amavis[602]: (00602-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail_1 | May 12 11:38:01 mail amavis[602]: (00602-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail_1 | May 12 11:38:01 mail amavis[602]: (00602-01) (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2)
mail_1 | May 12 11:38:07 mail amavis[602]: (00602-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail_1 | May 12 11:38:07 mail amavis[602]: (00602-01) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (All attempts (1) failed connecting to /var/run/clamav/clamd.ctl) at (eval 136) line 603.\n

Authentification failed

Hello,

Sorry for this issue, I may be the only one which cannot get this repo working at 100%.
After building this image on a docker-machine at digitalOcean, setting up the DNS records, and setting the virtual account, I successfully get all the email forwarded and stored to /var/mail/.

Unfortunately, I didn't succeed to login to my email account.
Here's the auth.log :

Dec 15 10:31:56 mail saslauthd[624]: do_auth         : auth failure: [[email protected]] [service=login] [realm=sabmit.io] [mech=sasldb] [reason=Unknown]

Here's the startup script log :

mail_1 | Listing SASL users
mail_1 | [email protected]: userPassword
...
mail_1 | TESTING SASL
mail_1 | 0: NO "authentication failed"

And here's the command to try to login :

testsaslauthd -s login -u [email protected] -p test
testsaslauthd -u [email protected] -p test
testsaslauthd -s login -u lol -r sabmit.io -p test

I temporary set the auth mech to :

pwcheck_method: auxprop
mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5
allow_plaintext: true
log_level: 7
  • User Postfix owns /etc/sasldb2

Any help would be appreciate.

SMTP does not respond (install at Jelastic)

Hello!
Thx for your great work!
Looks great, but I have an issue:
I'm try to install this container into Jelastic. When installation finishes, I'm try to connect to IMAP and SMTP via Telnet (test availability), and connect to IMAP (143) proceed without any errors, but SMTP (25) fails

I have read all docs about port redirection, and looks like I dont have any problem here (IMAP works good).

I do not make any configuration, just install container and run "/bin/sh -c /usr/local/bin/start-mailserver.sh"

Do you have any ideas what I do wrong?

FeatureRequest: autoconfig

Hi, if I get this working, I plan to add a web server container to render the autoconfig/mail/config-v1.1.xml files so email clients can be auto-configured.
Example of the xml file:

  <emailProvider id="domain.com">
    <domain>domain.com</domain>
    <displayName>My Mail</displayName>
    <displayShortName>mymail</displayShortName>
    <incomingServer type="imap">
      <hostname>mail.domain.com</hostname>
      <port>143</port>
      <socketType>STARTTLS</socketType>
      <authentication>password-cleartext</authentication>
      <username>%EMAILADDRESS%</username>
    </incomingServer>
    <outgoingServer type="smtp">
      <hostname>mail.domain.com</hostname>
      <port>587</port>
      <socketType>STARTTLS</socketType>
      <authentication>password-cleartext</authentication>
      <username>%EMAILADDRESS%</username>
    </outgoingServer>
  </emailProvider>

We could render that xml on the start-mailserver.sh script and share that file with the new web server, mounting it in both containers.

Do you like the idea of adding this to the project? I will have to do it anyway, so if you want I can PR it

Data Backup / Migrate / Preserve

Hey, this is great, but how would someone migrate e-mails (~100GB across 10 accounts) into this, how would a person export emails from this for backup & migration?

Mounting volumes does not change container files

I am playing around with the postfix folder and trying to change sasl/smtpd.conf file but the files in the container are not loaded to the /etc/postfix folder.

In the readme.md there is noted that all folders (expect letsencrypt) need to be mounted to the tmp folder.

files must be mounted to /tmp in your container

To make changes I need to rebuild the image with the changed code in the git project folder

my docker-compose file:

mail:
  restart: always
  #image: tvial/docker-mailserver
  build: ./docker-mailserver
  hostname: mail
  domainname: host.com
  ports:
  - "25:25"
  - "143:143"
  - "587:587"
  - "993:993"
  volumes:
  - ./spamassassin:/tmp/spamassassin/
  - ./postfix:/tmp/postfix/
  - /etc/letsencrypt:/etc/letsencrypt
  environment:
  - DMS_SSL=letsencrypt

Need to speed up amavis scanning

Since amavis and other filters are enabled, mail scanning add a delay in mail delivery.

mail_1 | Mar 28 15:19:12 94f2fb3e567b postfix/smtpd[573]: connect from localhost[127.0.0.1]
mail_1 | Mar 28 15:19:12 94f2fb3e567b postfix/smtpd[573]: DBE3C6250F: client=localhost[127.0.0.1]
mail_1 | Mar 28 15:19:12 94f2fb3e567b postfix/cleanup[568]: DBE3C6250F: message-id=<[email protected]>
mail_1 | Mar 28 15:19:12 94f2fb3e567b postfix/qmgr[559]: DBE3C6250F: from=<[email protected]>, size=962, nrcpt=1 (queue active)
mail_1 | Mar 28 15:19:12 94f2fb3e567b amavis[562]: (00562-01) Passed CLEAN {RelayedInternal}, LOCAL [192.168.33.1]:55643 [192.168.33.1] <[email protected]> -> <[email protected]>, Queue-ID: A8C52624FD, Message-ID: <[email protected]>, mail_id: iH9J1j9yQQFK, Hits: -1, size: 539, queued_as: DBE3C6250F, 12199 ms
mail_1 | Mar 28 15:19:12 94f2fb3e567b postfix/smtp[569]: A8C52624FD: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=12, delays=0.02/0.01/0.01/12, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as DBE3C6250F)
mail_1 | Mar 28 15:19:12 94f2fb3e567b postfix/qmgr[559]: A8C52624FD: removed
mail_1 | Mar 28 15:19:12 94f2fb3e567b postfix/virtual[574]: DBE3C6250F: to=<[email protected]>, relay=virtual, delay=0.04, delays=0.01/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
mail_1 | Mar 28 15:19:12 94f2fb3e567b postfix/qmgr[559]: DBE3C6250F: removed

Currently, it's a 12 seconds scan...
Tested on OSX using virtualbox and share folder, which can be part of the problem.

authentication failed

Hi, I have set up everything, I get all green in checktls.com (my server is cepheus.grupocitec.com). The server receives ok the mails from other servers, and creates correctly the files in the mail dir, etc.
BUT: I continue getting the wrong password error. I have even tried:
testsaslauthd -u [email protected] -p myPlainPassword smtp
and I get:
0: NO "authentication failed"
The user exists, but I cannot log in. I have tried all kinds of authentications mechanism (using all possible ones in thunderbird), but it doesn't work.

Any ideas?

GMail add account

I setup account in Thunderbird and everything works great!

But when I'm trying to attach to Gmail I got an error with authentication. I got an error something like this:
"PDE1ODM5MTAzNTAuMTM5MzI4NUBtYWlsLmNsdWJhbGwuY29tPg== code(334)"

I'm not sure what is causing that and didn't find anything in logs.

documentation on hostname and domainname

While trying to build image using docker-compose it some time to figure out how letsencrypt directory should be named. As far as I understand build script will contatenate hostname and domainname and when you generate letsencrypt certificates usually you will get directory with only a domain name. So when you mount start-mailserver.sh will look for invalid location.

It would be nice to have some sort of documentation how it works.

What worked for me was just removing hostname from docker-compose.yml and then I get hostname as domainname i have given.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.