help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Troubles with opensmtpd


From: Julien Lepiller
Subject: Re: Troubles with opensmtpd
Date: Tue, 27 Oct 2020 07:19:37 -0400
User-agent: K-9 Mail for Android


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
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]