Docker image based on last Debian stable release. It embeds:
- postfix
- cyrus-imapd (backports version)
docker build -t cyrus-local .
docker-compose up -d
docker exec -it cyrus /bin/bash
After remote into the docker, run below steps to add dummy data:
/etc/init.d/saslauthd start
echo 'createmailbox user.example@localhost.com' | cyradm -u cyrus -w cyrus localhost
echo 'createmailbox user.ana@localhost.com' | cyradm -u cyrus -w cyrus localhost
echo 'createmailbox user.bob@localhost.com' | cyradm -u cyrus -w cyrus localhost
echo 'example' | saslpasswd2 -p -c example
echo 'example' | saslpasswd2 -p -c ana
echo 'example' | saslpasswd2 -p -c bob
sasldblistusers2
cyrus@ca77a55b1057: userPassword
example@ca77a55b1057: userPassword
testsaslauthd -u example -p example -f /var/run/saslauthd/mux
0: OK "Success."
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" --user example:example -d '{
"using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ],
"methodCalls": [[ "Mailbox/get", {}, "c1" ]]
}' http://localhost:8008/jmap/ | jq
Changing these variables has no effect when /etc/postfix is populated (after the first run if volume is kept).
Environment variables for Postfix (with default value):
- For Cyrus-Imapd:
CYRUS_PWD
=""
(if not set, cyradm isn't usable)SASL_PWCHECK_METHOD
=saslauthd auxprop
SASLDB
=sasldb
- For Postfix
MAILNAME
=mail.example.com
OTHER_DESTINATIONS
=example.com mail.example.com
RELAY_HOST
=""
MYNETWORKS
=127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
ROOT_ADDRESS
=""
: (address to which mail from root and postmaster will be sent)
- Postfix (depends on configuration):
- 25
- 465 (not configured by default)
- 587 (not configured by default)
- Cyrus (depends on configuration):
- 110
- 143
- 993
- 995 (not configured by default)
- 2000 (not configured by default)
- 8008
- 8443 (not configured by default)
Copyright: Xavier (Yadd) Guimard yadd@debian.org.
License: GNU General Public License v2.0