I'm confused

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

I'm confused

Norman Shapiro-3
What with the flurry of Email's I'm confused. Do you have an nmh configuration
that will let me use inc to fetch Email from Gmail without dumping core,
and let me use send to send  Email to Gmail without post hanging?

If so would you be willing to send it to me, again?

Thanks much,

    Norman Shapiro

Reply | Threaded
Open this post in threaded view
|

Re: I'm confused

Howard Bampton
Speaking as another long time mh/nmh user, it would be nice to have a gmail/nmh/3rd party glue configuration guide in one place. Something along the lines of:

For gmail, you want to set it up for POP3 access and these other settings, which is found here (as of 2019)

For nmh, a sample set of config files (we are pretty close here).

As best I can tell, you do need some 3rd party stuff (fetchmail?) to make the two talk. Add that to the mix, with the disclaimers that the nmh folks are providing it as a worked at the time of publishing example.

If we get something that works, I'll volunteer to polish the wording (I do proofreading from time to time). I just lack the knowledge on implementation.

gmail does some things acceptably, but I have some use models where nmh is the correct tool for the job.

On Fri, Dec 6, 2019 at 1:04 PM <[hidden email]> wrote:
What with the flurry of Email's I'm confused. Do you have an nmh configuration
that will let me use inc to fetch Email from Gmail without dumping core,
and let me use send to send  Email to Gmail without post hanging?

If so would you be willing to send it to me, again?

Thanks much,

    Norman Shapiro

Reply | Threaded
Open this post in threaded view
|

Re: I'm confused

Ken Hornstein-2
In reply to this post by Norman Shapiro-3
>What with the flurry of Email's I'm confused. Do you have an nmh configuration
>that will let me use inc to fetch Email from Gmail without dumping core,
>and let me use send to send  Email to Gmail without post hanging?
>
>If so would you be willing to send it to me, again?

Let's work on one problem at a time (post hanging ... I'm not sure what
is going wrong there, yet).

Create a .netrc in your home directory with the following line:

machine pop.gmail.com login [hidden email] password foobar

Or, whatever goes in for "foobar" above.  Note the .netrc file must be
mode 600 (chmod 600 .netrc).

Then try:

% inc -host pop.gmail.com -port 995 -initialtls -sasl -user [hidden email]

And see what that does.

--Ken

Reply | Threaded
Open this post in threaded view
|

Re: I'm confused

Ken Hornstein-2
In reply to this post by Howard Bampton
>Speaking as another long time mh/nmh user, it would be nice to have a
>gmail/nmh/3rd party glue configuration guide in one place.

I think it was you before who mentioned this.  And I completely agree!
It's just finding the time to do it.

>As best I can tell, you do need some 3rd party stuff (fetchmail?) to make
>the two talk.

Yeah, this is part of the confusion.

You absolutely do NOT need any additional components to talk to a "normal"
modern mail server with nmh 1.7.1 (we have a bug dealing with password
prompting that Norm is running into; should we release 1.7.2?).  A lot of
people will tell you, "I use fetchmail with nmh!".  And I understand why,
because for a very long time you did need something like fetchmail to
work properly with nmh, and so they set that up 15 years ago and have
no desire to change it.  If you choose to use fetchmail or a local SMTP
server with nmh, that is fine; continue to do that!  But it is not required.

--Ken

Reply | Threaded
Open this post in threaded view
|

Re: I'm confused

Norman Shapiro-3
In reply to this post by Ken Hornstein-2
Ken Hornstein <[hidden email]> writes:

>>What with the flurry of Email's I'm confused. Do you have an nmh configur=
>ation
>>that will let me use inc to fetch Email from Gmail without dumping core,
>>and let me use send to send  Email to Gmail without post hanging?
>>
>>If so would you be willing to send it to me, again?
>
>Let's work on one problem at a time (post hanging ... I'm not sure what
>is going wrong there, yet).
>
>Create a .netrc in your home directory with the following line:
>
>machine pop.gmail.com login [hidden email] password foobar
>
>Or, whatever goes in for "foobar" above.  Note the .netrc file must be
>mode 600 (chmod 600 .netrc).
>
>Then try:
>
>% inc -host pop.gmail.com -port 995 -initialtls -sasl -user Normanzalmonsh=
>[hidden email]
>
>And see what that does.
>
It yielded:

inc: no mail to incorporate

That makes no sense, but it's a problem that I will have to deal with.

As a test, I replaced "[hidden email]" with
"[hidden email]". That yielded, as expeceted:

inc: Authentication failed: -ERR [AUTH] Username and password not accepted.

So it looks like maybe it's working.

But it will be useless until the post hanging  problem is solved.


    Norman Shapiro

Reply | Threaded
Open this post in threaded view
|

Re: I'm confused

Ken Hornstein-2
>But it will be useless until the post hanging  problem is solved.

In your mts.conf file, what does the "mts" line say?

--Ken

Reply | Threaded
Open this post in threaded view
|

Re: I'm confused

Ralph Corderoy
In reply to this post by Norman Shapiro-3
Hi Norm,

> > % inc -host pop.gmail.com -port 995 -initialtls -sasl -user [hidden email]
> >
> > And see what that does.
>
> It yielded:
>
> inc: no mail to incorporate

Try it again.  You should have an email from me waiting.
Tell us what inc reports this next time.

--
Cheers, Ralph.

Reply | Threaded
Open this post in threaded view
|

Re: I'm confused

Norman Shapiro-3
Ralph Corderoy <[hidden email]> writes:

>Hi Norm,
>
>> > % inc -host pop.gmail.com -port 995 -initialtls -sasl -user Normanzal=
>[hidden email]
>> >
>> > And see what that does.
>>
>> It yielded:
>>
>> inc: no mail to incorporate
>
>Try it again.  You should have an email from me waiting.
>Tell us what inc reports this next time.
>
It yielded:

inc: no mail to incorporate

    Norman Shapiro

Reply | Threaded
Open this post in threaded view
|

Re: I'm confused

Norman Shapiro-3
In reply to this post by Ken Hornstein-2
Ken Hornstein <[hidden email]> writes:
>>But it will be useless until the post hanging  problem is solved.
>
>In your mts.conf file, what does the "mts" line say?

mts: smtp
    Norman Shapiro

Reply | Threaded
Open this post in threaded view
|

Re: I'm confused

Ralph Corderoy
In reply to this post by Norman Shapiro-3
Hi Norm,

> > > It yielded:
> > >
> > > inc: no mail to incorporate
> >
> > Try it again.  You should have an email from me waiting.
> > Tell us what inc reports this next time.
>
> It yielded:
>
> inc: no mail to incorporate

That's odd.  You're used to fetchmail and it's worked for you in the
past.  How about you try that?  In your /root/.fetchmailrc you can add
Gmail with this at the end, changing ‘foobar’:

    skip gmail via pop.gmail.com proto imap
        user "[hidden email]" is norm
        password "foobar" ssl

The ‘skip’ instead of ‘poll’ means that the account won't be accessed by
fetchmail unless it's explicitly named.  This means your existing run
of fetchmail will just continue with imap.rawbw.com and not Gmail.

To then test retrieval from Gmail, run

    fetchmail -f /root/.fetchmailrc -a gmail

The ‘-a’ means to fetch all emails, including those that Gmail thinks
have been ‘seen’.  It might be useful just for this test.

--
Cheers, Ralph.

Reply | Threaded
Open this post in threaded view
|

Re: I'm confused

Norman Shapiro-3
Ralph Corderoy <[hidden email]> writes:

>Hi Norm,
>
>> > > It yielded:
>> > >
>> > > inc: no mail to incorporate
>> >=20
>> > Try it again.  You should have an email from me waiting.
>> > Tell us what inc reports this next time.
>>
>> It yielded:
>>
>> inc: no mail to incorporate
>
>That's odd.  You're used to fetchmail and it's worked for you in the
>past.  How about you try that?  In your /root/.fetchmailrc you can add
>Gmail with this at the end, changing ‘foobar’:
>
>skip gmail via pop.gmail.com proto imap
>user "[hidden email]" is norm
>password "foobar" ssl
>
>The ‘skip’ instead of ‘poll’ means that the account won't be accessed by
>fetchmail unless it's explicitly named.  This means your existing run
>of fetchmail will just continue with imap.rawbw.com and not Gmail.
>
>To then test retrieval from Gmail, run
>
>fetchmail -f /root/.fetchmailrc -a gmail
>
>The ‘-a’ means to fetch all emails, including those that Gmail thinks
>have been ‘seen’.  It might be useful just for this test.
>
>--
>Cheers, Ralph.

When I do that I get:

fetchmail: WARNING: Running as root is discouraged.
Enter password for root@gmail:
fetchmail: couldn't find canonical DNS name of gmail (gmail): Name or service not known
fetchmail: Query status=11 (DNS)

Comments:

Line 1: I aways get that warning. My script ignores it.

Line 2: I don't know what is meant by "password for root@gmail".  But
no matter what I enter there, including: my password, root's password,
a nonsense string, and the gmail password, the result is the same.

When I give fetchmail a -v argument I get:

fetchmail: WARNING: Running as root is discouraged.
Enter password for root@gmail:
fetchmail: 6.3.17 querying gmail (protocol auto) at Sat 07 Dec 2019 07:05:01 AM PST: poll started
fetchmail: 6.3.17 querying gmail (protocol IMAP) at Sat 07 Dec 2019 07:05:01 AM PST: poll started
fetchmail: couldn't find canonical DNS name of gmail (gmail): Name or service not known
fetchmail: 6.3.17 querying gmail (protocol IMAP) at Sat 07 Dec 2019 07:05:01 AM PST: poll completed
fetchmail: 6.3.17 querying gmail (protocol auto) at Sat 07 Dec 2019 07:05:01 AM PST: poll completed
fetchmail: Query status=11 (DNS)
fetchmail: normal termination, status 11

    Norman Shapiro

Reply | Threaded
Open this post in threaded view
|

Re: I'm confused

Ralph Corderoy
Hi Norm,

> > In your /root/.fetchmailrc you can add Gmail with this at the end,
> > changing `foobar':
> >
> >     skip gmail via pop.gmail.com proto imap
> >         user "[hidden email]" is norm
> >         password "foobar" ssl
> ...
> >     fetchmail -f /root/.fetchmailrc -a gmail
>
> When I do that I get:
>
>     fetchmail: WARNING: Running as root is discouraged.
>     Enter password for root@gmail:
>     fetchmail: couldn't find canonical DNS name of gmail (gmail):
>         Name or service not known

That means it didn't see that new `skip gmail' entry that you just added
to /root/.fetchmailrc and that's odd because you told fetchmail to use
that configuration file with the `-f /root/.fetchmailrc' I gave above.

Without seeing the `skip gmail', fetchmail thinks the gmail you've given
is a local host to contact and thus asks for the password for your
username, root, at that hostname: root@gmail.

So double-check that you added that `skip gmail' paragraph correctly,
including not making it `skip Gmail' with a capital G.  And that
`-f /root/.fetchmailrc' was passed to fetchmail.

fetchmail will show its understanding of a configuration file entry with
-V.  This confirms it is seeing it.  It doesn't fetch any mail when
doing this.

    fetchmail -f /root/.fetchmailrc -V gmail

--
Cheers, Ralph.

Reply | Threaded
Open this post in threaded view
|

Re: I'm confused

Norman Shapiro-3
I can now receive Email directed to a Gmail account.  Thank you.

But I can't send Email until the post hanging problem is solved, or
somebody figures out way to get around it.


    Norman Shapiro

Reply | Threaded
Open this post in threaded view
|

Re: I'm confused

David Levine-3
Norm writes:

> I can now receive Email directed to a Gmail account.  Thank you.

Great!

> But I can't send Email until the post hanging problem is solved, or
> somebody figures out way to get around it.

post shouldn't hang, of course.

Can you verify that you can connect to the gmail smtp server by
entering the following at a shell prompt:

    telnet smtp.gmail.com 587

If that responds, then hit ^] (Ctrl right bracket), then enter "quit"
at the telnet prompt.

David

Reply | Threaded
Open this post in threaded view
|

Re: I'm confused

Ralph Corderoy
Hi Norm,

David wrote:
> post shouldn't hang, of course.
>
> Can you verify that you can connect to the gmail smtp server by
> entering the following at a shell prompt:
>
>     telnet smtp.gmail.com 587
>
> If that responds, then hit ^] (Ctrl right bracket), then enter "quit"
> at the telnet prompt.

If that goes well, you could try using mhmail(1) to send an email using
Gmail as your outgoing SMTP server.  I just did this and it worked.

Ensure your ~/.netrc has permissions 0600 and has the line

    machine smtp.gmail.com login [hidden email] password foobar

Change foobar in that line to your password.

Send the email to me by pasting this command.

    seq 314 |
    fmt |
    mhmail -profile -to [hidden email] \
        -from [hidden email] \
        -subject 'Test using mhmail.' -msgid \
        -server smtp.gmail.com -port 587 -sasl \
        -user [hidden email] -tls -snoop

Text will now appear, starting something like

    Trying to connect to "smtp.gmail.com" ...
    Connecting to 66.102.1.108:587...
    <= 220 smtp.gmail.com ESMTP 60sm28745245wrn.86 - gsmtp

It should hopefully end with

    (tls-encrypted) => DATA
    (tls-decrypted) <= 354  Go ahead...
    (tls-encrypted) => .
    (tls-decrypted) <= 250 2.0.0 OK...
    (tls-encrypted) => QUIT
    (tls-decrypted) <= 221 2.0.0 closing connection...

--
Cheers, Ralph.