chasquid icon indicating copy to clipboard operation
chasquid copied to clipboard

Send-only server without dovecot?

Open usrtax opened this issue 3 years ago • 1 comments

I use gmail for receive emails, I just want run a self-host smtp server that I can send emails without limit

I've already configured spf with my own server's ip address

  ❯ nslookup -type=txt  _spf.user.tax
  _spf.user.tax   text = "v=spf1 ip4:62.171.170.189 ip6:2a02:c207:2098:9386::1 ~all"

  ❯ nslookup -type=txt  user.tax
  user.tax        text = "[email protected]"
  user.tax        text = "v=spf1 a mx include:_spf.user.tax include:_spf.google.com include:spf.forwardemail.net ~all"

My question now is how to run chasquid without dovecot?

Is there any tutorial or example code like this How To Install and Configure Postfix as a Send-Only SMTP Server on Ubuntu 22.04

Because I think I don't need to use dovecot.

usrtax avatar Aug 27 '22 01:08 usrtax

If you don't need your server to store emails locally, like in your case where you only want to send, you don't need dovecot.

To set this up, you can follow the how-to guide, and just skip the Dovecot section. For example, naming your server sender.user.tax.

Then, use chasquid-util user-add [email protected] to add the users you'll use to send email.

And finally, add aliases to redirect incoming email to those users to the correct location. This should only be needed if you send emails to yourself, but can be convenient.

On your client, get them to use the server sender.user.tax, with user [email protected] (including the domain is important, it has to match what you used in chasquid-util above).

I hope this helps!

albertito avatar Aug 27 '22 16:08 albertito

journalctl -xeu chasquid see error: open domains/user.tax/users: permission denied

fixed with chown chasquid:chasquid -R /etc/chasquid


chasquid 1.8-1 (source date: 2021-09-10 17:55:06 +0800 CST) image

see the image above , I tryed add user , but 535 5.7.8 Incorrect user or password

I use chasquid-util authenticate [email protected] --password=CEQGzVgLTdZ2xfpg it output Authentication succeeded

I tryed systemctl restart chasquid , still can't login

I use the default config without any change ( only add user and setup ssl certificates )

debug output [2022-09-28 10:36:22] DEBUG [vi5hmMQrzc0] Resolved smtp.user.tax as 62.171.170.189 [cache miss] [2022-09-28 10:36:22] INFO [vi5hmMQrzc0] Secure connection established to 62.171.170.189:465 [2022-09-28 10:36:22] DEBUG [vi5hmMQrzc0] S: 220 smtp.user.tax ESMTP chasquid [2022-09-28 10:36:22] DEBUG [vi5hmMQrzc0] C: EHLO [127.0.0.1] [2022-09-28 10:36:22] DEBUG [vi5hmMQrzc0] S: 250-smtp.user.tax - Your hour of destiny has come. [2022-09-28 10:36:22] DEBUG [vi5hmMQrzc0] S: 250-8BITMIME [2022-09-28 10:36:22] DEBUG [vi5hmMQrzc0] S: 250-PIPELINING [2022-09-28 10:36:22] DEBUG [vi5hmMQrzc0] S: 250-SMTPUTF8 [2022-09-28 10:36:22] DEBUG [vi5hmMQrzc0] S: 250-ENHANCEDSTATUSCODES [2022-09-28 10:36:22] DEBUG [vi5hmMQrzc0] S: 250-SIZE 52428800 [2022-09-28 10:36:22] DEBUG [vi5hmMQrzc0] S: 250-AUTH PLAIN [2022-09-28 10:36:22] DEBUG [vi5hmMQrzc0] S: 250 HELP [2022-09-28 10:36:22] DEBUG [vi5hmMQrzc0] SMTP handshake finished [2022-09-28 10:36:22] DEBUG [vi5hmMQrzc0] C: AUTH PLAIN AGlAdXNlci50YXgALyogc2VjcmV0ICov [2022-09-28 10:36:22] DEBUG [vi5hmMQrzc0] S: 535 5.7.8 Incorrect user or password [2022-09-28 10:36:22] INFO [vi5hmMQrzc0] User "[email protected]" failed to authenticate [2022-09-28 10:36:22] DEBUG [vi5hmMQrzc0] Closing connection to the server using "end" [2022-09-28 10:36:22] ERROR Send Error: Invalid login: 535 5.7.8 Incorrect user or password

usrtax avatar Sep 28 '22 10:09 usrtax

It works , thanks notice chasquid-util user-add [email protected] default dirtionary user is root need to chown chasquid:chasquid -R /etc/chasquid

image image

usrtax avatar Sep 28 '22 23:09 usrtax