Re: mutt can't send emails via localhost 25 with error 503 5.5.1

2022-03-08 Thread Marcus MERIGHI
Hello Jiri!

j...@navratil.cz (Jiri Navratil), 2022.03.08 (Tue) 18:19 (CET):
> Thank you for this advice.
> I never used this way. When adding just
> set sendmail = /usr/sbin/sendmail
> there was no improvement. When I also used
> unset smtp_url

Ah, yes, these are certainly mutually exclusive. 

Using the sendmail binary for local enqueueing and smtp at the 
same time doesn't make much sense.

> Then I got
> Error sending message, child exited 127 (Exec error.).
> Could not send the message.

You are on OpenBSD, if I remember this thread correctly.

What does 
 
print testmail | mail -s testmail s...@adress.tld

do? This should call the same binary as the

set sendmail = /usr/sbin/sendmail

configuration option.

This way we'll see if local enqueueing[*] is broken on your machine.

See mailwrapper(8) and mailer.conf(5) for all the gory details.

Marcus

[*] I love the spelling of this word.

> Not sure if I have to adjust permissions of the wrapper or do anything
> else, so for now I will try to fix the smtp_url approach first.
> 
> Best regards,
> Jiří
> 
> On Tue, Mar 08, 2022 at 09:52:45AM +0100, Marcus MERIGHI wrote:
> > Hello!
> > 
> > j...@navratil.cz (Jiri Navratil), 2022.03.06 (Sun) 14:28 (CET):
> > > I'm using notebook with OpenBSD and every email from mail and from mutt
> > > goes firstly to  OpenSMTPD on localhost and then are relayed to my
> > > server with static IP.
> > > I have been using in OpenBSD 6.7 for mutt
> > > set smtp_url="smtp://127.0.0.1"
> > 
> > This is not a solution and not an answer to your question, 
> > but why don't you just use 
> > 
> > set sendmail = /usr/sbin/sendmail
> > 
> > in your muttrc(5)?
> > 
> > Marcus




Re: mutt can't send emails via localhost 25 with error 503 5.5.1

2022-03-08 Thread Jiri Navratil
Thank you Edgar for your config. The inet4 parameter was promising, as
I'm not using inet6, but I still getting the error.

I will try to do a new fresh install on another machine to test it there.
The existing installation was fresh install and restore of some parts
from 6.7 backup. So may be I damaged the crypto subsystem somehow.

Thank you,
Jiří

On Sun, Mar 06, 2022 at 03:39:29PM -0600, Edgar Pettijohn wrote:
> 
> On 3/6/22 07:58, Pete Long wrote:
> > On Sun, Mar 06, 2022 at 02:28:54PM +0100, Jiri Navratil wrote:
> > > Hi,
> > > 
> > > I'm using notebook with OpenBSD and every email from mail and from mutt
> > > goes firstly to  OpenSMTPD on localhost and then are relayed to my
> > > server with static IP.
> > > 
> > > I have been using in OpenBSD 6.7 for mutt
> > > 
> > > set smtp_url="smtp://127.0.0.1"
> > > 
> > > but after switch to OpenBSD 7.0, I'm getting from OpenSMTPD
> > > 
> > > SMTP session failed: 503 5.5.1 Invalid command: Command not supported
> > [...]
> > 
> > Hi Jiri,
> > 
> > I have a slightly different configuration but all hosts are on the LAN.
> > 
> > Here are what I believe to be the relevant config lines for Mutt. I'm
> > using the same version as yourself: Mutt 2.1.3 (2021-09-10), which is
> > running on OpenBSD 7.0. OpenSMTPD is version 7.0.0.
> > 
> > 
> > 
> > set smtp_url = "smtp://ch...@chunkymonkey.tld:587/"
> > set smtp_pass = "superpassw0rd"
> > set ssl_starttls=yes
> > set ssl_verify_host=no
> > 
> > 
> > Pete.
> > 
> 
> I'm using thunderbird but its a similar setup. My smtpd.conf:
> 
> 
> edgar@bsd:~ $ cat /usr/local/etc/mail/smtpd.conf
> #   $OpenBSD: smtpd.conf,v 1.10 2018/05/24 11:40:17 gilles Exp $
> 
> # This is the smtpd server system-wide configuration file.
> # See smtpd.conf(5) for more information.
> pki localhost cert "/etc/ssl/localhost.crt"
> pki localhost key "/etc/ssl/localhost.key"
> 
> table aliases file:/etc/mail/aliases
> table secrets file:/etc/mail/secrets
> table passwd file:/etc/mail/passwd
> 
> # To accept external mail, replace with: listen on all
> #
> listen on lo0 tls pki localhost inet4 auth-optional 
> 
> action "local" maildir alias 
> action "relay" relay host smtp+tls://ed...@mail.obfuscated.com:587 auth
> 
> 
> # Uncomment the following to accept external mail for domain "example.org"
> #
> # match from any for domain "example.org" action "local"
> match for local action "local"
> match from local for any action "relay"
> match auth from any for any action "relay"
> 
> And then I just point thunderbird to 127.0.0.1 port 25 and it handles the
> rest.
> 
> table aliases is stock with the addition of my user.
> 
> table secrets contains the relay password.
> 
> table passwd is a mapping from my user to a password encrypted using
> smtpctl.
> 
> 
> Edgar


smime.p7s
Description: S/MIME cryptographic signature


Re: mutt can't send emails via localhost 25 with error 503 5.5.1

2022-03-08 Thread Marcus MERIGHI
Hello!

j...@navratil.cz (Jiri Navratil), 2022.03.06 (Sun) 14:28 (CET):
> I'm using notebook with OpenBSD and every email from mail and from mutt
> goes firstly to  OpenSMTPD on localhost and then are relayed to my
> server with static IP.
> I have been using in OpenBSD 6.7 for mutt
> set smtp_url="smtp://127.0.0.1"

This is not a solution and not an answer to your question, 
but why don't you just use 

set sendmail = /usr/sbin/sendmail

in your muttrc(5)?

Marcus