# git send-email says AUTH is unknown command?

3 messages from 2021-05-06 to 2021-05-06. Participants: Phillip Susi, Ævar Arnfjörð Bjarmason, Jeff King.
Thread: https://gitlist.dev/t/55633

## Phillip Susi, 2021-05-06 13:30

Subject: git send-email says AUTH is unknown command?
Message-ID: <878s4sc7gr.fsf@vps.thesusis.net>
URL: https://gitlist.dev/e/878s4sc7gr.fsf%40vps.thesusis.net

```
git send-email prompts for my SMTP password then says:
Command unknown: 'AUTH' at /usr/lib/git-core/git-send-email line 1573.

That line reads:

smtp_auth_maybe or die $smtp->message;

Why is it complaining that it does not know what AUTH means?  It is
connecting to port 25 and /should/ be using STARTTLS.


```

## Ævar Arnfjörð Bjarmason, 2021-05-06 15:22

Subject: Re: git send-email says AUTH is unknown command?
Message-ID: <87k0obvqa1.fsf@evledraar.gmail.com>
URL: https://gitlist.dev/e/87k0obvqa1.fsf%40evledraar.gmail.com
In-Reply-To: <878s4sc7gr.fsf@vps.thesusis.net>

```

On Thu, May 06 2021, Phillip Susi wrote:

> git send-email prompts for my SMTP password then says:
> Command unknown: 'AUTH' at /usr/lib/git-core/git-send-email line 1573.
>
> That line reads:
>
> smtp_auth_maybe or die $smtp->message;
>
> Why is it complaining that it does not know what AUTH means?  It is
> connecting to port 25 and /should/ be using STARTTLS.

This message is from your server indirectly, i.e. there is no AUTH verb
supported by it.

I'm almost certain that you'll find that you cannot in fact auth on port
25 on this server, and must use another port to do SSL from the start,
i.e. not STARTSSL[1].

We should probably intercept this in particular and emit a better error,
patches welcome :)

1. https://metacpan.org/release/libnet/source/lib/Net/SMTP.pm#L169

```

## Jeff King, 2021-05-06 17:06

Subject: Re: git send-email says AUTH is unknown command?
Message-ID: <YJQiFYYENfsZk7B+@coredump.intra.peff.net>
URL: https://gitlist.dev/e/YJQiFYYENfsZk7B%2B%40coredump.intra.peff.net
In-Reply-To: <87k0obvqa1.fsf@evledraar.gmail.com>

```
On Thu, May 06, 2021 at 05:22:31PM +0200, Ævar Arnfjörð Bjarmason wrote:

> 
> On Thu, May 06 2021, Phillip Susi wrote:
> 
> > git send-email prompts for my SMTP password then says:
> > Command unknown: 'AUTH' at /usr/lib/git-core/git-send-email line 1573.
> >
> > That line reads:
> >
> > smtp_auth_maybe or die $smtp->message;
> >
> > Why is it complaining that it does not know what AUTH means?  It is
> > connecting to port 25 and /should/ be using STARTTLS.
> 
> This message is from your server indirectly, i.e. there is no AUTH verb
> supported by it.
> 
> I'm almost certain that you'll find that you cannot in fact auth on port
> 25 on this server, and must use another port to do SSL from the start,
> i.e. not STARTSSL[1].

Alternatively, it may be that the server would prefer port 587 (with
STARTTLS), which is typically used for "submission" (i.e., originating
new messages from authenticated users, versus the normal port 25 for
MTA's routing messages between them).

-Peff

```
