cancel
Showing results for 
Search instead for 
Did you mean: 

Email IMAP diagnostics

mavison
Aspiring Pro
Posts: 118
Thanks: 47
Fixes: 1
Registered: ‎20-10-2017

Email IMAP diagnostics

I have been using a curl command based on the output from excellent Email Diagnostics script by @Townman to investigate another IMAP account. Today I wanted to do the same thing on my own account, which has now been migrated. Twice.

The command I am using is:

curl.exe -v imaps://imap.force9.net -u "<name>:<password>"

I have tried using a <name> of <account>+<mailbox>, and of <mailbox>@<account>.f9.co.uk

but I always get returned:

* Host imap.force9.net:993 was resolved.
* IPv6: (none)
* IPv4: 91.204.208.196
*   Trying 91.204.208.196:993...
* schannel: disabled automatic use of client certificate
* Established connection to imap.force9.net (91.204.208.196 port 993) from 10.0.0.101 port 56748
< * OK IMAP4 ready
> A001 CAPABILITY
< * CAPABILITY IMAP4 IMAP4rev1 UIDPLUS AUTH=PLAIN
< A001 OK completed
> A002 AUTHENTICATE PLAIN
< +
> <security string>
< A002 NO [AUTHENTICATIONFAILED] Authentication failed.
* closing connection #0
curl: (67) Login denied

I have used this command in the same way for the other account with no problems. 

My first thought was that I had got the password wrong, but I have triple-checked it!

It is included it in the command because it is complex, and simply copied from my password manager into a cmd file.

If I just change the imaps: to smtp: it connects to that server without problem! At the same address.

Any suggestions?

15 REPLIES 15
Dan_the_Van
Superuser
Superuser
Posts: 4,247
Thanks: 2,548
Fixes: 124
Registered: ‎25-06-2007

Re: Email IMAP diagnostics

@mavison 

Do you get the same result (Login failed) when you use https://webmail.greenby.com/ using that account?

The error message for me is bottom right of the screen where the loading message is.

Maybe try refreshing the password for the account in My Greenby. Login to My Greenby >Manage emails 

Click on the three dots >Change password. Rather than change it enter the current password and save.

If this does not work then I suggest you create a new password.

Edit: added link to My Greenby

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

mavison
Aspiring Pro
Posts: 118
Thanks: 47
Fixes: 1
Registered: ‎20-10-2017

Re: Email IMAP diagnostics

@Dan_the_Van No - I should have mentioned that I can sign on to greenby webmail with that password with no problems at all!

I am reluctant to make any password changes at the moment, affecting many devices, as I am still battling to get my migration completed!

I was just hoping the output may help.

Dan_the_Van
Superuser
Superuser
Posts: 4,247
Thanks: 2,548
Fixes: 124
Registered: ‎25-06-2007

Re: Email IMAP diagnostics

@mavison 

To me it looks like an Authentication failure

usually if <account>+<mailbox> does not work then <mailbox>@<account>.f9.co.uk will (or visa versa)

What if you try the smtp test, is there a successful login?

curl.exe -v smtp://relay.f9,co.uk:587 -u userID:password --ssl-reqd or using email address.

Hopefully it will prove the curl command is happy with your password character string.

In the first instance you are not changing the password, you are just committing it again.

But I do agree any changes until it is confirmed the migration is completed is unwise. 

Hopefully @Townman might have a theory.

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

Townman
Superuser
Superuser
Posts: 28,141
Thanks: 12,565
Fixes: 236
Registered: ‎22-08-2007

Re: Email IMAP diagnostics

I would not trust the SMTP results if on the Plusnet network.

I have recently seen issues with webmail logging into new (Plusnet) mailboxes or ones which have recently changed their password.

i was seeing issues logging on to migrated Force9 mailboxes with IMAP for secondary mailboxes.

Ibwill take another look when I get back to the desk (on the phone at the moment).

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

mavison
Aspiring Pro
Posts: 118
Thanks: 47
Fixes: 1
Registered: ‎20-10-2017

Re: Email IMAP diagnostics

Another weird observation: I have 5 mailboxes in the account...

  • I can log on to each mailbox from webmail.greenby.com, using user & password directly from my password manager, without problem.
  • A cmd file was created with 5 curl commands, with user & password copied from my password manager. The first three failed, but the last two logged on ok!

The only difference I can see so far is that the 3 failing ones all have a % in the password, but the working ones do not.

It is probably also true that the workling mailboxes were probably created after the successes.

Clue or red herring?

[note this was edited to swap failing and working, as they were wrong initially]

Voodoorising
Hooked
Posts: 5
Thanks: 2
Registered: Thursday

Re: Email IMAP diagnostics

Does anyone have any smpt settings that actually with third party programs such as Thunderbird tried original force9 settings and Greenby’s settings none other seem to work

mavison
Aspiring Pro
Posts: 118
Thanks: 47
Fixes: 1
Registered: ‎20-10-2017

Re: Email IMAP diagnostics

I just use the standard ones with Thunderbird, ie relay.force9.net port 587, StartTLS, Normal Password, and user=account name.

But note that is for Force9 - you do not state which 'brand' your account is.

Have you tried @Townman 's excellent Email Diagnostics?

Townman
Superuser
Superuser
Posts: 28,141
Thanks: 12,565
Fixes: 236
Registered: ‎22-08-2007

Re: Email IMAP diagnostics

@mavison 

That is an excellent piece of detective work.

Did the passwords have a % symbol before migration (in the Plusnet space?

In the cURL command how was the password entered - on the command line or at the prompt?  If in the command line was the username:password in single quotes?  I have a vague recollection that % in some contexts is a token marker or escape character.

I will kick this around tomorrow.  The possibility that password characters might give rise to issues is interesting and was something I explored when creating the diagnostics.  “&” was thought to be a potential issue but checked out fine.  Unfortunately at that time, the Greenby servers were not there to test against.

@dave - do both systems permit the same set of special characters in passwords?

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

mavison
Aspiring Pro
Posts: 118
Thanks: 47
Fixes: 1
Registered: ‎20-10-2017

Re: Email IMAP diagnostics

-u "user:password" was entered at the end of the command in the command file, so that it was repeatable without relying on my typing 16 random characters accurately when I could not see what I was typing!

See first post in thread for command example.

The passwords have been unchanged for many months.

Voodoorising
Hooked
Posts: 5
Thanks: 2
Registered: Thursday

Re: Email IMAP diagnostics

Brand? I am an original Force9 user I assume thats what you meant. I have tried the settings you suggested to no avail

Dan_the_Van
Superuser
Superuser
Posts: 4,247
Thanks: 2,548
Fixes: 124
Registered: ‎25-06-2007

Re: Email IMAP diagnostics

@mavison 

I take it the curl investigation is as a result of being unable to get your chosen email client to work; which is?

Confirm you are using powershell? There are issues using 'user:password' in a command prompt.

Does the password include any spaces, if so try -u "user:password" rather than -u 'user:password'

It is possible to leave the password out of the command, then use CTRL+V to paste it when prompted (for the password).

I do note from your first post "If I just change the imaps: to smtp: it connects to that server without problem! At the same address"

Do you see the same result if you use POP3 protocol? curl.exe -v pop3s://mail.force9.net -u userID:password (userID can be the full email address or account name + inbox name

 

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

Townman
Superuser
Superuser
Posts: 28,141
Thanks: 12,565
Fixes: 236
Registered: ‎22-08-2007

Re: Email IMAP diagnostics

If the computer is on network I would not (at this time) trust a successful SMTP connection as a helpful diagnostic.

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

mavison
Aspiring Pro
Posts: 118
Thanks: 47
Fixes: 1
Registered: ‎20-10-2017

Re: Email IMAP diagnostics

 

@Dan_the_Van 

I take it the curl investigation is as a result of being unable to get your chosen email client to work; which is?

It was really to check exactly what folders there were and if they were under inbox or not., without any confusion from any email client being used.

Confirm you are using powershell? There are issues using 'user:password' in a command prompt.

Ahah! No, the commands are in a cmd file, so it will be a normal command prompt.

I tried CnP from the command file into Powershell ... and  that worked!

I then tried CnP into a normal cmd.exe command window ... and that worked as well!!

But running a cmd file containing the command, it still fails.

Does the password include any spaces, if so try -u "user:password" rather than -u 'user:password'

No spaces, and I have tried double and single quotes - no change.

It is possible to leave the password out of the command, then use CTRL+V to paste it when prompted (for the password).

It was entered with the command - the prompts do not seem to allow paste, and you cannot see what is typed, so entering 16-character random passwords accurately is ... a challenge! And I had to be sure the password was correct.

 

I then created a new mailbox with a simpler password - and that always failed from cmd file, terminal or powershell window.

I then tried  a user of <mailbox>@<account>.f9.co.uk instead of <account>+<mailbox>, and that seemed to work in all places.

My brain is hurting now, and I need to triple-check my findings.

Maybe I have stumbled on another symptom of the old vs new names?

Dan_the_Van
Superuser
Superuser
Posts: 4,247
Thanks: 2,548
Fixes: 124
Registered: ‎25-06-2007

Re: Email IMAP diagnostics

@mavison 

But running a cmd file containing the command , it still fails.

The instruction for the using cURL clearly state that PowerShell should be used

Screenshot 2025-12-12 104334.jpg

So confirm using POWERSHELL you no longer see a Login Failure?

EDIT: I have created a new email address since migrating with no issues. However I am free-online.

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.