bluet / bluet/docker-cronicle-docker

Can't get email working

Open
#48 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
146
Forks
27
PR merge metrics
No merged PRs in 30d

Description

I've been successfully running Cronicle in Docker for a couple of years and it works great!

I'm now trying to get email working for task failures and I can't seem to get the settings right. I've tried a number of different ways to set these but nothing seems to work. I'm sure my credentials are correct. From the error, I'm not convinced its even trying to login.

docker compose:

```
services:
cronicle:
depends_on:
traefik:
condition: service_healthy
network_mode: service:vpn
image: bluet/cronicle-docker:latest
logging:
driver: json-file
container_name: cronicle
environment:
- TZ=$TZ
- CRONICLE_base_app_url=https://cronicle.mydomain.com
- CRONICLE_email_from=cronicle@mydomain.com
- CRONICLE_smtp_hostname=smtp.emailhost.com
- CRONICLE_smtp_port=587
- 'CRONICLE_mail_options={"secure": true, "auth": { "user": "snuffy2", "pass": "myverylongpassword_myverylongpassword_myverylongpassword_myverylongpassword_myverylongpassword" }, "connectionTimeout": 10000, "greetingTimeout": 10000, "socketTimeout": 10000}'
healthcheck:
test: curl --fail http://localhost:${CRONICLE_PORT} || exit 1
interval: 180s
retries: 5
start_period: 120s
start_interval: 30s
timeout: 10s
volumes:
- $LOCALTIME
- /var/run/docker.sock:/var/run/docker.sock:rw
- ${APPDATA}/cronicle/data:/opt/cronicle/data:rw
- ${APPDATA}/cronicle/logs:/opt/cronicle/logs:rw
- ${APPDATA}/cronicle/plugins:/opt/cronicle/plugins:rw
- ${APPDATA}/cronicle/app:/app:rw
restart: unless-stopped
labels:
- autoheal=true
- traefik.enable=true
- traefik.http.routers.cronicle-int.priority=20
- "traefik.http.routers.cronicle-int.rule=Host(`cronicle.$DOMAIN`) && $CLIENTIP_LOCAL_IPS"
- traefik.http.routers.cronicle-int.entrypoints=websecure_7443
- traefik.http.routers.cronicle-int.middlewares=chain-default@file
- traefik.http.routers.cronicle-int.service=cronicle
- traefik.http.routers.cronicle-ext.priority=10
- "traefik.http.routers.cronicle-ext.rule=Host(`cronicle.$DOMAIN`)"
- traefik.http.routers.cronicle-ext.entrypoints=websecure_7443
- traefik.http.routers.cronicle-ext.middlewares=chain-organizr-auth@file
- traefik.http.routers.cronicle-ext.service=cronicle
- traefik.http.services.cronicle.loadbalancer.server.port=${CRONICLE_PORT}
```

Error:

```
cronicle | [1731022462.28][2024-11-07 18:34:22][vpn][13][Error][error][mail][Failed to send e-mail for job: jm37y2rrw01: tv4vc710@email.com: Error: Mail command failed: 502 5.7.0 Please authenticate first][{"text":"To: tv4vc710@email.com\nFrom: cronicle@mydomain.com\nSubject: ⚠️ Cronicle Job Failed: Fail test\n\nDate/Time: 2024/11/07 18:34:21 (GMT-5)\nEvent Title: Fail test\nCategory: Healthchecks.io\nServer Target: All Servers\nPlugin: Test Plugin\n\nJob ID: jm37y2rrw01\nHostname: vpn\nPID: 34\nElapsed Time: 5 seconds\nPerformance Metrics: scale=1&total=5.115&db_query=0.149&db_connect=0.246&log_read=0.685&gzip_data=0.868&http_post=0.962\nAvg. Memory Usage: (Unknown)\nAvg. CPU Usage: (Unknown)\nError Code: 999\n\nError Description:\nSimulating an error message here. Something went wrong!\n\nJob Details:\nhttps://cronicle.mydomain.com/#JobDetails?id=jm37y2rrw01\n\nJob Debug Log (5 K):\nhttps://cronicle.mydomain.com/api/app/get_job_log?id=jm37y2rrw01\n\nEdit Event:\nhttps://cronicle.mydomain.com/#Schedule?sub=edit_event&id=em37vlr7a01\n\nEvent Notes:\n(None)\n\nRegards,\nThe Cronicle Team\n"}]
```

Contributor guide

No contributing guide indexed for this repository

Research direction

No repository files or tests are named. Start with the supplied Docker Compose environment and the SMTP error, then inspect how this image reads its mail settings and compare them with the reported values. Done means identifying a supported configuration or documenting why the supplied settings cannot authenticate.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, shell
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.