Catch all mail and display it in roundcube interface.
$ docker run -d --name=mailtrap -p 80:80 eaudeweb/mailtrap
$ docker run -it --link mailtrap alpine:3.6 sh
$ telnet mailtrap 25
ehlo example.com
mail from: me@example.com
rcpt to: you@example.com
data
Subject: Hello from me
Hello You,
This is a test.
Cheers,
Me
.
quit
- Username:
mailtrap
- Password:
mailtrap
Set environment variables
MT_USER
- mailbox user, default mailtrapMT_PASSWD
- mailbox user password, default mailtrapMT_MAILBOX_LIMIT
- mailbox limit in bytes, default 51200000MT_MESSAGE_LIMIT
- message limit in bytes, default 10240000MT_NETWORK_STYLE
- host, subnet, or class, default subnetMT_POSTFIX_OPTIONS
- http://www.postfix.org/postconf.5.html, any other options you need.
and recreate the container.
If you're running on a centralized server you need to specify who is allowed to send to the embedded postfix instance option.
To do this you'll need to know the network subnet of the machines that you would allow to send mail to this mailtrap instance. With the subnet in hand for example "10.10.0.0/16" add this to the allowed senders by adding the following environment option MT_POSTFIX_OPTIONS = 10.10.0.0/16
sudo docker build -t eaudeweb/mailtrap:test .
sudo docker-compose up