Author Topic: PMMail questions.  (Read 6942 times)

ivan

  • Hero Member
  • *****
  • Posts: 1557
  • Karma: +17/-0
    • View Profile
PMMail questions.
« on: January 17, 2021, 08:09:18 pm »
Since yahoo mail have been messing about and now no longer forward mail to other accounts I have been looking for a simple way to see the odd e-mail that arrives in my yahoo account.

The problem is the yahoo account requires secure transfer which my old version of PMMail does not have but I think it is built in in the new versions of PMMail.  Working on the assumption that it was I downloaded the WPI file to my test machine, renamed the mail directory to something else and installed the new PMMail.  I then discovered that I had to have aspell installed as well, got that installed  and started reading the manual.

Maybe I need new glasses for my 80 year old eyes because I can't find any information about setting up a secure transfer.  I tried setting up the necessary account for pop.mail.yahoo.com on port 995 but it does not work (this is the test account required at startup).

Now the question is: is this secure transfer only available on the paid for version of PMMail but not on the try out version.  If that is the case why isn't that fact mentioned especially since that is the very thing I need to try out to see if it will do what I want.  Or have I missed some vital process in the install or setup?

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: PMMail questions.
« Reply #1 on: January 17, 2021, 09:00:18 pm »
I believe you need something like https://hobbes.nmsu.edu/download/pub/os2/apps/internet/misc/stunnel-4.05-os2.zip to tunnel your connection through SSL.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: PMMail questions.
« Reply #2 on: January 17, 2021, 09:32:16 pm »
Quote
Maybe I need new glasses for my 80 year old eyes because I can't find any information about setting up a secure transfer.  I tried setting up the necessary account for pop.mail.yahoo.com on port 995 but it does not work (this is the test account required at startup).

Now the question is: is this secure transfer only available on the paid for version of PMMail but not on the try out version.  If that is the case why isn't that fact mentioned especially since that is the very thing I need to try out to see if it will do what I want.  Or have I missed some vital process in the install or setup?

You seem to have missed a few things. Yes, the new PMMail does use STunnel (a later version than Dave pointed to, which is probably needed for yahoo), and it is included. There is a somewhat confusing setup. The Help does talk about it, in the PMMail Secure Transfer section, but it seems to be too complicated for a lot of people (It is actually very simple, once you understand how it works, but it is difficult to tell somebody how to do it). Think of STunnel as being a proxy server. There is a plce to define a certificate. Leave it blank.

If that doesn't help, set up PMMail-> Global settings-> General, near the bottom to point to your web browser (you may need to restart PMMail). Then Click Help-> Voice on the web-> PMMail FAQ. That should take you to the PMMail FAQ, where there is a description of how to set it up for GMail (go down to find it). You would need to substitute whatever yahoo mail needs in those instructions.

Quote
renamed the mail directory to something else and installed the new PMMail

BIG mistake. You should have backed up the old PMMail, then install the new one. If you have messed with the old PMMail (like renaming the directory), without doing all of the good things to point to it, you may still have trouble. Now, you need to figure out all of the parts that need to be restored to make it functional. I suggest uninstalling the new PMMail, rename the old one to what it was, back it up (so you can get back, if needed), then install the new PMMail. Depending, on which version of PMMail you started with, it may require converting the accounts (and other things). Just follow the directions. After you get it installed, and "seeing" your accounts, do the Secure Transfer settings.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: PMMail questions.
« Reply #3 on: January 17, 2021, 09:42:13 pm »
Hi ivan,

Follow-up to Doug's response.

I had to do this a while back and as he pointed out it wasn't very hard to do once you understand what's need. Certainly though it wasn't very intuitive how to do this, especially when you may be questioning whether you have the right port numbers for various email servers to start off with anyways... ???

However, once done it works very well. When I was using PMMail to acess my GMAIL with I had no problems with this approach at all. Keep this in mind as you look at the next few pics.

1) 'Secure Transfer' TAB
2) 'Secure Transfer' TAB => Channel Definition (IN_POP)
3) 'Secure Transfer' TAB => Channel Definition (OUT_SMTP)
4) 'Send'
5) 'Receive'

Alright, I no longer have this configuration active, I moved to Thunderbird. However, try it, if you have any questions post away.

-Dariusz

ivan

  • Hero Member
  • *****
  • Posts: 1557
  • Karma: +17/-0
    • View Profile
Re: PMMail questions.
« Reply #4 on: January 18, 2021, 11:41:00 am »
Doug,  This is a test machine put together with odd parts to test a MSI B550 board and a Ryzen 3 pro third gen processor.  The hard disks were taken from various USB caddies and I'm not worried about losing what is on them.  I agree the stunnel setup is not intuitive, especially about starting it.  Is it supposed to start with PMMail or is something else needed to start it?

Dariusz, thank you for the screen grabs, they show that I need to create a Channel Defination, something I missed before since it wasn't clear that such a thing was necessary.

Now I have to find a way to get stunnel to start when I open PMMail and find a way to stop PMMail from 'disappearing' when I close any of the settings pages - I am assuming that has something to do with the processor showing up as having 8 cores when it has only 4 because hyprethreading is active in the uefi bios (have to find a way to switch it off but that is what tests are for).  I have a TRP file if anyone is interested.
 

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1024
  • Karma: +24/-0
    • View Profile
    • Blonde Guy
Re: PMMail questions.
« Reply #5 on: January 18, 2021, 03:05:02 pm »
For a case like yours, where you only use stunnel for PMMail, you do not need to start anything. PMMail will manage the stunnel program and you do not need to configure anything apart from the settings Darius showed above.

I admit the help could be a little more helpful.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

TeLLie

  • Full Member
  • ***
  • Posts: 226
  • Karma: +11/-0
    • View Profile
Re: PMMail questions.
« Reply #6 on: January 18, 2021, 05:35:01 pm »
Hi
I set al like the picturess showedl
But i still cannot connect to gmail..
I see in stunnel log:
2021.01.18 17:28:41 LOG4[ui]: Service [GMAIL - IN_GMAIL] needs authentication to prevent MITM attacks
2021.01.18 17:28:41 LOG4[ui]: Service [GMAIL - OUT_SMTP] needs authentication to prevent MITM attacks


Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: PMMail questions.
« Reply #7 on: January 18, 2021, 06:19:01 pm »
In PMMail-> Global Settings-> Secure Transfer is it enabled? Is it running? You do need to close the program, and start it again, to get it to run. It must be running to do the setup.

Check your entries (I didn't go through the pictures that were posted). It should all make sense. The local side uses localhost to talk to STunnel, which uses the given ports to talk to the remote host. The server address is used to relate the Account settings to the server settings.

Then, in each account, you need the server address, and logon information. You need to enable "Use Secure Channel (SSL)" so PMMail knows to use localhost rather than then the server address. Then you need the matching port. The ports associate what STunnel does. Looking at the pictures, I would not use port 995 for the local port. Use 110 in both the STunnel setup, and the account receive settings.

If you use STunnel with more than one mail server, you need to modify the local ports so they are not the same as what is used with a different mail server. Otherwise, STunnel can't tell the difference. What I do, is add 6, or 7, in front of the port numbers, and change all applicable settings.

Difficult to explain, but actually quite logical, after you figure it out.

TeLLie

  • Full Member
  • ***
  • Posts: 226
  • Karma: +11/-0
    • View Profile
Re: PMMail questions.
« Reply #8 on: January 18, 2021, 07:57:31 pm »
Hi Doug,

In PMMail-> Global Settings-> Secure Transfer is it enabled? Is it running? You do need to close the program, and start it again, to get it to run. It must be running to do the setup.

Check your entries (I didn't go through the pictures that were posted). It should all make sense. The local side uses localhost to talk to STunnel, which uses the given ports to talk to the remote host. The server address is used to relate the Account settings to the server settings.

Then, in each account, you need the server address, and logon information. You need to enable "Use Secure Channel (SSL)" so PMMail knows to use localhost rather than then the server address. Then you need the matching port. The ports associate what STunnel does. Looking at the pictures, I would not use port 995 for the local port. Use 110 in both the STunnel setup, and the account receive settings.

If you use STunnel with more than one mail server, you need to modify the local ports so they are not the same as what is used with a different mail server. Otherwise, STunnel can't tell the difference. What I do, is add 6, or 7, in front of the port numbers, and change all applicable settings.

Difficult to explain, but actually quite logical, after you figure it out.
Yes i see a proxy is running "Yes"

I have set local to 110 in global and in Account settings, should i do same for local  port 25

I have just only gmail

I see this in stunnel.conf:
socket = l:TCP_NODELAY=0
socket = r:TCP_NODELAY=0
client = yes
output = C:/PROGRAMS/PMMAIL/BIN/stunnel.log
verify = 0
debug  = 4

[GMAIL - IN_GMAIL]
  accept  = localhost:110
  connect = pop.gmail.com:995
  delay   = yes
;#  protocol = pop3

[GMAIL - OUT_SMTP]
  accept  = localhost: 25
  connect = smtp.gmail.com:587
  delay   = yes
  protocol = smtp

Why is pop3 disabled ??

And see i log this:

Mon, 18 Jan 2021 17:36:51 ==> Connection Failure:  Couldn't connect (err:61 - Connection refused). n tries [2]
Mon, 18 Jan 2021 17:29:44 ==> Error: Server broke connection
Mon, 18 Jan 2021 00:37:02 ==> Error: Server broke connection
Mon, 18 Jan 2021 00:29:33 ==> Error: Server broke connection

« Last Edit: January 18, 2021, 08:14:42 pm by TeLLie »

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: PMMail questions.
« Reply #9 on: January 18, 2021, 08:21:45 pm »
TeLLie!

...Yes i see a proxy is running "Yes"

I have set local to 110 in global and in Account settings, should i do same for local  port 25

I have just only gmail

I see this in stunnel.conf:
socket = l:TCP_NODELAY=0
socket = r:TCP_NODELAY=0
client = yes
output = C:/PROGRAMS/PMMAIL/BIN/stunnel.log
verify = 0
debug  = 4

[GMAIL - IN_GMAIL]
  accept  = localhost:110
  connect = pop.gmail.com:995
  delay   = yes
;#  protocol = pop3

[GMAIL - OUT_SMTP]
  accept  = localhost: 25
  connect = smtp.gmail.com:587
  delay   = yes
  protocol = smtp

Why is pop3 disabled ??


Ahh, but there may be more to it. Not sure if this is right, apologies ahead if that's the wrong path to take.

So I went back to my old PMMail setup to look up the entries in stunnel.log, hoping there is something there that would help you out. Well, not a single presence of the LOG could be found.

However as it turns out in the PMMail's installation '\bin' directory there is the '\stunnel' subdirectory. In my instance (right or wrong, I do not know, but it was working for me) I have stunnel.conf present there as well.

In that stunnel.conf I have the following entries:

Code: [Select]
[gmail-pop3]
client = yes
accept = 127.0.0.1:110
connect = pop.gmail.com:995
verifyChain = yes
CAfile = ca-certs.pem
checkHost = pop.gmail.com
OCSPaia = yes

[gmail-imap]
client = yes
accept = 127.0.0.1:143
connect = imap.gmail.com:993
verifyChain = yes
CAfile = ca-certs.pem
checkHost = imap.gmail.com
OCSPaia = yes

[gmail-smtp]
client = yes
accept = 127.0.0.1:25
connect = smtp.gmail.com:465
verifyChain = yes
CAfile = ca-certs.pem
checkHost = smtp.gmail.com
OCSPaia = yes

That '\stunnel\ subdirectory has a readme.os2, which states:

Code: [Select]
This is an OS/2 build of Stunnel 5.44 - updated 26th January 2018

So for what it's worth, that's the config I had here.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: PMMail questions.
« Reply #10 on: January 19, 2021, 07:01:45 am »
Quote
This is an OS/2 build of Stunnel 5.44 - updated 26th January 2018

That is actually wrong. Apparently the docs weren't updated when STunnel was updated to version 5.5. The STunnel directory is included, to stay within the license parameters. It isn't used. The same is true for BogoFilter. The one in the BIN directory is used.

Quote
accept  = localhost: 25

I would use port 587  for PMMail. Port 25 is supposed to be used for server to server communications. 587 is supposed to be for client communications. It probably won't make any difference though. The account setting must match what Stunnel sees as the accept port.

Quote
Why is pop3 disabled ??

I think that is actually a comment. Now, I wonder why "protocol = smtp"  isn't commented. Guess I need to read the instructions for STunnel, again. Apparently, that doesn't bother it, because my stunnel.conf has the same thing, and it works okay.

So, it looks like STunnel is set up properly (if not exactly how I would do it). That gets you back into PMMail itself.

I attach two pictures of my PMMail setup for GMail (which I rarely look at, it is only to keep my android phone happy). You do need the proper logon information for GMail. Make appropriate changes if you use other secure mail servers. In the pictures, the port numbers are 8110 and 8587, I use that because I have (actually had) another secure server, and PMMail needs to use different ports for each account in that case. PMMail and STunnel, need to agree on the local ports, but they can be anything that isn't used by something else. Note that the server address in PMMail is for GMail. PMMail knows to use localhost, when STunnel is loaded, and ready.

The matching STunnel.conf is:
Code: [Select]
socket = l:TCP_NODELAY=0
socket = r:TCP_NODELAY=0
client = yes
output = W:/APPS/PMMail/BIN/stunnel.log
verify = 0
debug  = 7

[GMail-smtp]
  accept  = localhost:8587
  connect = smtp.gmail.com:587
  delay   = yes
  protocol = smtp

[GMail-pop]
  accept  = localhost:8110
  connect = pop.gmail.com:995
  delay   = yes
;#  protocol = pop3

TeLLie

  • Full Member
  • ***
  • Posts: 226
  • Karma: +11/-0
    • View Profile
Re: PMMail questions.
« Reply #11 on: January 19, 2021, 09:06:48 pm »
Hi Doug,

Thankz for the explanation, but unfortunately  it still dont work...
As far i can see there are no errors in the Stunnel.log or logfile

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: PMMail questions.
« Reply #12 on: January 19, 2021, 10:40:02 pm »
Hi Doug,

Thankz for the explanation, but unfortunately  it still dont work...
As far i can see there are no errors in the Stunnel.log or logfile

Post both logs. Perhaps somebody can spot something.

TeLLie

  • Full Member
  • ***
  • Posts: 226
  • Karma: +11/-0
    • View Profile
Re: PMMail questions.
« Reply #13 on: January 20, 2021, 08:02:50 pm »
Hi Doug,

I hope someone finds something...

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: PMMail questions.
« Reply #14 on: January 20, 2021, 08:35:33 pm »
Quote
I hope someone finds something...

The STunnel log indicates that it all happened as it should.

This section of logfile.log says PMMail successfully connected, found no messages, and closed the connection:
Code: [Select]
2021-01-19T21:03:29.825 (005)-I-pop_fetch: acct [Elbert & Nicole]
2021-01-19T21:03:29.825 (005)-I-ConnectionAcquire<001>: POP used/avail [1/8]. CPU priority [2]
2021-01-19T21:03:29.825 (005)-I-ConnectPOP: [account name here] connecting to server:port [localhost]:[110]
2021-01-19T21:03:29.827 (005)-I-ConnectPOP: hostname [localhost] -> [127.0.0.1]
2021-01-19T21:03:29.829 (005)-I-ConnectPOP: recv timeout [120]
2021-01-19T21:03:29.829 (005)-I-ConnectPOP: Connected. fd [7]
2021-01-19T21:03:29.878 (005)-I-pop_capabilities<001>: capa [0x00d54001]
2021-01-19T21:03:29.878 (005)-I-pop_logon<001>: enter
2021-01-19T21:03:30.671 (005)-I-PopRecvGetNumMess<001>: N mgs [0], size [0]
2021-01-19T21:03:30.671 (005)-I-PopRecvLogoff<001>: QUIT [Elbert & Nicole]
2021-01-19T21:03:30.792 (005)-I-ConnectionDisconnectPOP<001>: click. fd [7]
2021-01-19T21:03:30.792 (005)-I-pop_fetch: acct [Elbert & Nicole] exit
(I changed the name, for privacy).

What, exactly do you see, that makes you think it isn't working?

Don't forget, that you can send a message to yourself to test things.

It is also possible, that there is something not right in the GMail setup (but I would expect connection problems if that is wrong). Follow the POP3 instructions for Thunderbird, and it should get you there (at least it did, the last time I looked at it - something may have changed). You probably do need to tell GMail to accept "insecure" e-mail clients. again, I would expect a connection error, if that was wrong.