Using smtp with starttls

View: New views
7 Messages — Rating Filter:   Alert me  

Using smtp with starttls

by Maurí­cio CA :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I would like to use smtp.google.com SMTP to send e-mail, but I
see in 'mailer' that smtp:// urls do not include a field for user
name. Is smtp+starttls supported?

(Am I in the right path? Even if I could get smtp in 'mailer' I
don't think that would instruct 'mail' to send mail throw that
server. Is it possible to send mail using an user configured smtp
instead of the system MTA?)

Thanks for your help,
Maurício



_______________________________________________
Bug-mailutils mailing list
Bug-mailutils@...
http://lists.gnu.org/mailman/listinfo/bug-mailutils

Re: Using smtp with starttls

by Sergey Poznyakoff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Maurí­cio CA <mauricio.antunes@...> ha escrit:

> I would like to use smtp.google.com SMTP to send e-mail, but I
> see in 'mailer' that smtp:// urls do not include a field for user
> name. Is smtp+starttls supported?

Yes, STARTTLS is supported. But why do you need a user name for it?

> (Am I in the right path? Even if I could get smtp in 'mailer' I
> don't think that would instruct 'mail' to send mail throw that
> server. Is it possible to send mail using an user configured smtp
> instead of the system MTA?)

Yes, that's what `mailer' is for.

Regards,
Sergey


_______________________________________________
Bug-mailutils mailing list
Bug-mailutils@...
http://lists.gnu.org/mailman/listinfo/bug-mailutils

Re: Using smtp with starttls

by Maurí­cio CA :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> I would like to use smtp.google.com SMTP to send e-mail, but I
>> see in 'mailer' that smtp:// urls do not include a field for user
>> name. Is smtp+starttls supported?

> Yes, STARTTLS is supported. But why do you need a user name for it?

The config dialog for smtp in thunderbird includes a username
field. Without that, google smtp refuses delivering messages
and returns an authentication error. The smtp server used in
an office I used to work (smtp.terra.com.br) also worked like
that.

>> (Am I in the right path? Even if I could get smtp in 'mailer' I
>> don't think that would instruct 'mail' to send mail throw that
>> server. Is it possible to send mail using an user configured smtp
>> instead of the system MTA?)

> Yes, that's what `mailer' is for.

But

     mail --config-lint

says

     mail: Info: parsing file `/home/mauricio/.mail'
     /home/mauricio/.mail:4: unknown section `mailer'
     mail: Info: finished parsing file `/home/mauricio/.mail'

This is my .mail:

     mailbox {
       mailbox-pattern "imaps://mauricio.antunes%40gmail.com:PASS;AUTH=*@...";
     };
     mailer {
       url "smtp://smtp.google.com";
     }


Maurício



_______________________________________________
Bug-mailutils mailing list
Bug-mailutils@...
http://lists.gnu.org/mailman/listinfo/bug-mailutils

Re: Re: Using smtp with starttls

by Sergey Poznyakoff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Maurí­cio CA <mauricio.antunes@...> ha escrit:

> The config dialog for smtp in thunderbird includes a username
> field. Without that, google smtp refuses delivering messages
> and returns an authentication error. The smtp server used in
> an office I used to work (smtp.terra.com.br) also worked like
> that.

Are you sure you don't need ESMTP AUTH?

>     mail --config-lint

Nope, mail is special:  it does not use the MU configuration framework
(by the way, this fact is emphasized the docs). Instead it uses its
own configuration file (/etc/mailrc - as site-wide, and
~/.mailrc as per-user one). It's syntax is different and matches
that of the POSIX mailx utility (again, it is fully described in the
docs). E.g. to set the default mailer you need to add the following to
your ~/.mailrc:

  set sendmail "smtp://whatever.it.is"

Regards,
Sergey


_______________________________________________
Bug-mailutils mailing list
Bug-mailutils@...
http://lists.gnu.org/mailman/listinfo/bug-mailutils

Re: Using smtp with starttls

by Maurí­cio CA :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Nope, mail is special:  it does not use the MU configuration framework
> (by the way, this fact is emphasized the docs).

This deserves some clarification. 'mail' does check .mail file
using MU framework for at least 'mailbox' statement, since that's
how I configured my imap account. Is that deprecated behavior? I
intended to write a patch with a sugestion for a documentation
change, but I could not find a list of what statements 'mail' does
read from .mail file.

> [...] set the default mailer you need to add the following to
> your ~/.mailrc:
>
>   set sendmail "smtp://whatever.it.is"

with

     sendmail="smtp://smtp.google.com"
     set verbose

I get this lines:

     [...]
     DEBUG: TLS negotiation succeeded
     DEBUG: mu_mailer_send_message(): using user's address: mauricio@...
     DEBUG: > MAIL FROM:<mauricio@...>
     DEBUG: < 553 5.1.8 <mauricio@...>... Domain of sender address mauricio@... does not exist
     DEBUG: > QUIT

My domain name actually do not exist, as I'm using a cable
provider. Am I doing something wrong?

Thanks,
Maurício



_______________________________________________
Bug-mailutils mailing list
Bug-mailutils@...
http://lists.gnu.org/mailman/listinfo/bug-mailutils

Re: Re: Using smtp with starttls

by Sergey Poznyakoff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Maurí­cio CA <mauricio.antunes@...> ha escrit:

> This deserves some clarification. 'mail' does check .mail file
> using MU framework for at least 'mailbox' statement, since that's
> how I configured my imap account. Is that deprecated behavior?

It is a side-effect of using the general-purpose configuration
framework. It is not deprecated, but certainly not encouraged,
either. I am not sure whether it is necessary or not. The mail
utility has its own configuration files which give a very detailed
control over its behavior (hmm, well, now that I wrote this it came to
me that it does not allow to set default mailbox URL, but that's
easy to fix anyway).

> >     DEBUG: < 553 5.1.8 <mauricio@...>... Domain of sender address mauricio@... does not exist

It does not exist, actually, so the server is right in not allowing
mails from it. Use a valid sender address (e.g. the one you are
using when sending to this list) and it will accept it.

Regards,
Sergey


_______________________________________________
Bug-mailutils mailing list
Bug-mailutils@...
http://lists.gnu.org/mailman/listinfo/bug-mailutils

Re: Re: Using smtp with starttls

by Sergey Poznyakoff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Maurí­cio CA <mauricio.antunes@...> ha escrit:

> but I could not find a list of what statements 'mail' does
> read from .mail file.

I've forgotten to tell that you can get a detailed description of
these with the following command:

  mail --config-help
 
The `--config-help' option applies to all Mailutils programs.

Regards,
Sergey


_______________________________________________
Bug-mailutils mailing list
Bug-mailutils@...
http://lists.gnu.org/mailman/listinfo/bug-mailutils