unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: Joshua Branson <jbranso@dismail.de>,
	Joshua Branson via <help-guix@gnu.org>,
	help-guix@gnu.org
Subject: Re: Troubles with opensmtpd
Date: Tue, 27 Oct 2020 07:19:37 -0400	[thread overview]
Message-ID: <FF409336-18E0-4DD7-88AE-8B4131AE8592@lepiller.eu> (raw)
In-Reply-To: <875z6w88t9.fsf@dismail.de>



Le 27 octobre 2020 02:46:58 GMT-04:00, Joshua Branson via <help-guix@gnu.org> a écrit :
>Hello!
>
>(define %smtpd.conf
>  (mixed-text-file "smtpd.conf"
>                   "
># This is the smtpd server system-wide configuration file.
># See smtpd.conf(5) for more information.
># borrowed from the archlinux guix
>#
>https://wiki.archlinux.org/index.php/OpenSMTPD#Simple_OpenSMTPD/mbox_configuration
>
># My TLS certificate and key
>table aliases file:/etc/aliases
>pki mail.gnucode.me cert
>\"/etc/letsencrypt/live/gnucode.me/fullchain.pem\"
>pki mail.gnucode.me key
>\"/etc/letsencrypt/live/gnucode.me/privkey.pem\"
>
># for now I am NOT using the virtual credentials
>#table creds \"" creds "\"
>table vdoms \"" vdoms "\"
>table vusers \"" vusers "\"
>
># listen on eth0, fairly explainatory
>listen on eth0 tls pki mail.gnucode.me
># if I uncomment this next line, smtpd will break...what's wrong with
>it?
>listen on eth0 port 465 smtps pki mail.gnucode.me # auth <creds>
>listen on eth0 port 587 tls-require pki mail.gnucode.me # auth <creds>
>
>action \"receive\" maildir virtual <vusers>
>action \"send\" relay
>
>match from any for domain <vdoms> action \"receive\"
>match for any action \"send\""))
>

This looks correct, but for the last line I have instead match for any from any auth action send.

Not sure if that makes a difference though. My understanding is that if you don't specify from where, it's local by default, and authenticated messages are supposed to be treated as local.

>
>I define the opensmtpd service this way:
>
>#+BEGIN_SRC scheme
>(service mail-aliases-service-type
>         '(("webmaster" "root")
>           ("postmaster" "root")
>           ("abuse" "root")))
>
>;; I can test send an email from my ssh machine via:
>;; cat test-email.txt  | msmtp -- jbranso@dismail.de
>(service opensmtpd-service-type
>         (opensmtpd-configuration
>          (config-file %smtpd.conf)))
>#+END_SRC
>
>Currently when I try to send an email, via msmtp, I get this error:
>
>#+BEGIN_SRC sh :results output :exports both
>cat testmail.txt | msmtp  -- jbranso@dismail.de
>#+END_SRC
>
>#+RESULTS:
>: msmtp: the server does not support authentication
>: msmtp: could not send mail (account default from
>/home/joshua/.msmtprc)
>

I think the message is pretty clear: your server doesn't ask for a password, but msmtp tries to send one.  You'll have to uncomment the auth table and the auth argument on the listen on directives.

Maybe you could try and use openssl to test and see what the server answers exactly.

>Any help would be awesome!
>
>Thanks,
>
>Joshua
>


  parent reply	other threads:[~2020-10-27 12:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27  6:46 Troubles with opensmtpd Joshua Branson via
2020-10-27 11:19 ` Tobias Geerinckx-Rice
2020-10-28 23:13   ` Joshua Branson
2020-10-27 11:19 ` Julien Lepiller [this message]
2020-10-28 23:10   ` Joshua Branson
2020-11-03 20:39   ` Troubles with opensmtpd-filter-dkimsign Joshua Branson
2020-11-03 21:15     ` Tobias Geerinckx-Rice
2020-11-04  0:39       ` Joshua Branson
2020-11-04  0:54       ` Joshua Branson
2020-11-04  1:20         ` Tobias Geerinckx-Rice
2020-11-03 21:22     ` Julien Lepiller
2020-11-04  0:37       ` Joshua Branson
2020-10-27 11:21 ` Troubles with opensmtpd Julien Lepiller
2020-10-27 12:21 ` Tobias Geerinckx-Rice

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FF409336-18E0-4DD7-88AE-8B4131AE8592@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=help-guix@gnu.org \
    --cc=jbranso@dismail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).