Problem starting chasquid for the first time

92 views
Skip to first unread message

Agam More

unread,
Jan 18, 2021, 6:57:08 PM1/18/21
to chasquid

I've tried running this (on a fresh ubuntu 20):
sudo apt update
sudo apt install chasquid
chasquid-util user-add a...@mydomain.com
chasquid-util print-config
smtp-check mydomain.com

I first saw in netstat that nothing was listening on port 25, then, I saw when running `chasquid`:
E chasquid.go:197    Warning: No SMTP addresses/listeners
E chasquid.go:198    If using systemd, check that you named the sockets
E chasquid.go:197    Warning: No submission addresses/listeners

This is my config:
hostname: "ubuntu-s-1vcpu-1gb-ams3-01"
max_data_size_mb: 50
smtp_address: "systemd"
submission_address: "systemd"
submission_over_tls_address: "systemd"
mail_delivery_agent_bin: "maildrop"
mail_delivery_agent_args: "-f"
mail_delivery_agent_args: "%from%"
mail_delivery_agent_args: "-d"
mail_delivery_agent_args: "%to_user%"
data_dir: "/var/lib/chasquid"
suffix_separators: "+"
drop_characters: "."
mail_log_path: "<syslog>"

I tried `systemctl restart chasquid` with no result.
What am I missing?

Thanks in advance.



Alberto Bertogli

unread,
Jan 19, 2021, 5:31:04 AM1/19/21
to Agam More, chasquid
On Mon, Jan 18, 2021 at 03:57:08PM -0800, Agam More wrote:
>I've tried running this (on a fresh ubuntu 20):

Was this 20.04 (focal) or 20.10 (groovy)?

If you don't know, running "lsb_release -a" will tell you.


>sudo apt update
>sudo apt install chasquid
>chasquid-util user-add a...@mydomain.com
>chasquid-util print-config
>smtp-check mydomain.com
>
>I first saw in netstat that nothing was listening on port 25, then, I saw
>when running `chasquid`:
>
>
>*E chasquid.go:197 Warning: No SMTP addresses/listenersE
>chasquid.go:198 If using systemd, check that you named the socketsE
>chasquid.go:197 Warning: No submission addresses/listeners*
>
>This is my config:
>hostname: "ubuntu-s-1vcpu-1gb-ams3-01"
>max_data_size_mb: 50
>smtp_address: "systemd"
>submission_address: "systemd"
>submission_over_tls_address: "systemd"
>mail_delivery_agent_bin: "maildrop"
>mail_delivery_agent_args: "-f"
>mail_delivery_agent_args: "%from%"
>mail_delivery_agent_args: "-d"
>mail_delivery_agent_args: "%to_user%"
>data_dir: "/var/lib/chasquid"
>suffix_separators: "+"
>drop_characters: "."
>mail_log_path: "<syslog>"
>
>I tried `systemctl restart chasquid` with no result.
>What am I missing?

It's possible that the systemd sockets are not enabled, so systemd is
not creating them and passing them to chasquid as expected.


Can you send the output of this command?

$ systemctl status chasquid.service chasquid-submission_tls.socket chasquid-submission.socket chasquid-smtp.socket


Also, you can try enabling the sockets and see if it works:
$ systemctl enable chasquid-submission_tls.socket chasquid-submission.socket chasquid-smtp.socket
$ systemctl restart chasquid


Newer Ubuntu versions should do this automatically, but I will verify
this just in case.

Thanks!
Alberto

Agam More

unread,
Jan 19, 2021, 5:31:14 PM1/19/21
to chasquid
Thanks for the quick reply!
It was ubuntu 20.04,

Also, I got this in the install from apt install chasquid.
Setting up chasquid (1.2-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/chasquid.service → /lib/systemd/system/chasquid.service.
chasquid-smtp.socket is a disabled or a static unit, not starting it.
chasquid-submission.socket is a disabled or a static unit, not starting it.
chasquid-submission_tls.socket is a disabled or a static unit, not starting it.


And the command you said to try:
systemctl status chasquid.service chasquid-submission_tls.socket chasquid-submission.socket chasquid-smtp.socket
● chasquid.service - chasquid mail daemon (service)
     Loaded: loaded (/lib/systemd/system/chasquid.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2021-01-19 22:25:26 UTC; 1min 22s ago
TriggeredBy: ● chasquid-smtp.socket
             ● chasquid-submission.socket
             ● chasquid-submission_tls.socket
       Docs: man:chasquid(1)
    Process: 2588 ExecStart=/usr/bin/chasquid (code=exited, status=1/FAILURE)
   Main PID: 2588 (code=exited, status=1/FAILURE)

Jan 19 22:25:26 agam-smtp systemd[1]: chasquid.service: Main process exited, code=exited, status=1/FAILURE
Jan 19 22:25:26 agam-smtp systemd[1]: chasquid.service: Failed with result 'exit-code'.
Jan 19 22:25:26 agam-smtp systemd[1]: chasquid.service: Scheduled restart job, restart counter is at 9.
Jan 19 22:25:26 agam-smtp systemd[1]: Stopped chasquid mail daemon (service).
Jan 19 22:25:26 agam-smtp systemd[1]: chasquid.service: Start request repeated too quickly.
Jan 19 22:25:26 agam-smtp systemd[1]: chasquid.service: Failed with result 'exit-code'.
Jan 19 22:25:26 agam-smtp systemd[1]: Failed to start chasquid mail daemon (service).

● chasquid-submission_tls.socket - chasquid mail daemon (submission over TLS sockets)
     Loaded: loaded (/lib/systemd/system/chasquid-submission_tls.socket; disabled; vendor preset: enabled)
     Active: failed (Result: service-start-limit-hit) since Tue 2021-01-19 22:25:26 UTC; 1min 22s ago
   Triggers: ● chasquid.service
     Listen: [::]:465 (Stream)

Jan 19 22:25:23 agam-smtp systemd[1]: Listening on chasquid mail daemon (submission over TLS sockets).
Jan 19 22:25:26 agam-smtp systemd[1]: chasquid-submission_tls.socket: Failed with result 'service-start-limit-hit'.

● chasquid-submission.socket - chasquid mail daemon (submission sockets)
     Loaded: loaded (/lib/systemd/system/chasquid-submission.socket; disabled; vendor preset: enabled)


The last command you sent still didn't seem to work.
Any other idea?

Agam More

unread,
Jan 19, 2021, 5:40:05 PM1/19/21
to chasquid
Tried in ubuntu 20.10, same problem (fresh VPS each time).

Alberto Bertogli

unread,
Jan 22, 2021, 5:58:39 AM1/22/21
to Agam More, chasquid
On Tue, Jan 19, 2021 at 02:31:14PM -0800, Agam More wrote:
>Thanks for the quick reply!
>It was ubuntu 20.04,
>
>Also, I got this in the install from apt install chasquid.
>Setting up chasquid (1.2-1) ...
>Created symlink
>/etc/systemd/system/multi-user.target.wants/chasquid.service →
>/lib/systemd/system/chasquid.service.
>chasquid-smtp.socket is a disabled or a static unit, not starting it.
>chasquid-submission.socket is a disabled or a static unit, not starting it.
>chasquid-submission_tls.socket is a disabled or a static unit, not starting
>it.

I just tried this on a fresh Ubuntu 20.04 install (on a local VM) and
once I added the user and set up the certs, chasquid started up fine.

So I wonder if there's something else going on, since I can't reproduce
it :(


Can you send me the startup log of chasquid? You can obtain it with:

$ grep chasquid /var/log/syslog

Feel free to send it privately if you prefer, totally up to you.

Thanks,
Alberto

Agam

unread,
Jan 22, 2021, 5:37:43 PM1/22/21
to Alberto Bertogli, chasquid
I just tried running the following code on a fresh digital ocean 20 ubuntu machine:
```
sudo apt update
sudo apt install chasquid
chasquid-util user-add a...@mydomain.com
chasquid-util print-config
smtp-check mydomain.com
```

Here is the syslog:
sudo grep chasquid /var/log/syslog
Jan 22 22:27:22 smtp-test systemd[1]: Listening on chasquid mail daemon (SMTP sockets).
Jan 22 22:27:22 smtp-test systemd[1]: Listening on chasquid mail daemon (submission sockets).
Jan 22 22:27:22 smtp-test systemd[1]: Listening on chasquid mail daemon (submission over TLS sockets).
Jan 22 22:27:22 smtp-test systemd[1]: Started chasquid mail daemon (service).
Jan 22 22:27:22 smtp-test chasquid[1841]: _ chasquid.go:68     chasquid starting (version 1.3-1)
Jan 22 22:27:22 smtp-test chasquid[1841]: _ config.go:86       Configuration:
Jan 22 22:27:22 smtp-test chasquid[1841]: _ config.go:87         Hostname: "smtp-test"
Jan 22 22:27:22 smtp-test chasquid[1841]: _ config.go:88         Max data size (MB): 50
Jan 22 22:27:22 smtp-test chasquid[1841]: _ config.go:89         SMTP Addresses: [systemd]
Jan 22 22:27:22 smtp-test chasquid[1841]: _ config.go:90         Submission Addresses: [systemd]
Jan 22 22:27:22 smtp-test chasquid[1841]: _ config.go:91         Submission+TLS Addresses: [systemd]
Jan 22 22:27:22 smtp-test chasquid[1841]: _ config.go:92         Monitoring address:
Jan 22 22:27:22 smtp-test chasquid[1841]: _ config.go:93         MDA: maildrop [-f %from% -d %to_user%]
Jan 22 22:27:22 smtp-test chasquid[1841]: _ config.go:94         Data directory: /var/lib/chasquid
Jan 22 22:27:22 smtp-test chasquid[1841]: _ config.go:95         Suffix separators: +
Jan 22 22:27:22 smtp-test chasquid[1841]: _ config.go:96         Drop characters: .
Jan 22 22:27:22 smtp-test chasquid[1841]: _ config.go:97         Mail log: <syslog>
Jan 22 22:27:22 smtp-test chasquid[1841]: _ config.go:98         Dovecot auth: false ("", "")
Jan 22 22:27:22 smtp-test chasquid[1841]: _ chasquid.go:105    Loading certificates
Jan 22 22:27:23 smtp-test chasquid[1841]: _ chasquid.go:132    Domain config paths:
Jan 22 22:27:23 smtp-test chasquid[1841]: ☠ chasquid.go:265    No entries found in "domains/"
Jan 22 22:27:23 smtp-test systemd[1]: chasquid.service: Main process exited, code=exited, status=1/FAILURE
Jan 22 22:27:23 smtp-test systemd[1]: chasquid.service: Failed with result 'exit-code'.
Jan 22 22:27:23 smtp-test systemd[1]: chasquid.service: Scheduled restart job, restart counter is at 1.
Jan 22 22:27:23 smtp-test systemd[1]: Stopped chasquid mail daemon (service).
Jan 22 22:27:23 smtp-test systemd[1]: Started chasquid mail daemon (service).
Jan 22 22:27:23 smtp-test chasquid[1880]: _ chasquid.go:68     chasquid starting (version 1.3-1)
Jan 22 22:27:23 smtp-test chasquid[1880]: _ config.go:86       Configuration:
Jan 22 22:27:23 smtp-test chasquid[1880]: _ config.go:87         Hostname: "smtp-test"
Jan 22 22:27:23 smtp-test chasquid[1880]: _ config.go:88         Max data size (MB): 50
Jan 22 22:27:23 smtp-test chasquid[1880]: _ config.go:89         SMTP Addresses: [systemd]
Jan 22 22:27:23 smtp-test chasquid[1880]: _ config.go:90         Submission Addresses: [systemd]
Jan 22 22:27:23 smtp-test chasquid[1880]: _ config.go:91         Submission+TLS Addresses: [systemd]
Jan 22 22:27:23 smtp-test chasquid[1880]: _ config.go:92         Monitoring address:
Jan 22 22:27:23 smtp-test chasquid[1880]: _ config.go:93         MDA: maildrop [-f %from% -d %to_user%]
Jan 22 22:27:23 smtp-test chasquid[1880]: _ config.go:94         Data directory: /var/lib/chasquid
Jan 22 22:27:23 smtp-test chasquid[1880]: _ config.go:95         Suffix separators: +
Jan 22 22:27:23 smtp-test chasquid[1880]: _ config.go:96         Drop characters: .
Jan 22 22:27:23 smtp-test chasquid[1880]: _ config.go:97         Mail log: <syslog>
Jan 22 22:27:23 smtp-test chasquid[1880]: _ config.go:98         Dovecot auth: false ("", "")
Jan 22 22:27:23 smtp-test chasquid[1880]: _ chasquid.go:105    Loading certificates
Jan 22 22:27:23 smtp-test chasquid[1880]: _ chasquid.go:132    Domain config paths:
Jan 22 22:27:23 smtp-test chasquid[1880]: ☠ chasquid.go:265    No entries found in "domains/"
Jan 22 22:27:23 smtp-test systemd[1]: chasquid.service: Main process exited, code=exited, status=1/FAILURE
Jan 22 22:27:23 smtp-test systemd[1]: chasquid.service: Failed with result 'exit-code'.
Jan 22 22:27:23 smtp-test systemd[1]: chasquid.service: Scheduled restart job, restart counter is at 2.
Jan 22 22:27:23 smtp-test systemd[1]: Stopped chasquid mail daemon (service).
Jan 22 22:27:23 smtp-test systemd[1]: Started chasquid mail daemon (service).
Jan 22 22:27:24 smtp-test chasquid[1890]: _ chasquid.go:68     chasquid starting (version 1.3-1)
Jan 22 22:27:24 smtp-test chasquid[1890]: _ config.go:86       Configuration:
Jan 22 22:27:24 smtp-test chasquid[1890]: _ config.go:87         Hostname: "smtp-test"
Jan 22 22:27:24 smtp-test chasquid[1890]: _ config.go:88         Max data size (MB): 50
Jan 22 22:27:24 smtp-test chasquid[1890]: _ config.go:89         SMTP Addresses: [systemd]
Jan 22 22:27:24 smtp-test chasquid[1890]: _ config.go:90         Submission Addresses: [systemd]
Jan 22 22:27:24 smtp-test chasquid[1890]: _ config.go:91         Submission+TLS Addresses: [systemd]
Jan 22 22:27:24 smtp-test chasquid[1890]: _ config.go:92         Monitoring address:
Jan 22 22:27:24 smtp-test chasquid[1890]: _ config.go:93         MDA: maildrop [-f %from% -d %to_user%]
Jan 22 22:27:24 smtp-test chasquid[1890]: _ config.go:94         Data directory: /var/lib/chasquid
Jan 22 22:27:24 smtp-test chasquid[1890]: _ config.go:95         Suffix separators: +
Jan 22 22:27:24 smtp-test chasquid[1890]: _ config.go:96         Drop characters: .
Jan 22 22:27:24 smtp-test chasquid[1890]: _ config.go:97         Mail log: <syslog>
Jan 22 22:27:24 smtp-test chasquid[1890]: _ config.go:98         Dovecot auth: false ("", "")
Jan 22 22:27:24 smtp-test chasquid[1890]: _ chasquid.go:105    Loading certificates
Jan 22 22:27:24 smtp-test chasquid[1890]: _ chasquid.go:132    Domain config paths:
Jan 22 22:27:24 smtp-test chasquid[1890]: ☠ chasquid.go:265    No entries found in "domains/"
Jan 22 22:27:24 smtp-test systemd[1]: chasquid.service: Main process exited, code=exited, status=1/FAILURE
Jan 22 22:27:24 smtp-test systemd[1]: chasquid.service: Failed with result 'exit-code'.
Jan 22 22:27:24 smtp-test systemd[1]: chasquid.service: Scheduled restart job, restart counter is at 3.
Jan 22 22:27:24 smtp-test systemd[1]: Stopped chasquid mail daemon (service).
Jan 22 22:27:24 smtp-test systemd[1]: Started chasquid mail daemon (service).
Jan 22 22:27:24 smtp-test chasquid[1931]: _ chasquid.go:68     chasquid starting (version 1.3-1)
Jan 22 22:27:24 smtp-test chasquid[1931]: _ config.go:86       Configuration:
Jan 22 22:27:24 smtp-test chasquid[1931]: _ config.go:87         Hostname: "smtp-test"
Jan 22 22:27:24 smtp-test chasquid[1931]: _ config.go:88         Max data size (MB): 50
Jan 22 22:27:24 smtp-test chasquid[1931]: _ config.go:89         SMTP Addresses: [systemd]
Jan 22 22:27:24 smtp-test chasquid[1931]: _ config.go:90         Submission Addresses: [systemd]
Jan 22 22:27:24 smtp-test chasquid[1931]: _ config.go:91         Submission+TLS Addresses: [systemd]
Jan 22 22:27:24 smtp-test chasquid[1931]: _ config.go:92         Monitoring address:
Jan 22 22:27:24 smtp-test chasquid[1931]: _ config.go:93         MDA: maildrop [-f %from% -d %to_user%]
Jan 22 22:27:24 smtp-test chasquid[1931]: _ config.go:94         Data directory: /var/lib/chasquid
Jan 22 22:27:24 smtp-test chasquid[1931]: _ config.go:95         Suffix separators: +
Jan 22 22:27:24 smtp-test chasquid[1931]: _ config.go:96         Drop characters: .
Jan 22 22:27:24 smtp-test chasquid[1931]: _ config.go:97         Mail log: <syslog>
Jan 22 22:27:24 smtp-test chasquid[1931]: _ config.go:98         Dovecot auth: false ("", "")
Jan 22 22:27:24 smtp-test chasquid[1931]: _ chasquid.go:105    Loading certificates
Jan 22 22:27:24 smtp-test chasquid[1931]: _ chasquid.go:132    Domain config paths:
Jan 22 22:27:24 smtp-test chasquid[1931]: ☠ chasquid.go:265    No entries found in "domains/"
Jan 22 22:27:24 smtp-test systemd[1]: chasquid.service: Main process exited, code=exited, status=1/FAILURE
Jan 22 22:27:24 smtp-test systemd[1]: chasquid.service: Failed with result 'exit-code'.
Jan 22 22:27:24 smtp-test systemd[1]: chasquid.service: Scheduled restart job, restart counter is at 4.
Jan 22 22:27:24 smtp-test systemd[1]: Stopped chasquid mail daemon (service).
Jan 22 22:27:24 smtp-test systemd[1]: Started chasquid mail daemon (service).
Jan 22 22:27:24 smtp-test chasquid[2003]: _ chasquid.go:68     chasquid starting (version 1.3-1)
Jan 22 22:27:24 smtp-test chasquid[2003]: _ config.go:86       Configuration:
Jan 22 22:27:24 smtp-test chasquid[2003]: _ config.go:87         Hostname: "smtp-test"
Jan 22 22:27:24 smtp-test chasquid[2003]: _ config.go:88         Max data size (MB): 50
Jan 22 22:27:24 smtp-test chasquid[2003]: _ config.go:89         SMTP Addresses: [systemd]
Jan 22 22:27:24 smtp-test chasquid[2003]: _ config.go:90         Submission Addresses: [systemd]
Jan 22 22:27:24 smtp-test chasquid[2003]: _ config.go:91         Submission+TLS Addresses: [systemd]
Jan 22 22:27:24 smtp-test chasquid[2003]: _ config.go:92         Monitoring address:
Jan 22 22:27:24 smtp-test chasquid[2003]: _ config.go:93         MDA: maildrop [-f %from% -d %to_user%]
Jan 22 22:27:24 smtp-test chasquid[2003]: _ config.go:94         Data directory: /var/lib/chasquid
Jan 22 22:27:24 smtp-test chasquid[2003]: _ config.go:95         Suffix separators: +
Jan 22 22:27:24 smtp-test chasquid[2003]: _ config.go:96         Drop characters: .
Jan 22 22:27:24 smtp-test chasquid[2003]: _ config.go:97         Mail log: <syslog>
Jan 22 22:27:24 smtp-test chasquid[2003]: _ config.go:98         Dovecot auth: false ("", "")
Jan 22 22:27:24 smtp-test chasquid[2003]: _ chasquid.go:105    Loading certificates
Jan 22 22:27:24 smtp-test chasquid[2003]: _ chasquid.go:132    Domain config paths:
Jan 22 22:27:24 smtp-test chasquid[2003]: ☠ chasquid.go:265    No entries found in "domains/"
Jan 22 22:27:24 smtp-test systemd[1]: chasquid.service: Main process exited, code=exited, status=1/FAILURE
Jan 22 22:27:24 smtp-test systemd[1]: chasquid.service: Failed with result 'exit-code'.
Jan 22 22:27:25 smtp-test systemd[1]: chasquid.service: Scheduled restart job, restart counter is at 5.
Jan 22 22:27:25 smtp-test systemd[1]: Stopped chasquid mail daemon (service).
Jan 22 22:27:25 smtp-test systemd[1]: Started chasquid mail daemon (service).
Jan 22 22:27:25 smtp-test chasquid[2046]: _ chasquid.go:68     chasquid starting (version 1.3-1)
Jan 22 22:27:25 smtp-test chasquid[2046]: _ config.go:86       Configuration:
Jan 22 22:27:25 smtp-test chasquid[2046]: _ config.go:87         Hostname: "smtp-test"
Jan 22 22:27:25 smtp-test chasquid[2046]: _ config.go:88         Max data size (MB): 50
Jan 22 22:27:25 smtp-test chasquid[2046]: _ config.go:89         SMTP Addresses: [systemd]
Jan 22 22:27:25 smtp-test chasquid[2046]: _ config.go:90         Submission Addresses: [systemd]
Jan 22 22:27:25 smtp-test chasquid[2046]: _ config.go:91         Submission+TLS Addresses: [systemd]
Jan 22 22:27:25 smtp-test chasquid[2046]: _ config.go:92         Monitoring address:
Jan 22 22:27:25 smtp-test chasquid[2046]: _ config.go:93         MDA: maildrop [-f %from% -d %to_user%]
Jan 22 22:27:25 smtp-test chasquid[2046]: _ config.go:94         Data directory: /var/lib/chasquid
Jan 22 22:27:25 smtp-test chasquid[2046]: _ config.go:95         Suffix separators: +
Jan 22 22:27:25 smtp-test chasquid[2046]: _ config.go:96         Drop characters: .
Jan 22 22:27:25 smtp-test chasquid[2046]: _ config.go:97         Mail log: <syslog>
Jan 22 22:27:25 smtp-test chasquid[2046]: _ config.go:98         Dovecot auth: false ("", "")
Jan 22 22:27:25 smtp-test chasquid[2046]: _ chasquid.go:105    Loading certificates
Jan 22 22:27:25 smtp-test chasquid[2046]: _ chasquid.go:132    Domain config paths:
Jan 22 22:27:25 smtp-test chasquid[2046]: ☠ chasquid.go:265    No entries found in "domains/"
Jan 22 22:27:25 smtp-test systemd[1]: chasquid.service: Main process exited, code=exited, status=1/FAILURE
Jan 22 22:27:25 smtp-test systemd[1]: chasquid.service: Failed with result 'exit-code'.
Jan 22 22:27:25 smtp-test systemd[1]: chasquid.service: Scheduled restart job, restart counter is at 6.
Jan 22 22:27:25 smtp-test systemd[1]: Stopped chasquid mail daemon (service).
Jan 22 22:27:25 smtp-test systemd[1]: Started chasquid mail daemon (service).
Jan 22 22:27:25 smtp-test chasquid[2105]: _ chasquid.go:68     chasquid starting (version 1.3-1)
Jan 22 22:27:25 smtp-test chasquid[2105]: _ config.go:86       Configuration:
Jan 22 22:27:25 smtp-test chasquid[2105]: _ config.go:87         Hostname: "smtp-test"
Jan 22 22:27:25 smtp-test chasquid[2105]: _ config.go:88         Max data size (MB): 50
Jan 22 22:27:25 smtp-test chasquid[2105]: _ config.go:89         SMTP Addresses: [systemd]
Jan 22 22:27:25 smtp-test chasquid[2105]: _ config.go:90         Submission Addresses: [systemd]
Jan 22 22:27:25 smtp-test chasquid[2105]: _ config.go:91         Submission+TLS Addresses: [systemd]
Jan 22 22:27:25 smtp-test chasquid[2105]: _ config.go:92         Monitoring address:
Jan 22 22:27:25 smtp-test chasquid[2105]: _ config.go:93         MDA: maildrop [-f %from% -d %to_user%]
Jan 22 22:27:25 smtp-test chasquid[2105]: _ config.go:94         Data directory: /var/lib/chasquid
Jan 22 22:27:25 smtp-test chasquid[2105]: _ config.go:95         Suffix separators: +
Jan 22 22:27:25 smtp-test chasquid[2105]: _ config.go:96         Drop characters: .
Jan 22 22:27:25 smtp-test chasquid[2105]: _ config.go:97         Mail log: <syslog>
Jan 22 22:27:25 smtp-test chasquid[2105]: _ config.go:98         Dovecot auth: false ("", "")
Jan 22 22:27:25 smtp-test chasquid[2105]: _ chasquid.go:105    Loading certificates
Jan 22 22:27:25 smtp-test chasquid[2105]: _ chasquid.go:132    Domain config paths:
Jan 22 22:27:25 smtp-test chasquid[2105]: ☠ chasquid.go:265    No entries found in "domains/"
Jan 22 22:27:25 smtp-test systemd[1]: chasquid.service: Main process exited, code=exited, status=1/FAILURE
Jan 22 22:27:25 smtp-test systemd[1]: chasquid.service: Failed with result 'exit-code'.
Jan 22 22:27:25 smtp-test systemd[1]: chasquid.service: Scheduled restart job, restart counter is at 7.
Jan 22 22:27:25 smtp-test systemd[1]: Stopped chasquid mail daemon (service).
Jan 22 22:27:25 smtp-test systemd[1]: Started chasquid mail daemon (service).
Jan 22 22:27:25 smtp-test chasquid[2168]: _ chasquid.go:68     chasquid starting (version 1.3-1)
Jan 22 22:27:25 smtp-test chasquid[2168]: _ config.go:86       Configuration:
Jan 22 22:27:25 smtp-test chasquid[2168]: _ config.go:87         Hostname: "smtp-test"
Jan 22 22:27:25 smtp-test chasquid[2168]: _ config.go:88         Max data size (MB): 50
Jan 22 22:27:25 smtp-test chasquid[2168]: _ config.go:89         SMTP Addresses: [systemd]
Jan 22 22:27:25 smtp-test chasquid[2168]: _ config.go:90         Submission Addresses: [systemd]
Jan 22 22:27:25 smtp-test chasquid[2168]: _ config.go:91         Submission+TLS Addresses: [systemd]
Jan 22 22:27:25 smtp-test chasquid[2168]: _ config.go:92         Monitoring address:
Jan 22 22:27:25 smtp-test chasquid[2168]: _ config.go:93         MDA: maildrop [-f %from% -d %to_user%]
Jan 22 22:27:25 smtp-test chasquid[2168]: _ config.go:94         Data directory: /var/lib/chasquid
Jan 22 22:27:25 smtp-test chasquid[2168]: _ config.go:95         Suffix separators: +
Jan 22 22:27:25 smtp-test chasquid[2168]: _ config.go:96         Drop characters: .
Jan 22 22:27:25 smtp-test chasquid[2168]: _ config.go:97         Mail log: <syslog>
Jan 22 22:27:25 smtp-test chasquid[2168]: _ config.go:98         Dovecot auth: false ("", "")
Jan 22 22:27:25 smtp-test chasquid[2168]: _ chasquid.go:105    Loading certificates
Jan 22 22:27:25 smtp-test chasquid[2168]: _ chasquid.go:132    Domain config paths:
Jan 22 22:27:25 smtp-test chasquid[2168]: ☠ chasquid.go:265    No entries found in "domains/"
Jan 22 22:27:25 smtp-test systemd[1]: chasquid.service: Main process exited, code=exited, status=1/FAILURE
Jan 22 22:27:25 smtp-test systemd[1]: chasquid.service: Failed with result 'exit-code'.
Jan 22 22:27:25 smtp-test systemd[1]: chasquid.service: Scheduled restart job, restart counter is at 8.
Jan 22 22:27:25 smtp-test systemd[1]: Stopped chasquid mail daemon (service).
Jan 22 22:27:25 smtp-test systemd[1]: Started chasquid mail daemon (service).
Jan 22 22:27:25 smtp-test chasquid[2229]: _ chasquid.go:68     chasquid starting (version 1.3-1)
Jan 22 22:27:25 smtp-test chasquid[2229]: _ config.go:86       Configuration:
Jan 22 22:27:25 smtp-test chasquid[2229]: _ config.go:87         Hostname: "smtp-test"
Jan 22 22:27:25 smtp-test chasquid[2229]: _ config.go:88         Max data size (MB): 50
Jan 22 22:27:25 smtp-test chasquid[2229]: _ config.go:89         SMTP Addresses: [systemd]
Jan 22 22:27:25 smtp-test chasquid[2229]: _ config.go:90         Submission Addresses: [systemd]
Jan 22 22:27:25 smtp-test chasquid[2229]: _ config.go:91         Submission+TLS Addresses: [systemd]
Jan 22 22:27:25 smtp-test chasquid[2229]: _ config.go:92         Monitoring address:
Jan 22 22:27:25 smtp-test chasquid[2229]: _ config.go:93         MDA: maildrop [-f %from% -d %to_user%]
Jan 22 22:27:25 smtp-test chasquid[2229]: _ config.go:94         Data directory: /var/lib/chasquid
Jan 22 22:27:25 smtp-test chasquid[2229]: _ config.go:95         Suffix separators: +
Jan 22 22:27:25 smtp-test chasquid[2229]: _ config.go:96         Drop characters: .
Jan 22 22:27:25 smtp-test chasquid[2229]: _ config.go:97         Mail log: <syslog>
Jan 22 22:27:25 smtp-test chasquid[2229]: _ config.go:98         Dovecot auth: false ("", "")
Jan 22 22:27:25 smtp-test chasquid[2229]: _ chasquid.go:105    Loading certificates
Jan 22 22:27:25 smtp-test chasquid[2229]: _ chasquid.go:132    Domain config paths:
Jan 22 22:27:25 smtp-test chasquid[2229]: ☠ chasquid.go:265    No entries found in "domains/"
Jan 22 22:27:25 smtp-test systemd[1]: chasquid.service: Main process exited, code=exited, status=1/FAILURE
Jan 22 22:27:25 smtp-test systemd[1]: chasquid.service: Failed with result 'exit-code'.
Jan 22 22:27:26 smtp-test systemd[1]: chasquid.service: Scheduled restart job, restart counter is at 9.
Jan 22 22:27:26 smtp-test systemd[1]: Stopped chasquid mail daemon (service).
Jan 22 22:27:26 smtp-test systemd[1]: chasquid.service: Start request repeated too quickly.
Jan 22 22:27:26 smtp-test systemd[1]: chasquid.service: Failed with result 'exit-code'.
Jan 22 22:27:26 smtp-test systemd[1]: Failed to start chasquid mail daemon (service).
Jan 22 22:27:26 smtp-test systemd[1]: chasquid-submission.socket: Failed with result 'service-start-limit-hit'.
Jan 22 22:27:26 smtp-test systemd[1]: chasquid-submission_tls.socket: Failed with result 'service-start-limit-hit'.
Jan 22 22:27:26 smtp-test systemd[1]: chasquid-smtp.socket: Failed with result 'service-start-limit-hit'.

Alberto Bertogli

unread,
Jan 22, 2021, 5:53:27 PM1/22/21
to Agam, chasquid
On Sat, Jan 23, 2021 at 12:37:31AM +0200, Agam wrote:
>I just tried running the following code on a fresh digital ocean 20 ubuntu
>machine:
>```
>sudo apt update
>sudo apt install chasquid
>chasquid-util user-add a...@mydomain.com
>chasquid-util print-config
>smtp-check mydomain.com
>```

All of that is fine. The current errors you're seeing are systemd
restarting chasquid *before* you add a domain, and then it gives up
trying.

After doing the above, try:

$ sudo systemctl restart chasquid

That should work.


It's possible, however, that it fails again if you don't have
certificates for mydomain.com, since chasquid needs certificates in
order to serve.

If you're not familiar with this issue, you can see this part of the
documentation on how to get certificates for your domains:

https://blitiri.com.ar/p/chasquid/howto/#tls-certificate

And then the first part of this to point chasquid to the letsencrypt
certificates (for policy reasons this can't be the default in
Ubuntu/Debian and has to be done manually):

https://blitiri.com.ar/p/chasquid/howto/#configure-chasquid

I hope this helps!

Thanks,
Alberto

Steve O

unread,
May 2, 2024, 4:50:54 PM5/2/24
to chasquid
× chasquid.service - chasquid mail daemon (service)
     Loaded: loaded (/lib/systemd/system/chasquid.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2024-05-02 13:07:56 CDT; 3s ago
TriggeredBy: × chasquid-submission.socket
             × chasquid-smtp.socket
             × chasquid-submission_tls.socket
       Docs: man:chasquid(1)
    Process: 285203 ExecStart=/usr/bin/chasquid (code=exited, status=1/FAILURE)
   Main PID: 285203 (code=exited, status=1/FAILURE)
        CPU: 17ms

May 02 13:07:56 mail.baby-back.com chasquid[285203]: _ chasquid.go:263      mail.baby-back.com
May 02 13:07:56 mail.baby-back.com chasquid[285203]: _ chasquid.go:276        adding aliases
May 02 13:07:56 mail.baby-back.com chasquid[285203]: ☠ server.go:218      Error listening: listen tcp :25: bind: permission denied
May 02 13:07:56 mail.baby-back.com systemd[1]: chasquid.service: Main process exited, code=exited, status=1/FAILURE
May 02 13:07:56 mail.baby-back.com systemd[1]: chasquid.service: Failed with result 'exit-code'.
May 02 13:07:56 mail.baby-back.com systemd[1]: chasquid.service: Scheduled restart job, restart counter is at 5.
May 02 13:07:56 mail.baby-back.com systemd[1]: Stopped chasquid mail daemon (service).
May 02 13:07:56 mail.baby-back.com systemd[1]: chasquid.service: Start request repeated too quickly.
May 02 13:07:56 mail.baby-back.com systemd[1]: chasquid.service: Failed with result 'exit-code'.
May 02 13:07:56 mail.baby-back.com systemd[1]: Failed to start chasquid mail daemon (service).

Steve O

unread,
May 2, 2024, 4:50:54 PM5/2/24
to chasquid
The problem is that the chasquid.service systemd file starts chasquid as a non root user, but tries the to bind to port 25, which is not allowed in most linux sytems.

On Friday, January 22, 2021 at 2:53:27 PM UTC-8 Alberto Bertogli wrote:

Steve O

unread,
May 2, 2024, 4:50:54 PM5/2/24
to chasquid
I get pretty much the same issue after following the instructions thing is running /user/bin/chasquid as root works just fine.
However doing su - chasquid results in This account is not currently available
chasquid user is confivured with /usr/sbin/noogin as a user.

Modifying the passwd file to allow chsquid to log in and then running sbin chasquid results in server.go:218 Error listening: listen tcp :25 bind: permission denied.

Steve O

unread,
May 2, 2024, 4:50:54 PM5/2/24
to chasquid
Is it possible there is more wrong that that?  I have the same issue.

Doing exactly what you said above, I get the following on smtp-check

2024/05/02 13:06:08 === STS policy
2024/05/02 13:06:08 Not available (lookup _mta-sts.baby-back.com on 127.0.0.53:53: no such host)
2024/05/02 13:06:08
2024/05/02 13:06:08 === MX:  1  mail.baby-back.com.
2024/05/02 13:06:08 SPF pass for 207.244.238.129: matched mx
2024/05/02 13:06:08 dial tcp 207.244.238.129:25: connect: connection refused

I think it's because chasquid doesnt start.  

On Friday, January 22, 2021 at 2:53:27 PM UTC-8 Alberto Bertogli wrote:

Alberto Bertogli

unread,
May 2, 2024, 6:20:21 PM5/2/24
to Steve O, chasquid
On Thu, May 02, 2024 at 10:48:25AM -0700, Steve O wrote:
>The problem is that the chasquid.service systemd file starts chasquid as a
>non root user, but tries the to bind to port 25, which is not allowed in
>most linux sytems.

The Debian package doesn't try to do that. The default config will get
the sockets from systemd.

chasquid will only try to bind to port 25 if you told it to by setting
`smtp_address` in the config. The default is to get the sockets via
systemd.

That way you can run chasquid as non-root without any special
privileges.

Steve O

unread,
May 3, 2024, 1:40:04 AM5/3/24
to Alberto Bertogli, chasquid
Awesome, thanks for the info! 

I must have updated the config, setting it back to only use smtpd fixed the issue.
Reply all
Reply to author
Forward
0 new messages