1 (edited by communque 2024-08-20 23:13:40)

Topic: No emails but no errors either

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version:  iRedMail-1.7.0
- Deployed with downloadable installer
- Linux/BSD distribution name and version: Ubuntu 24.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
====

After setting up an email server -- which worked just fine for about 6 hours -- now it no longer sends or receives.
I'm not seeing any error either.  Emails simply never arrive whether sending or receiving.

This is not the first time for this pattern, where immediately email works fine, but then a half day later everything stops working.

----

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

2

Re: No emails but no errors either

communque wrote:

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version:  iRedMail-1.7.0
- Deployed with downloadable installer
- Linux/BSD distribution name and version: Ubuntu 24.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
====

After setting up an email server -- which worked just fine for about 6 hours -- now it no longer sends or receives.
I'm not seeing any error either.  Emails simply never arrive whether sending or receiving.

This is not the first time for this pattern, where immediately email works fine, but then a half day later everything stops working.

Attach output of
sudo systemctl status postfix

Regards

3

Re: No emails but no errors either

jackb wrote:

Attach output of sudo systemctl status postfix


● postfix.service - Postfix Mail Transport Agent
     Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; preset: enabled)
     Active: active (exited) since Mon 2024-08-19 16:34:11 UTC; 1 day 2h ago
       Docs: man:postfix(1)
   Main PID: 1529 (code=exited, status=0/SUCCESS)
        CPU: 4ms

4

Re: No emails but no errors either

communque wrote:
jackb wrote:

Attach output of sudo systemctl status postfix


● postfix.service - Postfix Mail Transport Agent
     Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; preset: enabled)
     Active: active (exited) since Mon 2024-08-19 16:34:11 UTC; 1 day 2h ago
       Docs: man:postfix(1)
   Main PID: 1529 (code=exited, status=0/SUCCESS)
        CPU: 4ms

Postfix is running, If you run the test on mxtoolbox and run the log live do you see any activity?

tail -f mail.log

Regards

5

Re: No emails but no errors either

jackb wrote:

If you run the test on mxtoolbox and run the log live do you see any activity?

from tail -f mail.log

2024-08-20T19:34:12.198299+00:00 mail postfix/error[124805]: 4WpG815zz5z2H16: to=<myuser@mydomain.com>, relay=none, delay=8883, delays=8882/0.12/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

6

Re: No emails but no errors either

communque wrote:
jackb wrote:

If you run the test on mxtoolbox and run the log live do you see any activity?

from tail -f mail.log

2024-08-20T19:34:12.198299+00:00 mail postfix/error[124805]: 4WpG815zz5z2H16: to=<myuser@mydomain.com>, relay=none, delay=8883, delays=8882/0.12/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

Is this a fresh install of iRedmail ? have you done any modifications ?

Regards

7

Re: No emails but no errors either

jackb wrote:

Is this a fresh install of iRedmail ? have you done any modifications ?

Fresh install as of yesterday.

8

Re: No emails but no errors either

No modifications

9

Re: No emails but no errors either

communque wrote:

No modifications

What might be happening is Greylist being enabled,

Try this,

 
sudo chmod 600 /opt/iredapd/settings.py
sudo nano /opt/iredapd/settings.py

Remove
"greylisting"

 
sudo systemctl restart iredapd
sudo chmod 400 /opt/iredapd/settings.py

Re-run the test again on mxtoolbox and post log.

Regards

10

Re: No emails but no errors either

Thanks jackb - I did your notes above and also rebooted.

From tail -f /var/log/mail.log

2024-08-20T20:00:59.184644+00:00 mail postfix/error[1691]: 4WpGmg6bYSz2H23: to=<myuser@mydomain.com>, relay=none, delay=8791, delays=8790/1.3/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
2024-08-20T20:01:01.080126+00:00 mail amavis[893]: starting. /usr/sbin/amavisd at mail.mydomain.com amavis-2.13.0 (20230106), Unicode aware, LANG="en_US.UTF-8"
2024-08-20T20:01:01.080190+00:00 mail amavis[893]: perl=5.038002, user=996, EUID: 996 (996);  group=(), EGID: 996 996 (996 996)
2024-08-20T20:01:01.958024+00:00 mail amavis[893]: Net::Server: Group Not Defined.  Defaulting to EGID '996 996'
2024-08-20T20:01:01.958104+00:00 mail amavis[893]: Net::Server: User Not Defined.  Defaulting to EUID '996'
2024-08-20T20:01:02.039916+00:00 mail amavis[893]: No ext program for   .F, tried: unfreeze, freeze -d, melt, fcat
2024-08-20T20:01:02.042310+00:00 mail amavis[893]: No ext program for   .zoo, tried: zoo, unzoo
2024-08-20T20:01:02.053450+00:00 mail amavis[893]: No decoder for       .F   
2024-08-20T20:01:02.053497+00:00 mail amavis[893]: No decoder for       .zoo
2024-08-20T20:01:02.053532+00:00 mail amavis[893]: Using primary internal av scanner code for clamav-socket
2024-08-20T20:02:50.839235+00:00 mail postfix/scache[1683]: statistics: start interval Aug 20 20:00:58
2024-08-20T20:02:51.081459+00:00 mail postfix/scache[1683]: statistics: domain lookup hits=0 miss=2 success=0%
2024-08-20T20:02:52.304195+00:00 mail postfix/scache[1683]: statistics: address lookup hits=0 miss=2 success=0%

11

Re: No emails but no errors either

communque wrote:

Thanks jackb - I did your notes above and also rebooted.

From tail -f /var/log/mail.log

2024-08-20T20:00:59.184644+00:00 mail postfix/error[1691]: 4WpGmg6bYSz2H23: to=<myuser@mydomain.com>, relay=none, delay=8791, delays=8790/1.3/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
2024-08-20T20:01:01.080126+00:00 mail amavis[893]: starting. /usr/sbin/amavisd at mail.mydomain.com amavis-2.13.0 (20230106), Unicode aware, LANG="en_US.UTF-8"
2024-08-20T20:01:01.080190+00:00 mail amavis[893]: perl=5.038002, user=996, EUID: 996 (996);  group=(), EGID: 996 996 (996 996)
2024-08-20T20:01:01.958024+00:00 mail amavis[893]: Net::Server: Group Not Defined.  Defaulting to EGID '996 996'
2024-08-20T20:01:01.958104+00:00 mail amavis[893]: Net::Server: User Not Defined.  Defaulting to EUID '996'
2024-08-20T20:01:02.039916+00:00 mail amavis[893]: No ext program for   .F, tried: unfreeze, freeze -d, melt, fcat
2024-08-20T20:01:02.042310+00:00 mail amavis[893]: No ext program for   .zoo, tried: zoo, unzoo
2024-08-20T20:01:02.053450+00:00 mail amavis[893]: No decoder for       .F   
2024-08-20T20:01:02.053497+00:00 mail amavis[893]: No decoder for       .zoo
2024-08-20T20:01:02.053532+00:00 mail amavis[893]: Using primary internal av scanner code for clamav-socket
2024-08-20T20:02:50.839235+00:00 mail postfix/scache[1683]: statistics: start interval Aug 20 20:00:58
2024-08-20T20:02:51.081459+00:00 mail postfix/scache[1683]: statistics: domain lookup hits=0 miss=2 success=0%
2024-08-20T20:02:52.304195+00:00 mail postfix/scache[1683]: statistics: address lookup hits=0 miss=2 success=0%

How much RAM do you have for this host?

Re-run the mxtoolbox test and post the log.

Regards

12

Re: No emails but no errors either

1GB Ram

after running MxTools, no immediate response.

45 secs later or so tail -f /var/log/mail.log gives

2024-08-20T20:17:42.240989+00:00 mail postfix/scache[3077]: statistics: start interval Aug 20 20:15:57
2024-08-20T20:17:42.241150+00:00 mail postfix/scache[3077]: statistics: domain lookup hits=0 miss=2 success=0%
2024-08-20T20:17:42.241176+00:00 mail postfix/scache[3077]: statistics: address lookup hits=0 miss=2 success=0%

13

Re: No emails but no errors either

communque wrote:

1GB Ram

after running MxTools, no immediate response.

45 secs later or so tail -f /var/log/mail.log gives

2024-08-20T20:17:42.240989+00:00 mail postfix/scache[3077]: statistics: start interval Aug 20 20:15:57
2024-08-20T20:17:42.241150+00:00 mail postfix/scache[3077]: statistics: domain lookup hits=0 miss=2 success=0%
2024-08-20T20:17:42.241176+00:00 mail postfix/scache[3077]: statistics: address lookup hits=0 miss=2 success=0%


1GB of RAM isn’t enough. You need at least 8GB minimum depending how many users there are. 


Regards

14

Re: No emails but no errors either

At the moment, we're just testing using one user and almost no traffic.
You think that explains the failure?

What I'm seeing in mail.log suggests the problem is something else...

2024-08-21T00:05:57.176578+00:00 mail postfix/error[20415]: 4Wnsqq1FZLz2GvF: to=<myUser@myDomain.com>, relay=none, delay=80110, delays=80110/0.12/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
2024-08-21T00:05:57.176627+00:00 mail postfix/error[20414]: 4WnsqT6xg0z2GvC: to=<myUser@myDomain.com>, relay=none, delay=80127, delays=80127/0.12/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
2024-08-21T00:05:57.181240+00:00 mail postfix/error[20415]: 4WnrH21G4Fz2Gs4: to=<myUser@myDomain.com>, relay=none, delay=84311, delays=84311/0.12/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
2024-08-21T00:05:57.182722+00:00 mail postfix/error[20418]: 4Wnst215tVz2GvW: to=<myUser@myDomain.com>, relay=none, delay=79995, delays=79995/0.12/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

15

Re: No emails but no errors either

communque wrote:

At the moment, we're just testing using one user and almost no traffic.
You think that explains the failure?

What I'm seeing in mail.log suggests the problem is something else...

2024-08-21T00:05:57.176578+00:00 mail postfix/error[20415]: 4Wnsqq1FZLz2GvF: to=<myUser@myDomain.com>, relay=none, delay=80110, delays=80110/0.12/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
2024-08-21T00:05:57.176627+00:00 mail postfix/error[20414]: 4WnsqT6xg0z2GvC: to=<myUser@myDomain.com>, relay=none, delay=80127, delays=80127/0.12/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
2024-08-21T00:05:57.181240+00:00 mail postfix/error[20415]: 4WnrH21G4Fz2Gs4: to=<myUser@myDomain.com>, relay=none, delay=84311, delays=84311/0.12/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
2024-08-21T00:05:57.182722+00:00 mail postfix/error[20418]: 4Wnst215tVz2GvW: to=<myUser@myDomain.com>, relay=none, delay=79995, delays=79995/0.12/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

If the Server is running low on RAM then the services will crash. Take a look at htop in terminal.

16

Re: No emails but no errors either

jackb wrote:

If the Server is running low on RAM then the services will crash. Take a look at htop in terminal.

Using about half the memory.

17

Re: No emails but no errors either

I take that back.  After a reboot it's using just about all the memory and CPU, so your suggestion of a crash seems pretty likely.  Thank you for working this through!

18

Re: No emails but no errors either

I take that back.  After a reboot it's using just about all the memory and CPU, so your suggestion of a crash seems pretty likely.  Thank you for working this through!

19

Re: No emails but no errors either

It's clearly mentioned on iRedMail installation tutorials that at least 4GB memory is required for a low traffic mail server, to perform spam/virus scanning. Otherwise clamav will stop suddenly due to no enough memory, and amavisd too.

20

Re: No emails but no errors either

communque wrote:

I take that back.  After a reboot it's using just about all the memory and CPU, so your suggestion of a crash seems pretty likely.  Thank you for working this through!

Yep. The more users on the Server will require more RAM. I would test after bumping RAM up. Report back if you still have problems.

Regards

21

Re: No emails but no errors either

zhanghuangbin wrote:

It's clearly mentioned on iRedMail installation tutorials that at least 4GB memory is required for a low traffic mail server, to perform spam/virus scanning. Otherwise clamav will stop suddenly due to no enough memory, and amavisd too.

jackb wrote:

Yep. The more users on the Server will require more RAM. I would test after bumping RAM up. Report back if you still have problems.

Thanks jackb/zhanghuanbin. Indeed 4GB memory requirement was clearly mentioned, and I overlooked it.  Thanks for the heads up.

The server has been bumped up to 4GB now.
Server re-booted, with htop showing under 2GB RAM in use, so we should be good there.

BUT still seeing the following on `tail -f /var/log/mail.log`

2024-08-21T17:07:32.608752+00:00 mail postfix/error[6622]: 4Wpt783mqLz2H40: to=<myUser@myDomain.com>, relay=none, delay=0.29, delays=0.29/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

22

Re: No emails but no errors either

Here's another error I'm seeing when trying to send an email via RoundCube to a gmail address...

2024-08-21T17:15:19.622072+00:00 mail roundcube: <a8ok2a4a> User myUser@myDomain.com [192.42.116.196]; Message <9190f672484d85a5906f0b36b5b2d474@myDomain.com> for myGmail@gmail.com; 250: 2.0.0 Ok: queued as 4WptJ73sfNz2H3y
2024-08-21T17:15:19.623179+00:00 mail postfix/submission/smtpd[7455]: disconnect from mail.myDomain.com[127.0.0.1] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
2024-08-21T17:15:19.624063+00:00 mail postfix/qmgr[1548]: 4WptJ73sfNz2H3y: from=<myUser@myDomain.com>, size=609, nrcpt=1 (queue active)
2024-08-21T17:15:19.697455+00:00 mail postfix/amavis/smtp[7476]: connect to 127.0.0.1[127.0.0.1]:10026: Connection refused
2024-08-21T17:15:19.704308+00:00 mail postfix/amavis/smtp[7476]: 4WptJ73sfNz2H3y: to=<myGmail@gmail.com>, relay=none, delay=0.32, delays=0.24/0.07/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10026: Connection refused)

23

Re: No emails but no errors either

communque wrote:

Here's another error I'm seeing when trying to send an email via RoundCube to a gmail address...

2024-08-21T17:15:19.622072+00:00 mail roundcube: <a8ok2a4a> User myUser@myDomain.com [192.42.116.196]; Message <9190f672484d85a5906f0b36b5b2d474@myDomain.com> for myGmail@gmail.com; 250: 2.0.0 Ok: queued as 4WptJ73sfNz2H3y
2024-08-21T17:15:19.623179+00:00 mail postfix/submission/smtpd[7455]: disconnect from mail.myDomain.com[127.0.0.1] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
2024-08-21T17:15:19.624063+00:00 mail postfix/qmgr[1548]: 4WptJ73sfNz2H3y: from=<myUser@myDomain.com>, size=609, nrcpt=1 (queue active)
2024-08-21T17:15:19.697455+00:00 mail postfix/amavis/smtp[7476]: connect to 127.0.0.1[127.0.0.1]:10026: Connection refused
2024-08-21T17:15:19.704308+00:00 mail postfix/amavis/smtp[7476]: 4WptJ73sfNz2H3y: to=<myGmail@gmail.com>, relay=none, delay=0.32, delays=0.24/0.07/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10026: Connection refused)

Can you tell me if Amavis is running ? Looks like there is problem,

 sudo systemctl status amavis

Regards

24

Re: No emails but no errors either

Amavis looks like it's loaded and enabled, but dead.

○ 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

25

Re: No emails but no errors either

communque wrote:

Amavis looks like it's loaded and enabled, but dead.

○ 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

I thought so, attach output of

 sudo systemctl status amavis

Regards