Files
wekan/docs/Features/Email/Troubleshooting-Mail.md
T
Lauri Ojansivu 765e2c305d Compact terminal email metadata while retaining replay receipts
Retain detailed metadata for 30 days by default, then replace terminal jobs and commands atomically with minimal permanent identities. Preserve unfinished work, holds, generation fencing and actor-bound command replays. Sweep bounded batches independently and reconcile uncertain writes.

Validated with six Node suites, real MongoDB faults and replay tests, the Meteor startup scheduler, and Chromium Recovery replay and authorization checks.

Thanks to xet7.
2026-09-28 14:06:15 +03:00

34 KiB
Raw Blame History

Configure email in Admin Panel

Before using the environment-variable examples below, open Admin Panel / People / E-mail. Enable Enable below email settings to choose custom SMTP or one of the many built-in providers, including Gmail, Gmail Workspace, Outlook 365, Proton, SendGrid, Mailgun, Postmark, Resend and AWS SES regions. Enter the provider credentials and From address, save, then use Send SMTP test email. Leave the option disabled when you want WeKan to use the installation's existing MAIL_URL and MAIL_FROM settings instead.

Activity notification emails are queued in the database. Temporary SMTP failures retry with increasing delays and jitter, up to twelve attempts per cycle. Permanent failures stop for administrator review. Pending mail resumes after a restart. These are at-least-once deliveries: interruption after SMTP acceptance can cause a duplicate. A recipient who is no longer an active board member does not receive a queued board notification. The current mailbox address and mail configuration are used on each attempt.

Without a working transport, console output alone does not clear the queue. Custom email transports must return the accepted recipient list, as Nodemailer SMTP transports do. Admin Panel / Problems / Recovery shows recipient summaries and lets an administrator pause, resume, retry failed messages or cancel queued messages. See the recovery guide.

Shared notification delivery capacity

Queued notifications share four delivery reservations across all WeKan processes using the same database. A sender reserves a place before recording an attempt; a full queue of active senders leaves other messages pending with no retry-budget cost. The next scan can take a newly freed place.

Reservations renew every 15 seconds and expire after 60 seconds. A crashed worker's reservation is reclaimable after expiry. Losing ownership, a failed renewal or a locally expired reservation cancels that sender's SMTP socket. An independent timer still expires authority if a database renewal hangs. The private reservation collection contains at most four slot records and has no TTL index, client publication or client writes. A former owner cannot release a replacement worker's reservation.

This limit covers the notification outbox, not direct password-reset, invitation or test messages. Keep application-host clocks synchronized. The bound is on live reservations: SMTP servers cannot fence stale connections from paused hosts, and an already accepted message cannot be recalled. Delivery therefore remains at least once.

Completed notification receipts

Completed and cancelled notification jobs, and completed or superseded control requests, retain detailed metadata for 30 days by default. Set EMAIL_RECEIPT_METADATA_DAYS to an integer from 1 to 3650 to change this age. The background sweep runs every 60 seconds; EMAIL_RECEIPT_SWEEP_INTERVAL_MS accepts 1000–86400000 milliseconds. Each pass examines at most 100 jobs and 100 control requests. Large backlogs therefore take multiple passes.

Old terminal rows are atomically replaced in the same private collections. Job receipts retain their hashed event identity and terminal state; command receipts retain their request ID, terminal state and a hash binding the actor, recipient and action. These minimal receipts remain indefinitely to prevent old events or control commands from running again. This reduces metadata per receipt; it does not cap the total number of receipts or erase request IDs. There is no TTL deletion.

Pending and failed jobs, pending commands, recipient pauses, cancellation cutoffs and the latest control audit summary remain intact. Missing or invalid completion dates and inconsistent identities are retained for investigation. A storage failure leaves replay protection in place and is retried on a later sweep; it does not stop maintenance of the other receipt collection.

SMTP timeouts

SMTP connections configured through MAIL_URL, TLS certificate overrides or Admin Panel provider settings use these process environment variables:

Variable Default Limits
MAIL_DNS_TIMEOUT_MS 30000 (30 seconds) DNS lookup
MAIL_CONNECTION_TIMEOUT_MS 30000 (30 seconds) TCP connection
MAIL_GREETING_TIMEOUT_MS 30000 (30 seconds) Initial SMTP greeting
MAIL_SOCKET_TIMEOUT_MS 120000 (2 minutes) Connection idle time

Each value must be an integer from 1000 to 900000 milliseconds. Restart WeKan after changing these variables. Invalid values are rejected; zero cannot disable a timeout. These settings override timeout query parameters in an SMTP MAIL_URL. The standard Meteor URL path preserves its other URL options, encoded credentials and native mail plugins. A provider that legitimately takes longer needs a larger value within these bounds.

The transport closes an idle or unresponsive connection. A queued notification retains its content and retries under the queue's attempt policy. Invitation, password-reset and other direct mail callers retain their existing error handling; these timeouts do not put those messages into the notification outbox.

For native SMTP MAIL_URL, Meteor email service settings, Admin Panel providers and TLS certificate overrides, MAIL_TOTAL_TIMEOUT_MS additionally limits the entire send, including message preparation, DNS, TCP, TLS and SMTP replies. Its default is 120000 ms; valid values are integers from 1000 to 300000 ms. Each message owns a separate connection, which is closed at the deadline even if the peer keeps sending bytes. Other recipients' connections are unaffected. SMTP connections are no longer pooled, including when an older MAIL_URL contains pool=true. Native message compile/stream plugins, defaults, authentication and TLS options remain in use.

HTTP and HTTPS CONNECT proxies also share the total deadline, including the proxy handshake. Queued notifications additionally use the shared reservations described above; direct mail is outside that queue capacity limit. Legacy non-SMTP MAIL_URL schemes and third-party custom transports are outside this policy. SMTP acknowledgement loss can still cause duplicate delivery.

Azure Email Communication Service

Uberspace Email

Newest Wekan

Newest WeKan versions have two ways to configure outgoing email:

  • At Admin Panel / People / E-mail, enable Enable below email settings to choose custom SMTP or one of the many built-in Nodemailer providers. The provider list includes Gmail, Gmail Workspace, Outlook 365, Proton, SendGrid, Mailgun, Postmark, Resend, the AWS SES regions and many others. Enter that provider's username, password and From address, then save and use Send SMTP test email.
  • Keep Enable below email settings disabled to use the installation's MAIL_URL and MAIL_FROM settings. For Snap these are set with commands such as sudo snap set wekan mail-url=...; Docker and source installations use environment variables. The examples below document this method.

The Admin Panel option is an explicit opt-in. Enabling and saving it makes the selected Admin Panel provider the outgoing transport; disabling it retains the existing MAIL_URL fallback.

Older instructions referring to Wekan v5.02 describe the environment-variable method, which remains supported.

  • For any errors like SSLv3 and STARTTLS, check newest AWS SES info and use similar settings, other SSLv3/STARTTLS info could be outdated.

Gmail

Source

This maybe requires setting per-application password in Google Account settings for Gmail.

sudo snap set wekan mail-url='smtp://user@gmail.com:password@smtp.gmail.com:587'

OAuth2 proxy

ProtonMail Bridge

Source

sudo snap set wekan mail-url='smtp://USER%40DOMAIN:PASSWORD@127.0.0.1:1025?ignoreTLS=true&tls={rejectUnauthorized:false}&secure=false'

Some more test code

let htmlText = Assets.getText("emailTemplate.html");
let modifiedText = htmlText.replace(/\{\{variable\}\}/g, variable);
await Email.sendAsync({
            from: "nobody@example.com",
            to: email,
            subject: `subject`,
            html: modifiedText,
        });

Debugging your SMTP mail server

If you can't get your email server working with smtp/stmps or MAIL_SERVICE, look is there more config options for your email server at https://nodemailer.com docs, and add new issue about your email server to https://github.com/wekan/wekan/issues or pull request.

For example, for https://nodemailer.com/smtp/

  1. Install node.js 12.x
  2. Add to top of code example: var nodemailer = require('nodemailer');
  3. Install nodemailer: npm install nodemailer
  4. send email: node email.js

For example, this kind of code uses similar like MAIL_SERVICE in Wekan:

var nodemailer = require('nodemailer');

let transporter = nodemailer.createTransport({
  service: "Outlook365",
  auth: {
    user: 'firstname.lastname@hotmail.com',
    pass: 'TopSecret'
  },
})

let info = transporter.sendMail({
  from: 'Firstname Lastname <firstname.lastname@hotmail.com>',
  to: 'somebody@example.com',
  subject: 'Hi',
  text: 'Hi. Reminder: Meeting tomorrow.',
  html: '<h1>Hi. Reminder: Meeting tomorrow.</h1>'
})

If with some code example sending email works, xet7 can add it to wekan, like in Wekan v5.52 xet7 added direct nodemailer usage for MAIL_SERVICE.

MAIL_SERVICE environment variables

For new configurations, first try Admin Panel / People / E-mail, enable Enable below email settings, and select the provider there. The Admin Panel contains the current, longer list of providers supported by WeKan's installed Nodemailer version.

The environment-variable examples below describe the older MAIL_SERVICE configuration method.

a) If you use smtps or smtp, please do not add any MAIL_SERVICE settings. For example, AWS SES and Postfix works with only MAIL_URL and MAIL_FROM.

b) If smtps or smtp does not work, in Wekan v5.52 and newer, you can try these additional MAIL_SERVICE settings. This may still also require MAIL_URL to be valid, while it only uses MAIL_SERVICE settings of Well Known email services that are these:

126, 163, 1und1, AOL, DebugMail, DynectEmail, FastMail, GandiMail, Gmail, Godaddy, GodaddyAsia, GodaddyEurope, hot.ee, Hotmail, iCloud, mail.ee, Mail.ru, Maildev, Mailgun, Mailjet, Mailosaur, Mandrill, Naver, OpenMailBox, Outlook365, Postmark, QQ, QQex, SendCloud, SendGrid, SendinBlue, SendPulse, SES, SES-US-EAST-1, SES-US-WEST-2, SES-EU-WEST-1, Sparkpost, Yahoo, Yandex, Zoho, qiye.aliyun

Wekan Snap:

sudo snap set wekan mail-service='Outlook365'
sudo snap set wekan mail-service-user='firstname.lastname@hotmail.com'
sudo snap set wekan mail-service-password='SecretPassword'

Wekan Gantt GPL Snap:

sudo snap set wekan-gantt-gpl mail-service='Outlook365'
sudo snap set wekan-gantt-gpl mail-service-user='firstname.lastname@hotmail.com'
sudo snap set wekan-gantt-gpl mail-service-password='SecretPassword'

docker-compose.yml of https://github.com/wekan/wekan:

- MAIL_SERVICE=Outlook365
- MAIL_SERVICE_USER=firstname.lastname@hotmail.com
- MAIL_SERVICE_PASSWORD=SecretPassword

start-wekan.bat of https://github.com/wekan/wekan:

SET MAIL_SERVICE=Outlook365
SET MAIL_SERVICE_USER=firstname.lastname@hotmail.com
SET MAIL_SERVICE_PASSWORD=SecretPassword      

start-wekan.sh of https://github.com/wekan/wekan:

export MAIL_SERVICE=Outlook365
export MAIL_SERVICE_USER=firstname.lastname@hotmail.com
export MAIL_SERVICE_PASSWORD=SecretPassword      

Special Characters

If you have special characters in username or password, sometimes you need to urlencode them. Not for AWS SES. You can convert special characters of your password at https://www.url-encode-decode.com and copy converted characters to your password.

Example: Microsoft Office 365

sudo snap set wekan mail-url='smtp://user:password@smtp.office365.com:587?ignoreTLS=false&tls={rejectUnauthorized:false}&secure=true'
sudo snap set wekan mail-from='Wekan Team Boards <info@example.com>'

Converting special characters:

sudo snap set wekan mail-url='smtp://support%40example.com:password@mail.example.com:587/?ignoreTLS=true&tls={rejectUnauthorized:false}&secure=false'

sudo snap set wekan mail-from='Wekan Team Boards <info@example.com>'

Example: AWS SES

Related https://github.com/wekan/wekan/discussions/5518

NOTE: At AWS SES settings, you don't need to convert special characters.

  1. At AWS SES, add verified sender email address, verified domain, verified DKIM etc.

  2. For your example.com domain for SPF purposes, add TXT record like this, where ip4:123.123.123.123 is your Wekan server IP address:

@ TXT

v=spf1 ip4:123.123.123.123 include:amazonses.com ~all

If you have other email services like Protonmail, Google Workplace, Outlook, SendGrid, and some other servers, it could look like this, please check your email provider to enable all settings:

v=spf1 include:_spf.protonmail.ch ip4:123.123.123.123 ip4:123.100.123.100 include:_spf.google.com include:spf.protection.outlook.com include:sendgrid.net include:amazonses.com ~all
  1. At AWS SES, create new SMTP credentials for username like "AKIA..." and password, that you add directly to below. Do not modify or escape special characters.

With AWS SMTP credentials:

a) Wekan Snap

sudo snap set wekan mail-from='Wekan Boards <boards@example.com>'
sudo snap set wekan mail-url='smtp://username:password@email-smtp.eu-west-1.amazonaws.com:587?tls={ciphers:"SSLv3"}&secureConnection=false'

You see settings with:

sudo snap get wekan

b) Wekan Gantt GPLv2 Snap:

sudo snap set wekan-gantt-gpl mail-from='Wekan Boards <boards@example.com>'
sudo snap set wekan-gantt-gpl mail-url='smtp://username:password@email-smtp.eu-west-1.amazonaws.com:587?tls={ciphers:"SSLv3"}&secureConnection=false'

You see settings with:

sudo snap get wekan-gantt-gpl

c) Docker, Source, etc

MAIL_FROM='Wekan Boards <boards@example.com>'
MAIL_URL='smtp://username:password@email-smtp.eu-west-1.amazonaws.com:587?tls={ciphers:"SSLv3"}&secureConnection=false'

Example: AWS SES sending email with command line

Source

This can be used for debugging on bash shell, does AWS SES work at all. Other shells work too, on Windows it requires installing openssl command.

  1. password-to-base64.sh - converts AWS SES STMP credentials to base64 to be used at input.txt email content:
echo -n "AKIA...." | openssl enc -base64
echo -n "password-here...." | openssl enc -base64
  1. input.txt - change all to your domains, password, etc where is text -here below. NOTE: only at From: there is more detailed sender name, not elsewhere like MAIL FROM: etc.
EHLO example.com-here
AUTH LOGIN
base64-username-here
base64-password-here
MAIL FROM: boards@example.com-here
RCPT TO: you@example.com-here
DATA
From: Wekan Boards-here <boards@example.com-here>
To: you@example.com-here
Subject: Amazon SES SMTP Test

This message was sent using the Amazon SES SMTP interface.
.
QUIT

3a) ses-send-email.sh , with STARTTLS:

openssl s_client -crlf -quiet -starttls smtp -connect email-smtp.eu-west-1.amazonaws.com:587 < input.txt

3b) ses-send-email.sh, with SSL:

openssl s_client -crlf -quiet -connect email-smtp.eu-west-1.amazonaws.com:465 < input.txt
  1. Changing above .sh scripts to executeable:
chmod +x *.sh

Then you can run them like this:

./password-to-base64.sh

Example: Gmail

Source

sudo snap set wekan mail-url='smtps://username@domain.com:password@smtp.gmail.com:465'
sudo snap set wekan mail-from='Wekan Team Boards <info@example.com>'

Convert password via this service https://www.url-encode-decode.com and everything will work.

If you get SSLv3 protocol error

Do instead this smtp:// and ignoreTLS etc, and at click your right top username / Admin Panel / Email, with TLS support NOT enabled:

sudo snap set wekan mail-url='smtp://username:password@email-smtp.eu-west-1.amazonaws.com:587?ignoreTLS=true&tls={rejectUnauthorized:false}&secure=false'
sudo snap set wekan mail-from='Wekan Team Boards <info@example.com>'

If you use some other snap like wekan-gantt-gpl

Change part sudo snap set wekan to sudo snap set wekan-gantt-gpl

Example: UCS

In admin panel (within admin account on Wekan app itself)

  • SMTP Host: smtp.example.com:25/?ignoreTLS=true&tls={rejectUnauthorized:false}&secure=false
  • SMTP Port: 25
  • Username: webadmin%40example.com
  • [_] TLS Support UNCHECKED
  • From: Wekan Admin <webadmin@example.com>

Settings in Wekan App settings in UCS dashboard

  • URL settings: https://www.example.com/wekan
  • LDAP Settings: (&(objectClass=person)(mailPrimaryAddress=*)(!(shadowExpire=*))(sambaBadPasswordTime=0)(wekanActivated=TRUE)(uid=<some_user_name>))
  • Mail URL: smtp://webadmin%40example.com:password@example.com:25/?ignoreTLS=true&tls={rejectUnauthorized:false}&secure=false
  • Mail From: Wekan Notifications <webadmin@example.com>

Example: username contains @

Below @ is urlencoded to %40

sudo snap set wekan mail-url='smtps://user%40provider.com:xxxxxx@smtp.provider.com:587'
sudo snap set wekan mail-from='Boards Support <user@provider.com>'

If settings happends to disappear, it's possible set cron job to run those at morning, see: https://crontab.guru

sudo su
export EDITOR=nano
crontab -e

There at bottom add these. Optional is to add to end of snap command 2>&1 to disable output,if there is any.

06 00 * * * sudo snap set wekan mail-url='smtps://user%40provider.com:xxxxxx@smtp.provider.com:587'
06 01 * * * sudo snap set wekan mail-from='Boards Support <user@provider.com>'

Check is username and password required

If your email server does not require authentication like username and password, don't include them in MAIL_URL. For example, IBM Notes does not require username and password.

Config

Mail configuration if done by settings of MAIL_URL & MAIL_FROM environment parameters. Way of setting is due your instalation method e.g. snap, in docker-compose.yml file etc.

No mail server

You can choose to NOT configure a mail server, by not providing the MAIL_URL & MAIL_FROM environment parameters. Instead the mail message will be send to the terminal output. See FAQ for more info.

Email servers: SMTP or Exchange

Standalone Wekan uses SMTP server for sending email invitations etc.

For Exchange, you can use DavMail, Wekan SMTP => Davmail => Exchange.

Another way is to Configure Postfix to relay to Exchange with NTLM authentication

There are Thunderbird Exchange Calendar extensions for Exchange 2007/2010/2013/others? Open Source, Exchange 2007-2015 paid and Exhange 2016 paid and other extensions, info how to use it is at article at threenine.co.uk. Wekan has Calendar feature.

Wekan Email settings are required in both MAIL_URL and Admin Panel.

If you want to receive Email to Wekan, use Huginn to get E-mail from mailserver and have Huginn to use Wekan REST API to add card to Wekan board.

Postfix

If you want to configure a mail server, you could use a mail server out-side of your machine (like the example above). Or you could start another Docker container which runs Postfix (try the marvambass/versatile-postfix Docker image).

If you already got a Postfix service running on your host machine, you can add the local IP address to the docker-compose.yml file and use the hostname in the MAIL_URL:

environment:
  [...]
 - MAIL_URL=smtp://mailserver
 - MAIL_FROM=noreply@domain.com
extra_hosts:
 - "mailserver:192.168.1.20"

Note: 192.168.1.20 needs to be changed to your local server IP address.

And finally add the Docker IP range (172.17.x.x) to the Postfix trusted networks list in /etc/postfix/main.cf:

mynetworks = 127.0.0.0/8 172.17.0.0/16 [::ffff:127.0.0.0]/104 [::1]/128  

Troubleshooting

Email is quite important in Wekan, as without it you can't send password reset links nor can you verify your e-mail address. Here are some ways to figure out what is wrong with your mail server settings in WeKan.

Log Files

Firstly, make sure you're logged into your server and following your log files.

@:~$ tail -f path/to/wekan.log

If you're using the Docker container through docker-compose, you can follow the log file like this:

@:~$ docker-compose logs -f wekan

If you're using a snap package, you'll get the logs with

@:~$ journalctl -u snap.wekan.wekan

Error Messages

Once you've got the log files in front of you, go to the WeKan frontend and send a password reset link, or try to register. This will try to send an e-mail, and you should see any error messages in the log file.

Wrong Port

If you see an error message like the following one, your port number is wrong. If you're using plain old SMTP or STARTTLS, your port should be 25. If you're using TLS, you may need to change your port to 465. Some mail servers may use port 587 instead of the two above.

wekan_1      | Exception while invoking method 'forgotPassword' Error: connect ECONNREFUSED 64.22.103.211:587
wekan_1      |     at Object.Future.wait (/build/programs/server/node_modules/fibers/future.js:449:15)
wekan_1      |     at Mail._syncSendMail (packages/meteor.js:213:24)
wekan_1      |     at smtpSend (packages/email.js:110:13)
wekan_1      |     at Object.Email.send (packages/email.js:168:5)
wekan_1      |     at AccountsServer.Accounts.sendResetPasswordEmail (packages/accounts-password/password_server.js:614:9)
wekan_1      |     at [object Object].Meteor.methods.forgotPassword (packages/accounts-password/password_server.js:546:12)
wekan_1      |     at packages/check.js:130:16
wekan_1      |     at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
wekan_1      |     at Object.exports.Match._failIfArgumentsAreNotAllChecked (packages/check.js:129:41)
wekan_1      |     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1734:18)
wekan_1      |     at packages/ddp-server/livedata_server.js:719:19
wekan_1      |     at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
wekan_1      |     at packages/ddp-server/livedata_server.js:717:40
wekan_1      |     at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
wekan_1      |     at packages/ddp-server/livedata_server.js:715:46
wekan_1      |     at [object Object]._.extend.protocol_handlers.method (packages/ddp-server/livedata_server.js:689:23)
wekan_1      |     - - - - -
wekan_1      |     at Object.exports._errnoException (util.js:907:11)
wekan_1      |     at exports._exceptionWithHostPort (util.js:930:20)
wekan_1      |     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1081:14)

Wrong Protocol

If you have the "Enable TLS support for SMTP server", but your does not directly support TLS (it may use STARTTLS instead), then you'll get the following error. Just uncheck the checkbox in the Admin Panel.

wekan_1      | Exception while invoking method 'forgotPassword' Error: 139872240588608:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:
wekan_1      |     at Object.Future.wait (/build/programs/server/node_modules/fibers/future.js:449:15)
wekan_1      |     at Mail._syncSendMail (packages/meteor.js:213:24)
wekan_1      |     at smtpSend (packages/email.js:110:13)
wekan_1      |     at Object.Email.send (packages/email.js:168:5)
wekan_1      |     at AccountsServer.Accounts.sendResetPasswordEmail (packages/accounts-password/password_server.js:614:9)
wekan_1      |     at [object Object].Meteor.methods.forgotPassword (packages/accounts-password/password_server.js:546:12)
wekan_1      |     at packages/check.js:130:16
wekan_1      |     at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
wekan_1      |     at Object.exports.Match._failIfArgumentsAreNotAllChecked (packages/check.js:129:41)
wekan_1      |     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1734:18)
wekan_1      |     at packages/ddp-server/livedata_server.js:719:19
wekan_1      |     at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
wekan_1      |     at packages/ddp-server/livedata_server.js:717:40
wekan_1      |     at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
wekan_1      |     at packages/ddp-server/livedata_server.js:715:46
wekan_1      |     at [object Object]._.extend.protocol_handlers.method (packages/ddp-server/livedata_server.js:689:23)
wekan_1      |     - - - - -
wekan_1      | 
wekan_1      |     at Error (native)

STARTTLS Sending test email failed

Sending email failed
Error trying to send email: 139625961224000:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:827:

To fix it, in snap/docker/source environment variable settings, with username and password urlencoded:

snap set wekan mail-from='Boards Support <boards@example.com>'

snap set wekan mail-url='smtp://support%40example.com:password@mail.example.com:587/?ignoreTLS=true&tls={rejectUnauthorized:false}&secure=false'

Admin Panel:

SMTP Host:
mail.example.com:587/?ignoreTLS=true&tls={rejectUnauthorized:false}&secure=false

SMTP Port:
587

Username:
support%40example.com

Password:
password

TLS support:
[_] <== not checked

From: 
Boards Support <boards@example.com>

DNS settings, with server IP address in ipv4 section:
TXT: mail.example.com & & TXT: example.com
v=spf1 a mx ipv4:123.123.123.123/32 include:_spf.google.com include:example.com include:mail.example.com include:_spf.google.com ~all

Self-signed Certificate

Unfortunately at this stage, WeKan does not support self-signed certificates. You will see the following error if your SMTP server is using a self-signed certificate. Ways to remedy to this are (by order of preference):

  • disable TLS on your SMTP server. For postfix juste add "smtpd_user_tls = no" to main.cf. !!! Unless doing this, wekan will try to connect with STARTTLS !!!
  • to get a certificate from a CA, or
  • to add "?tls={rejectUnauthorized:false}" to the end of the MAIL_URL environment variable, or
  • to add "?ignoreTLS=true" to the end of the MAIL_URL environment variable, or
  • to remove the TLS certificate completely.
wekan_1      | Exception while invoking method 'forgotPassword' Error: 139872240588608:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:
wekan_1      |     at Object.Future.wait (/build/programs/server/node_modules/fibers/future.js:449:15)
wekan_1      |     at Mail._syncSendMail (packages/meteor.js:213:24)
wekan_1      |     at smtpSend (packages/email.js:110:13)
wekan_1      |     at Object.Email.send (packages/email.js:168:5)
wekan_1      |     at AccountsServer.Accounts.sendResetPasswordEmail (packages/accounts-password/password_server.js:614:9)
wekan_1      |     at [object Object].Meteor.methods.forgotPassword (packages/accounts-password/password_server.js:546:12)
wekan_1      |     at packages/check.js:130:16
wekan_1      |     at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
wekan_1      |     at Object.exports.Match._failIfArgumentsAreNotAllChecked (packages/check.js:129:41)
wekan_1      |     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1734:18)
wekan_1      |     at packages/ddp-server/livedata_server.js:719:19
wekan_1      |     at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
wekan_1      |     at packages/ddp-server/livedata_server.js:717:40
wekan_1      |     at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
wekan_1      |     at packages/ddp-server/livedata_server.js:715:46
wekan_1      |     at [object Object]._.extend.protocol_handlers.method (packages/ddp-server/livedata_server.js:689:23)
wekan_1      |     - - - - -
wekan_1      | 
wekan_1      |     at Error (native)

Incorrect TLS Certificate

Lastly, if you see the following error message it is because the certificate has not been correctly installed on the SMTP server.

wekan_1      | Exception while invoking method 'forgotPassword' Error: unable to verify the first certificate
wekan_1      |     at Object.Future.wait (/build/programs/server/node_modules/fibers/future.js:449:15)
wekan_1      |     at Mail._syncSendMail (packages/meteor.js:213:24)
wekan_1      |     at smtpSend (packages/email.js:110:13)
wekan_1      |     at Object.Email.send (packages/email.js:168:5)
wekan_1      |     at AccountsServer.Accounts.sendResetPasswordEmail (packages/accounts-password/password_server.js:614:9)
wekan_1      |     at [object Object].Meteor.methods.forgotPassword (packages/accounts-password/password_server.js:546:12)
wekan_1      |     at packages/check.js:130:16
wekan_1      |     at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
wekan_1      |     at Object.exports.Match._failIfArgumentsAreNotAllChecked (packages/check.js:129:41)
wekan_1      |     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1734:18)
wekan_1      |     at packages/ddp-server/livedata_server.js:719:19
wekan_1      |     at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
wekan_1      |     at packages/ddp-server/livedata_server.js:717:40
wekan_1      |     at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
wekan_1      |     at packages/ddp-server/livedata_server.js:715:46
wekan_1      |     at [object Object]._.extend.protocol_handlers.method (packages/ddp-server/livedata_server.js:689:23)
wekan_1      |     - - - - -
wekan_1      |     at Error (native)
wekan_1      |     at TLSSocket.<anonymous> (_tls_wrap.js:1063:38)
wekan_1      |     at emitNone (events.js:67:13)
wekan_1      |     at TLSSocket.emit (events.js:166:7)
wekan_1      |     at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:621:8)
wekan_1      |     at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:453:38)

No News Is Good News

Of course, if you don't see any of these errors in your WeKan log file, then the problem is not in WeKan. Check your SMTP server's mail logs (if you can) to get a better idea of what might be going wrong.


BELOW IS NOT TESTED YET DOCS

They are moved here from https://github.com/wekan/wekan/issues/961

Configure Wekan

Sample:

Wekan with TLS/SSL

To run Wekan secured with TLS/SSL do the following steps:

  1. Setup a Web-Server/-Proxy with TLS/SSL support that maps requests to wekan.
  2. Set protocol to https. export ROOT_URL='https://example.com/'
  3. Set Wekan to an internal port. export PORT=54321
  4. Restart and run Wekan.

Wekan at subpath

To run Wekan to appear at a subpath of your domain:

  1. Setup a Web-Server/-Proxy that maps requests to wekan.
  2. Append subpath to domain, without trailing slash. export ROOT_URL='http://example.com/mywekan'
  3. Set Wekan to an internal port. export PORT=54321
  4. Restart and run Wekan.

SMTP with TLS/SSL

To enable Wekan sending Mail from a mail server with TLS/SSL:

  1. Set Wekan to the specified port (465 / 587). export MAIL_URL='smtp://user:password@example.com:587/'
  2. Restart and run Wekan.

Mail Sender

To define a sender name for the mails automatically sent by Wekan.

  1. ...export MAIL_FROM='Thomas Anderson <neo@matrix.org>'

Using mail service from zoho

If you have your personal mail on zoho for your domain example.com, then follow these steps to add MAIL_URL. Let's assume following username username=user1@example.com password=12@3424dsfsf

Step 1: encode the username and password

encoded username: user1%40example.com encoded password: 12%403424dsfsf

Step 2: form MAIL_URL

MAIL_URL=smtps://user1%40example.com:12%403424dsfsf@smtp.zoho.com:465/

By default zoho uses port number 465 with TLS enabled.

Step 3: form MAIL_FROM

MAIL_FROM=Wekan Notifications user1@example.com