abdullah_mudassar

  • 2 days ago
  • Joined 27 Jan
  • 7 discussions
  • 18 posts
  • 0 best answers
  • Post posted... wait what?
  • A Beginner DevOps Engineer working on improving his SMTP expertise.

  • I receive a lot of replies in the mailboxes of email accounts created on mailcow,
    I want to receive all of these emails in any one of the email accounts, kind of like a master inbox,
    Is there anyone who could help me achieve that?

    All incoming mails need to be sent to one single mailbox, where I can easily get all emails. Is that possible? IF so, please refer to a guide etc.

    Please be descriptive about your reply since I’m new to these terms.

    @[deleted]

    @[deleted]

    @[deleted]

  • Hi Mailcow Community,

    I have a dedicated server running Mailcow with the following specs:
    Ryzen 5 3600
    CPU: 12 Cores
    RAM: 64GB
    OS: Ubuntu (running only Mailcow)
    Email Accounts: 50,000+
    Issue:
    Whenever I perform database-related actions in Mailcow, I experience huge wait times due to MySQL queries. However, when I check my server stats (docker stats and htop), I see that MySQL is running but only utilizing one core instead of spreading the load across multiple cores and using very minimal ram.

    I want to increase MySQL’s resource usage (especially CPU and RAM) so that queries execute faster and my Mailcow instance runs efficiently.

    Questions:
    Is it possible to make MySQL use multiple cores and upto 32GB ram in Mailcow’s Docker setup?
    What configurations can I change (e.g., in my.cnf or Mailcow settings) to optimize performance?
    Are there any Mailcow-specific limitations that prevent MySQL from using more system resources?
    If possible, please provide a beginner-friendly explanation on how to make MySQL utilize more CPU/RAM efficiently.
    I’ve been searching for a solution for over a week but haven’t found anything concrete. I’d greatly appreciate any guidance or experience shared on this topic.

    I have stopped all unnecessary containers like ACME, Netfilter, watchdog etc to improve performance but now I’m unable to find further solutions.

    Thanks in advance for your help! 🙌

    @esackbauer
    @ETNyx
    @DocFraggle

    • Well, this is tricky, I usually solved this by throwing more resource to database server.

      1) Newest similar tier of CPU like Ryzen 5 9600X would be at least 70% faster in single threaded operation. You will need to upgrade your platform that come whit DDR5 that are more performant too,…

      2) You can try to to disable multi-threading on your CPU, depending on workload one can squeeze more performance this way, or not, depending on workload. I was trying local LLM (AI) lately and this can bump performance in those tasks about 30%, this does not say this will help you,… you can try it,…

      3) MC uses MariaDB SQL server, so if you will tinker something there look MariaDB server not MySQL server.

      4) Throw more memory on MariaDB server if you have plenty, basic setup of MC seems to be pretty conservative (it’s ok, since MC should be run on low memory system). You can use scripts like MysqlTuner to help find bottleneck there. From first look to MC default’s i would guess you will be able to bump up innodb_buffer_pool_size (My database servers usually have this in GBs,…), but do not do this without research, for example if you give more to this buffer you should give more to innodb_log_file_size too, for more optimal performance,… But those optimization are usually significant if usual workload is slow, not updating,…

      5) More parallelize?? Hmm I do not see any easy solution,.. Just divide your server to ½ or ¼ and run 2 or 4 instances, you will work whit smaller chunk and in sum those 4 MC will be able to utilize your CPU more and hopefully faster than one,..

      6) Find your bottleneck, start use slow_log to see what exactly take time, it’s possible you find some badly optimize queries,..

  • esackbauer
    I am sending it via CLI using mail and mailsend and msmtp and the commands execute successfully but I do not receive the email. Is there any config I need to make, to make it work?

    esackbauer Also, my smtp server has sufficient resources and there are a lot of email accounts on my server and due to this, the mailcow Instance is slowing down, especially when i do docker compose down; docker compose up; It takes more than an hour to start functioning properly, or it stays stuck at the What’s Happening page. I have narrowed down my search to the fact that mysql is not utilizing all of the available resources in my system. Could you please help me in tweaking the mysql container configs so that it utilizes maximum resources on my server and eventually Increase the overall speed of my MC instance? I can see that mysql does not take more than 1 core, I have 12 dedicated cores and 64Gb of ram, all going to waste since mysql can’t really use it. Can you please Help?

    [unknown] Also, my smtp server has sufficient resources and there are a lot of email accounts on my server and due to this, the mailcow Instance is slowing down, especially when i do docker compose down; docker compose up; It takes more than an hour to start functioning properly, or it stays stuck at the What’s Happening page. I have narrowed down my search to the fact that mysql is not utilizing all of the available resources in my system. Could you please help me in tweaking the mysql container configs so that it utilizes maximum resources on my server and eventually Increase the overall speed of my MC instance? I can see that mysql does not take more than 1 core, I have 12 dedicated cores and 64Gb of ram, all going to waste since mysql can’t really use it. Can you please Help?

    [unknown] Also, my smtp server has sufficient resources and there are a lot of email accounts on my server and due to this, the mailcow Instance is slowing down, especially when i do docker compose down; docker compose up; It takes more than an hour to start functioning properly, or it stays stuck at the What’s Happening page. I have narrowed down my search to the fact that mysql is not utilizing all of the available resources in my system. Could you please help me in tweaking the mysql container configs so that it utilizes maximum resources on my server and eventually Increase the overall speed of my MC instance? I can see that mysql does not take more than 1 core, I have 12 dedicated cores and 64Gb of ram, all going to waste since mysql can’t really use it. Can you please Help?

    • Is there any way I can send an email completely from the CLI? on the server where postfix is running inside the mailcow docker compose?

      If possible, kindly guide me how I can do that.

      Thanks a lot.

      I want to send an email to my Google account via the postfix running in my mailcow instance. Is it possible?

      • As long as you do not do something in the postfix container that is ok.
        You can send it via the host mailcow is running on.
        Just connect to port 25.
        But do not change something in the compose. It will not survive updates.
        Use the protocols mailcow is offering (IMAP, SMTP, API) wherever possible, do not interfere directly with the containers!

    • ETNyx

      I have written some scripts that do this decryption and manual work for me. So, that is working for me now.

      And thanks for the suggestion, but it was not what i was looking for.

      Still Bundle of thanks for your time

    • ETNyx

      This is exactly what I am trying to achieve, but a practical demonstration would have been a lot better.
      Still, Thanks a lot for your time and efforts.

      Best Regards

    • ETNyx
      Could you please explain a little on how it will work? since I am unable to understand what it does and how will it help me?

      Thanks a lot for your reply I really appreciate you taking the time to help me out. Thanks

    • ETNyx
      Sorry for not being clear.
      I want a solution where I can bulk import the email replies, since I have a lot of mailboxes and I do not want to go through all of them manually and read individual replies, I want to gather all replies, subjects, contents, senders etc in bulk if possible. I can further sort them on my own,

      Actually, I get a lot of email replies, which I need to scrap and get the content out of them. Could you help me with a way on how I can bulk import all replies? in decrypted format? Or I can set something which stops the encryption in the first place.

    • I get a lot of Replies on my emails, and I want to be able to access all of them at once, and the encryption and compression are a headache for me at the moment. Is there any way I can store the emails without encryption and compression? If yes, kindly elaborate your solution since I’m not very used to the mailcow SMTP service yet.

      Thanks a lot for everyone willing to contribute to this. Thanks

    • Hey, Is there a way to receive all of my email replies for all email accounts on my mailcow instance, to be collected at one single isntance, like a master inbox? where i can receive all the emails being received to my email accounts? Is yes, kindly explain in layman’s terms. Thanks a lot for your time.

      • Well, I do not use this either, but idea is: You make one public folder that your mailboxes can access, than you just make sieve filter to ensure that incoming mails are copied to this folder. After this when you log in any account you should have “Master Inbox” folder (aka all mails from all your inboxes are in one folder available for all, hope this is goal you wanted todo)

    • DocFraggle Thanks a lot. It was a huge help. I will continue this if I the issue still persists.

    • esackbauer
      First of All, I was expecting you to reply to this. Thank you for your time. I respect your valuable time and will try not to waste it.

      And yes, I am uploading my email accounts onto a platform which creates a connection to my smtp server and I upload the accounts in bulk, so they create the connection simultaneously. Is there any way i can increase the connection limit?

      My server has plenty of resources, it has 64GB Ram and 12 Dedicated cores running at 4.2GHz each.

      Currently, I am testing their service so I need to increase this limit as much as I can.

    • Can Someone Please guide me about what to change or how to increase this process_limit?
      I have been stuck here for quite some time now. IF anyone could help, that would be extremely relieving for me.
      Thanks in Advance

      • You could try to use the extra.conf as described here:

        https://docs.mailcow.email/manual-guides/Dovecot/u_e-dovecot-extra_conf/

        Create the file and add this block (untested):

        service imap {
          executable = imap
          user = vmail
          vsz_limit = 1G
          process_limit = 2048
        }
    • ETNyx Thanks for the Update. I appreciate it. This platform is fast enough I guess. For the first reply i thought i got lucky, but this was fast. thanks

    • ETNyx

      This was very helpful. Thanks. Is there any way I can remove IP Banning for a certain amount of time from my mailcow Instance? I am testing some connections and I believe it is banning my Office IP Address.

      ETNyx Also, is there any active discord community or any other platform which is more convenient where I can get faster responses? Although you were very fast in the reply. Thanks for that…

      • Probably a newbie question, but is there any default IP ban policy for mailcow to automatically ban IP Addresses? Which service is responsible for it?

        • abdullah_mudassar

          About removing IP for certain time, docs have screen of netfilter settings, there is whitelist textarea, this should work.

          About platform, I do not know, but i think not. Using forum as this keep history and one can search what others solved, chats usually don’t.