26

Re: No emails but no errors either

jackb wrote:

attach output of sudo systemctl status amavis

○ amavis.service - Interface between MTA and virus scanner/content filters
     Loaded: loaded (/usr/lib/systemd/system/amavis.service; enabled; preset: enabled)
     Active: inactive (dead) since Wed 2024-08-21 16:21:04 UTC; 4h 44min ago
   Duration: 10min 13.048s
       Docs: http://www.ijs.si/software/amavisd/#doc
    Process: 959 ExecStart=/usr/sbin/amavisd foreground (code=exited, status=0/SUCCESS)
   Main PID: 959 (code=exited, status=0/SUCCESS)
        CPU: 6.476s

Aug 21 16:21:01 mail amavis[959]: (00959-02-19) Passed CLEAN {RelayedInbound}, [144.208.68.118]:39313 [104.244.122.245] ESMTP/ESMTP <donotreply@myD>
Aug 21 16:21:01 mail amavis[959]: (00959-02-19) ...rnscore=-8.932, dkim_i=@myDomain.net, dkim_sd=default:myDomain.net, 346 ms
Aug 21 16:21:01 mail amavis[959]: (00959-02-20) Passed CLEAN {RelayedInbound}, [23.235.198.85]:45799 [104.244.122.245] ESMTP/ESMTP <donotreply@myDc>
Aug 21 16:21:01 mail amavis[959]: (00959-02-20) ...strings.net, 308 ms
Aug 21 16:21:01 mail amavis[959]: (00959-02-21) Passed CLEAN {RelayedInbound}, [192.249.112.55]:38759 [104.244.122.245] ESMTP/ESMTP <donotreply@myD>
Aug 21 16:21:01 mail amavis[959]: (00959-02-21) ...omain.net, dkim_sd=default:myDomain.net, 344 ms
Aug 21 16:21:02 mail amavis[959]: (00959-02-22) Passed CLEAN {RelayedInbound}, [199.250.217.82]:43969 [104.244.122.245] ESMTP/ESMTP <donotreply@myD>
Aug 21 16:21:02 mail amavis[959]: (00959-02-22) ...omain.net dkim_sd=default:myDomain.net, 299 ms
Aug 21 16:21:04 mail systemd[1]: amavis.service: Deactivated successfully.
Aug 21 16:21:04 mail systemd[1]: amavis.service: Consumed 6.476s CPU time, 123.1M memory peak, 0B memory swap peak.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

27

Re: No emails but no errors either

communque wrote:
jackb wrote:

attach output of sudo systemctl status amavis

○ amavis.service - Interface between MTA and virus scanner/content filters
     Loaded: loaded (/usr/lib/systemd/system/amavis.service; enabled; preset: enabled)
     Active: inactive (dead) since Wed 2024-08-21 16:21:04 UTC; 4h 44min ago
   Duration: 10min 13.048s
       Docs: http://www.ijs.si/software/amavisd/#doc
    Process: 959 ExecStart=/usr/sbin/amavisd foreground (code=exited, status=0/SUCCESS)
   Main PID: 959 (code=exited, status=0/SUCCESS)
        CPU: 6.476s

Aug 21 16:21:01 mail amavis[959]: (00959-02-19) Passed CLEAN {RelayedInbound}, [144.208.68.118]:39313 [104.244.122.245] ESMTP/ESMTP <donotreply@myD>
Aug 21 16:21:01 mail amavis[959]: (00959-02-19) ...rnscore=-8.932, dkim_i=@myDomain.net, dkim_sd=default:myDomain.net, 346 ms
Aug 21 16:21:01 mail amavis[959]: (00959-02-20) Passed CLEAN {RelayedInbound}, [23.235.198.85]:45799 [104.244.122.245] ESMTP/ESMTP <donotreply@myDc>
Aug 21 16:21:01 mail amavis[959]: (00959-02-20) ...strings.net, 308 ms
Aug 21 16:21:01 mail amavis[959]: (00959-02-21) Passed CLEAN {RelayedInbound}, [192.249.112.55]:38759 [104.244.122.245] ESMTP/ESMTP <donotreply@myD>
Aug 21 16:21:01 mail amavis[959]: (00959-02-21) ...omain.net, dkim_sd=default:myDomain.net, 344 ms
Aug 21 16:21:02 mail amavis[959]: (00959-02-22) Passed CLEAN {RelayedInbound}, [199.250.217.82]:43969 [104.244.122.245] ESMTP/ESMTP <donotreply@myD>
Aug 21 16:21:02 mail amavis[959]: (00959-02-22) ...omain.net dkim_sd=default:myDomain.net, 299 ms
Aug 21 16:21:04 mail systemd[1]: amavis.service: Deactivated successfully.
Aug 21 16:21:04 mail systemd[1]: amavis.service: Consumed 6.476s CPU time, 123.1M memory peak, 0B memory swap peak.

Looks like the Service is running out of Memory again, Memory running low then starts using SWAP.

Did you bump the Memory up?

Regards

28

Re: No emails but no errors either

I've restarted it a few times.

> systemctl status amavis

at which point the whole system starts working just fine -- receiving and sending backed up emails.
But then amavis dies again a few minutes later.
htop RAM at just over 50% while it's on, and then just under 50% after it dies

29

Re: No emails but no errors either

jackb wrote:

Did you bump the Memory up?

Memory is at 4GB

30

Re: No emails but no errors either

communque wrote:

I've restarted it a few times.

> systemctl status amavis

at which point the whole system starts working just fine -- receiving and sending backed up emails.
But then amavis dies again a few minutes later.
htop RAM at just over 50% while it's on, and then just under 50% after it dies

After restarting amavis I would keep an eye on htop Memory usage,

communque wrote:
jackb wrote:

Did you bump the Memory up?

Memory is at 4GB

Is this on a VPS or a Hypervisor with a Type 1 Solution ? If on a Type 1 Hypervisor solution I would look at Dynamic Memory, If you are hitting 50% Memory Usage I would bump it up to at least 8GB, Ubuntu 22.04/ 24.04 is funny on Memory as it requires a bit more.

Both of my Mail Exchangers has 16GB but I have 45 Users which seems to be a sweat spot.

Regards

31

Re: No emails but no errors either

This is on a VPS.

Happy to bump it up to 8%, but if Ubuntu is funny on Memory, I'm also happy to switch to a different OS.  What would you recommend?

32 (edited by communque 2024-08-22 05:40:14)

Re: No emails but no errors either

jackb wrote:

After restarting amavis I would keep an eye on htop Memory usage

It never really spikes, and never gets even as high as 2.1GB

What does happen that's maybe noteworthy: About 5 minutes after restart it starts dumping old emails (what seem to be the same emails repeatedly) and then I guess crashes after (or who knows, midway through) doing that.


*Dumping old emails = Old email start appearing in the email client app

33

Re: No emails but no errors either

communque wrote:
jackb wrote:

After restarting amavis I would keep an eye on htop Memory usage

It never really spikes, and never gets even as high as 2.1GB

What does happen that's maybe noteworthy: About 5 minutes after restart it starts dumping old emails (what seem to be the same emails repeatedly) and then I guess crashes after (or who knows, midway through) doing that.


*Dumping old emails = Old email start appearing in the email client app

Most likely what is happening, it starts processing inbound mails into the mailboxes then exhausts all the memory when processing, I would give it 8GB let it do it's thing bump it back down 4GB once it completes processing mails. That is all I can suggest right now because it's clearly memory related.

Regards

34

Re: No emails but no errors either

Will do.


FWIW the email count is very low -- like 17 backlogged emails.  This is a test email with very little traffic.

35

Re: No emails but no errors either

communque wrote:

Will do.


FWIW the email count is very low -- like 17 backlogged emails.  This is a test email with very little traffic.

To confirm how many emails are still in the queue I would look at,

 postqueue -p

Regards

36

Re: No emails but no errors either

jackb wrote:

I would give it 8GB let it do it's thing bump it back down 4GB once it completes processing mails.

At 8GB now.



jackb wrote:

postqueue -p

Thanks for that  The story is actually '599 Kbytes in 108 Requests'

Slowly slowly that back log is arriving in the email client.

What explains the sluggish speed?

37

Re: No emails but no errors either

communque wrote:
jackb wrote:

I would give it 8GB let it do it's thing bump it back down 4GB once it completes processing mails.

At 8GB now.



jackb wrote:

postqueue -p

Thanks for that  The story is actually '599 Kbytes in 108 Requests'

Slowly slowly that back log is arriving in the email client.

What explains the sluggish speed?

Depends, could be CPU, Storage related or overall Servers Performance itself.

Regards

38

Re: No emails but no errors either

UPDATE - amavis died again after delivering a batch of 12 backlogged emails -- this at 8GB RAM

39

Re: No emails but no errors either

communque wrote:

UPDATE - amavis died again after delivering a batch of 12 backlogged emails -- this at 8GB RAM

Is this a VPS or your own Server ? something is defiantly wrong.

Regards

40

Re: No emails but no errors either

This is a VPS, not my own server.  It's set up specifically to test / learn iRedMail, so there's no customization or installs on it beyond iRedMail.

41

Re: No emails but no errors either

communque wrote:

This is a VPS, not my own server.  It's set up specifically to test / learn iRedMail, so there's no customization or installs on it beyond iRedMail.

Just for a test, try on another VPS with 4GB or more and see if the same happens. Report back if so.

Regards

42

Re: No emails but no errors either

Sounds like a good idea

43 (edited by communque 2024-08-22 06:56:20)

Re: No emails but no errors either

Back up and running with a new server and a fresh install of iRedMail

For the moment everything is working perfectly.

BUT in previous attempts that was the case too, and then after about 6 hours the server started to have problems.

This is the first clean install built with 4GB RAM so fingers crossed

44

Re: No emails but no errors either

Go 6GB or even 8GB RAM if necessary.
spam/virus scanning takes a lot memory, especially virus scanning (ClamAV).
But if you don't need spam/virus scanning, 1-2 GB should be ok, but what's the point to run a mail server without spam/virus scanning? So, just increase the memory to get it stable.