Failed to fetch messages in Inbox

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
yshaft
New user
New user
Posts: 5
Joined: 2018-12-03 07:29

Failed to fetch messages in Inbox

Post by yshaft » 2018-12-03 16:11

I have problems and need help. When I added my mailbox account to the linked database through my own program, I managed it with the mail client, which prompted that the validation failed.
But strangely, the account created by the hMailServer client is all right.
The following is the error log:

"POP3D" 2792 23 "2018-12-03 21:54:22.953" "127.0.0.1" "SENT: +OK POP3"
"POP3D" 2784 23 "2018-12-03 21:54:22.953" "127.0.0.1" "RECEIVED: USER account@domain.com"
"POP3D" 2784 23 "2018-12-03 21:54:22.953" "127.0.0.1" "SENT: +OK Send your password"
"POP3D" 2796 23 "2018-12-03 21:54:22.968" "127.0.0.1" "RECEIVED: PASS ***"
"POP3D" 2796 23 "2018-12-03 21:54:22.968" "127.0.0.1" "SENT: +ERR Server error: Failed to fetch messages in Inbox."
"POP3D" 2816 23 "2018-12-03 21:54:22.984" "127.0.0.1" "RECEIVED: STAT"
"POP3D" 2816 23 "2018-12-03 21:54:22.984" "127.0.0.1" "SENT: -ERR Invalid command in current state."
"POP3D" 2784 23 "2018-12-03 21:54:22.984" "127.0.0.1" "RECEIVED: QUIT"
"POP3D" 2784 23 "2018-12-03 21:54:22.984" "127.0.0.1" "SENT: +OK POP3 server saying goodbye..."

User avatar
Dravion
Senior user
Senior user
Posts: 1688
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: Failed to fetch messages in Inbox

Post by Dravion » 2018-12-03 17:22

I believe there is a Password complexity rule in place. Maybe a 3 char password is to small or you have a weird character in password
which cannot be resolved.

Virinum
Normal user
Normal user
Posts: 69
Joined: 2018-11-23 14:42
Location: Germany

Re: Failed to fetch messages in Inbox

Post by Virinum » 2018-12-03 22:22

Dravion wrote:
2018-12-03 17:22
I believe there is a Password complexity rule in place. Maybe a 3 char password is to small or you have a weird character in password
which cannot be resolved.
Passwords in logs are just ***. No matter how long the password is.
yshaft wrote:
2018-12-03 16:11
When I added my mailbox account to the linked database through my own program, I managed it with the mail client, which prompted that the validation failed.
So you're adding an account via SQL? I don't think that's a good idea. Why don't you use the COM Api hMailServer provides?
hMailServer should be the only program making changes to the DB. You don't know how caching will deal with changes in the DB. And by the why, are you sure you're hashing the password the right way?

User avatar
mattg
Moderator
Moderator
Posts: 20788
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Failed to fetch messages in Inbox

Post by mattg » 2018-12-03 23:16

Virinum wrote:
2018-12-03 22:22
yshaft wrote:
2018-12-03 16:11
When I added my mailbox account to the linked database through my own program, I managed it with the mail client, which prompted that the validation failed.
So you're adding an account via SQL? I don't think that's a good idea. Why don't you use the COM Api hMailServer provides?
Absolutely

Direct manipulation of the database is NOT supported

Also, hMailserver creates the 'Inbox' when it creates an account. I'll bet that is what the OP didn't do when they manually created the address in the database.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

yshaft
New user
New user
Posts: 5
Joined: 2018-12-03 07:29

Re: Failed to fetch messages in Inbox

Post by yshaft » 2018-12-04 03:46

Thank you very much for your help and I am very happy to meet you here.
If adding accounts through the SQL database is not feasible, I can only change my program to use COM API hMailServer.
Besides, I hope to discuss with you the following two questions:
1. Caching mechanism of hMailServer?
2. How does the inbox created by hMailServer when creating accounts mentioned by Mr. Mattg work?

They have aroused my interest.

yshaft
New user
New user
Posts: 5
Joined: 2018-12-03 07:29

Re: Failed to fetch messages in Inbox

Post by yshaft » 2018-12-04 03:59

mattg wrote:
2018-12-03 23:16
Virinum wrote:
2018-12-03 22:22
yshaft wrote:
2018-12-03 16:11
When I added my mailbox account to the linked database through my own program, I managed it with the mail client, which prompted that the validation failed.
So you're adding an account via SQL? I don't think that's a good idea. Why don't you use the COM Api hMailServer provides?
Absolutely

Direct manipulation of the database is NOT supported

Also, hMailserver creates the 'Inbox' when it creates an account. I'll bet that is what the OP didn't do when they manually created the address in the database.
Thank you very much for your answer.

Whether it's an account created by hMail Server client or an account created by SQL database, I checked my server and found no difference.
Even if I restart my computer, I still feel that the two accounts are different.

User avatar
mattg
Moderator
Moderator
Posts: 20788
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Failed to fetch messages in Inbox

Post by mattg » 2018-12-04 04:03

1. yes, some things are cached
2. when you create an account through the API, or through the admin GUI, the inbox is created as an IMAP folder automatically

I'm not really sure what you are asking

The difference is the IMAP folder assigned to the account
If you create an account directly to the SQL server then you also need to create an IMAP folder called 'Inbox'

AGAIN, direct manipulation of the database is NOT supported
You do that, and you are on your own.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
Dravion
Senior user
Senior user
Posts: 1688
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: Failed to fetch messages in Inbox

Post by Dravion » 2018-12-04 06:44

Matt is right.

Its not an good idea to manipulate hMailServers
Database by an external tool, because you needat least a hMailServer.exe restsrt to get sync regarding caches again, this goes For SQL DML-Queries (Manipulation of Tabledata)

The more serious SQL Trouble can be caused if you run SQL DML Queries (changing the Table structures or adding new Tables or Triggers, UDF ect) because things can result in an unserviable Installation State and you cannot update hMailServer any longer.

yshaft
New user
New user
Posts: 5
Joined: 2018-12-03 07:29

Re: Failed to fetch messages in Inbox

Post by yshaft » 2018-12-04 07:28

mattg wrote:
2018-12-04 04:03
1. yes, some things are cached
2. when you create an account through the API, or through the admin GUI, the inbox is created as an IMAP folder automatically

I'm not really sure what you are asking

The difference is the IMAP folder assigned to the account
If you create an account directly to the SQL server then you also need to create an IMAP folder called 'Inbox'

AGAIN, direct manipulation of the database is NOT supported
You do that, and you are on your own.
Thank you for your guidance.
Sorry, I'm a novice in the mail system.

Because in my impression, computer storage data is divided into persistent storage and caching, the current storage mode I can see is the SQL SERVER database (configuration link is MSSQL link string), so I mistakenly think that as long as the data in the SQL SERVER database can be modified to complete processing, restart the hMailServer service can automatically update Cache.

By the way, where is the IMAP folder of hMailServer's Inbox stored? If you know.

User avatar
mattg
Moderator
Moderator
Posts: 20788
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Failed to fetch messages in Inbox

Post by mattg » 2018-12-04 07:55

As well as persistent storage in the SQL database, the actual email files are stored as files in the file storage system of the computer.

The IMAP folder data is stored in the database


Use the API to create new accounts please - don't do SQL queries
https://www.hmailserver.com/documentati ... om_objects
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

yshaft
New user
New user
Posts: 5
Joined: 2018-12-03 07:29

Re: Failed to fetch messages in Inbox

Post by yshaft » 2018-12-05 04:17

mattg wrote:
2018-12-04 07:55
As well as persistent storage in the SQL database, the actual email files are stored as files in the file storage system of the computer.

The IMAP folder data is stored in the database


Use the API to create new accounts please - don't do SQL queries
https://www.hmailserver.com/documentati ... om_objects
Thank you. I have solved the problem according to the plan you provided.

Does hMailServer adopt the domain model of object-oriented architecture pattern? Can you provide me with an existing design relationship? Although this requirement is a bit excessive, it will make it easier for me to understand it.

User avatar
mattg
Moderator
Moderator
Posts: 20788
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Failed to fetch messages in Inbox

Post by mattg » 2018-12-05 04:59

yshaft wrote:
2018-12-05 04:17
Can you provide me with an existing design relationship?
No, there is no existing design relationship, other than the aforementioned API documentation, which displays in a hierarchical arrangement
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
Dravion
Senior user
Senior user
Posts: 1688
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: Failed to fetch messages in Inbox

Post by Dravion » 2018-12-05 06:40

@yshaft

You seems to be a SQL Database Hacker.
hMailServer is a OpenSource Project and thousands of People using the Produt but only a verry few contributing in some form.
The last time i checked, there was 144 Forks on Github of official hMailServer and allmost any of them doesnt provide something back.

A E-RM Design Diagram would be a great contribution to the Online-Documentation and its not that hard of a Project, because
hMailServers Database Tables are pretty straight forward, but someone has to do it :)

Goto C:\Program Files (x86)\hMailServer\DBScripts and you will see a lot of SQL-Scripts, most of them are Uprade scripts.
There is anything you need to get a nice E-RM Diagram out of it.

IMHO i think a nice OpenOffice/LibreOffice Draw Document is good enough (just attach it to one of your replies) so we can export
it as PDF or Image.

Thanks in advance

Post Reply