-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maildev fails to start when using --auto-relay together with --mail-directory #420
Comments
Also seeing the same issue |
Hello is there any solution for this? Here is my config to reproduce
.env File
|
For thoses facing this issue, the temporary solution I found is to : 1 - Fix the outgoing.js file by replacing line 155 with : let recipients = emailObject?.envelope?.to ? emailObject.envelope.to.map(getAddressFromAddressObject) : []; I will raise a PR soon with this fix. 2 - Add the outgoing.js file as a volume for the maildev container : docker-compose.yml file : services:
maildev:
image: maildev/maildev:2.1.0
restart: always
ports:
- "1080:1080" # Web interface
volumes:
- ./mails:/home/node/mails
- ./outgoing.js:/home/node/lib/outgoing.js
command: bin/maildev
--web 1080
--smtp 1025
--outgoing-host '${OUTGOING_HOST}'
--outgoing-port '${OUTGOING_PORT}'
--outgoing-user '${OUTGOING_USER}'
--outgoing-pass '${OUTGOING_PASS}'
--web-user '${WEB_USER}'
--web-pass '${WEB_PASS}'
--mail-directory '/home/node/mails'
--auto-relay
--outgoing-secure
env_file:
- .env .env file : WEB_USER=x
WEB_PASS=x
OUTGOING_HOST=x
OUTGOING_PORT=x
OUTGOING_USER=x
OUTGOING_PASS=x |
…ther with --mail-directory relative to issue maildev#420
Need to remove the emails under |
I use the above workaround for two months now on 3 projects rimunning with maildev and it works prperly event after many deployments. |
when using the
--mail-directory
and--auto-relay
options together, starting maildev fails as soon as there are on-disk stored mails in the defined mail directory:it looks like maildev is trying to autorelay the mails in the on-disk store upon starting the service. the service starts when either the local mail store directory is empty or
--auto-relay
is removed from the startup options.configurations:
daemon options:
/etc/maildev/relay.json
:reproduced in the latest 2.0.5 version.
repo steps:
test@example.com
& ensure it's shown in maildev and is stored to/srv/maildev/
The text was updated successfully, but these errors were encountered: