I noticed that I wasn’t getting many mails (I need better monitoring), and discovered that my iredmail server was poorly.

I have spent far too much time and energy on getting it back and working these past few days, but I’ve finally got it back up and stable.

Some background: I’ve had iredmail running for probably going on 6 years now and have had very few issues at all. It runs on an Ubuntu VM on Proxmox and originally was running in the same VM on ESXi (I migrated it over). I haven’t changed anything to do with the VM for years other than the Ubuntu LTS updates every 2-3 years, it’s always been there and stable. I occasionally will update the Ubuntu OS and iredmail itself, no problems.

Back to the problem… I noticed that Postfix was running OK, but was showing a bunch of errors about clamav not being able to connect. Odd. I then noticed that amavis was not running and had seemed to just die. I couldn’t find any reason in any log file. Very strange. Bunch of hunting, checking config file history in the git repo. Nothing significant for years.

Find that restarting the server got everything back up and running. Great, lets go to bed… Wake up next morning to find that amavis was dead again - it only lasted about 40 mins and then just closed for no reason. Right, ok, time to turn off clamAV as that seemed be be coming up a bit wheilst looking, follow the guide, all is well. Hmm, this seems to be working, but I don’t really want clamav off. A whole bunch of duck duck going and I still couldn’t figure out a root cause.

And then it clicked, the thing that was causing amavis to close was that it was running out of memory and it was being killed. Bump the memory up to 4GB and re-enable everything as it originally was and… it seems to have worked. Been going strong for over a day now.

I don’t know what it was that’s changed recently which has meant the memory requirements have gone up a bit, but at least it’s now fixed and it took all of 2 minutes to adjust.

The joys of selfhosting!

  • untilyouarrived@lemm.ee
    link
    fedilink
    English
    arrow-up
    18
    arrow-down
    1
    ·
    9 months ago

    Mail is the single thing that I absolutely refuse to self-host. Been there, got the scars.

    • blackstrat@lemmy.fwgx.ukOP
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      1
      ·
      9 months ago

      I mean it happened to be mail, but it could have been any service on a server without enough resources. Just bad luck for me this time.

      Setting up the mail server was a bit of a pain, but so was setting up a lemmy server. For 6 years it really has been plain sailing. So I was due a change in fortune, I guess

      • Possibly linux@lemmy.zip
        link
        fedilink
        English
        arrow-up
        3
        ·
        9 months ago

        That doesn’t fix the trust issues. If you send mail to people on gmail and similar services it won’t go though

        • Pissio@feddit.it
          link
          fedilink
          English
          arrow-up
          5
          ·
          9 months ago

          Turning on the server is not enough, you need to configure PTR , DKIM , DMARC and SPF. If your ip address is some blacklist it is necessary to have it removed. Once this is done, it is rare for emails to go to Spam other than for content control.

            • Pissio@feddit.it
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              9 months ago

              Unfortunately, in that case you will have to rely on a vm on some external provider or a smtp relay service external to your network.

              I opted for a vm on the cloud, because at home I have a CGNAT network with no ip.

              • KairuByte@lemmy.dbzer0.com
                link
                fedilink
                English
                arrow-up
                2
                ·
                9 months ago

                Honestly you’re generally going to have a better time with email if you outsource it. There are just so many “oops lost email” scenarios.

                • Pissio@feddit.it
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  9 months ago

                  Ah sorry, I thought we were in a community that deals with self-hosting.

                  If you prefer to use a free provider to also have to see advertisements in addition to spam, go ahead.

                  If you prefer to use one for a fee because you are not able to manage it on your own, go ahead.

                  It’s the beauty of open protocols.

        • Pissio@feddit.it
          link
          fedilink
          English
          arrow-up
          3
          ·
          9 months ago

          Thank you, I will keep an eye on them in case of any problems with docker-mailserver 👍

  • sloppy_diffuser@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    9 months ago

    I believe you will see OOM errors in journalctl. Also considered a systemd service or something to restart the process?

    Glad you figured it out though!

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    9 months ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    CGNAT Carrier-Grade NAT
    IP Internet Protocol
    NAT Network Address Translation

    [Thread #654 for this sub, first seen 4th Apr 2024, 00:45] [FAQ] [Full list] [Contact] [Source code]