• SolvedFixed
  • [SOLVED] Mail delivery issues for POP/IMAP in latest Grommunio releases

ozy innodb-file-per-table = 1

you schuld never set this parameters in a config file like this one, this parameter change the behavior of the database and my render the database unusable.

Setting: innodb_buffer_pool_size = 1G is in most cases to big for a mail system.

ozy gromox keeps the mysql connections open, ie in TIME_WAIT state

Yeah no. TIME_WAIT is a duplex-closed state, cf. https://datatracker.ietf.org/doc/html/rfc793#page-23 . It's also a TCP state and does not exist in Unix Domain Sockets (which are used here for SQL communications).

and mysql drops the connection after net_read_timeout and net_write_timeout is reached, which is 5 sec by default.

Indeed Gromox holds connections, but that counts as idle, and the corresponding mysqld variable is wait_timeout.
net_read_timeout is the maximum wait time to receive the rest of a command/query once the client has started issuing one. Queries are on the order of 200 bytes and local machine transfer speeds in excess of 10 GBps—all said, with practical overheads that should take just 12 µs. Of course, with enough system loading, debugger tricks (or bugs, for that matter), enough latency could theoretically be induced into the system to delay transmission and make processes run into said timeouts.

No need to bother with skip_name_resolve. Lookup of localhost/127 has a fastpath thanks to the static entry in /etc/hosts. It goes without saying that, because UDS are used, there is not even something to resolve in the first place.

Unfortunately, with all of this settings, I see this warnings: [Warning] Aborted connection some days more and some days less.

Does anyone had success with the update?
On my first try, it did not help, so I reverted back to stable.

So yes, with the above mysql tuning, errors still come, just later.

What bugs me is that I also get mysql connection errors from chat, which makes me think that all connections must be exhausted at one point:

2024-09-02 15:17:30 1909819 [Warning] Aborted connection 1909819 to db: 'grommunio' user: 'grommunio' host: 'localhost' (Got an error reading communication packets)
2024-09-02 15:17:30 1909815 [Warning] Aborted connection 1909815 to db: 'grochat' user: 'grochat' host: 'localhost' (Got an error reading communication packets)
2024-09-02 15:17:30 1909805 [Warning] Aborted connection 1909805 to db: 'grochat' user: 'grochat' host: 'localhost' (Got an error reading communication packets)

I've just installed @jengelh 's suggested gromox-2.31.40.gc6173b2-lp155.17.1.x86_64 (along with all other current git updaes) on my personal email server and removed the mysql tuning in order to have proper environment.
Rebooted, and now wait to see.
I'll report later this day if I still have any mysql timeouts.

So it's been 7 hours, no mysql errors shown on my updated server.

Still, I get some sporadic delayed POP/IMAP mail. I'm quite sorry that the mysql stuff didn't resolve all the issues, but it's still better.

When POP/IMAP delays happens, I sometimes get the following error, perhaps this is related:

sept. 02 22:17:52 email gromox-midb[1505]: > sqlite3_exec(UPDATE folders SET sort_field=0 WHERE folder_id=13) inside a readonly TXN
sept. 02 22:17:52 email gromox-midb[1505]: > sqlite3_exec(DELETE FROM messages WHERE message_id=218710) inside a readonly TXN
sept. 02 22:17:47 email postfix/qmgr[1866]: A951E2F4A8: removed
sept. 02 22:17:47 email postfix/qmgr[1866]: A65212F4A7: removed

It looks like the first message always is delivered instantly, and later messages get delayed for POP/IMAP clients.

Anyway I still need the midb_reload_interval=3minutes setting in hope to see my mails appear at least every 3 minutes.

As a quick side question, does gromox trigger midb when a mail is received ?
Is there a way to debug log this ? I've tried to set midb_log_level=6 in /etc/gromox/midb.cfg but it doesn't add any more info to the logs.

  • crpb replied to this.

    ozy Still, I get some sporadic delayed POP/IMAP mail. I'm quite sorry that the mysql stuff didn't resolve all the issues, but it's still better.

    YES, IT DIDN'T! 😥

    ozy As a quick side question, does gromox trigger midb when a mail is received ?

    Thats the actual problem i'm guessing but haven't got any response in my ticket for it...
    And that other thread you already know about 😛.

    Thats the actual problem i'm guessing but haven't got any response in my ticket for it...
    And that other thread you already know about 😛.

    Hmmm... I'm a Grommunio "peasant", I have two community instances, so no access to any fancy tickets or service 🙁
    Would appreciate if you keep me updated. This is bugging me because although I use MAPI & ActiveSync for my devices, I do have a pop retriever which usually is much delayed.

    I noticed this problem only recently (didn't have any use for POP/IMAP prior to a few weeks). For how many time did you notice the problem ? Was it always there or has there been a working previous release ?

    Thanks ^^

    • crpb replied to this.

      ozy I noticed this problem only recently (didn't have any use for POP/IMAP prior to a few weeks). For how many time did you notice the problem ? Was it always there or has there been a working previous release ?

      I first noticed July slightly but didn't even realize how serious the difference is for an IMAP user at first because i only used my client and only occasionally looked into the web-app.

      And no it wasn't always there..
      I had a smooth ride since ~spring '22 with Claws-Mail and only had a little issue here and there which wasn't serious and was fixed pretty quick IIRC.

      I currently only use it to move server mails in a subfolder because that isn't fun in the webapp with like ~200-1000 mails and as an RSS-Reader 😛

      I hope someone _/me *squints* at @jengelh _ will get a handle on it rather sooner than later as e.g Ticketsystems and alike are also affected. Some even could use EWS but the main focus for it on this point was Outlook for MAC and other EWS Clients aren't reallly working. (At least i haven't seen one..). Enough of it..

      Fingers crossed, most people should be back from the summer vacation so we can only hope.

        @crpb I created a ticket a while ago and linked some threads from the forum into it.
        But the response time is quite slow.

        crpb most people should be back from the summer vacation

        Some grommunio developer come back this weekend.

        8 days later

        A customer using IMAP told me: Last weekend's "supported update" fixed this.

        But, big question, which code change in grommunio introduced this issue?

        • crpb replied to this.

          well, it is not fixed on my side.
          Rocky Linux 9 - Aarch64 - up to date supported release

          Same here, issue still persists
          Debian 12 - Supported Repo
          gromox 2.30.85.4d271dc-1+2.1 amd64

          @Vincent I am relieved to hear that, that someone else has the issue on x86_64 as well.

          @jengelh can you please comment on this?
          Is there something we can do to help debug it further?

          @WalterH Can you please investigate about the setup of your customer and if he might still have the issue?

            I updated to the latest Cummunity Edition today. Now I also have the problem with the massively delayed IMAP synchronization. :-(

            EDIT:
            Grommunio appliance (SuSE iso) on Proxmox/qemu vm with 16G RAM
            gromox 2.32.0.ge7685dd-lp155.12.1
            grommunio-imapsync 2.264-lp155.1.1

              © 2020-2024 grommunio GmbH. All rights reserved. | https://grommunio.com | Data Protection | Legal notice