No mails are being received or sent

Discussion in 'ISPConfig 3 Priority Support' started by DrMartinus, May 11, 2021.

  1. DrMartinus

    DrMartinus Member HowtoForge Supporter

    Hi,
    once again there are no mails coming in. I searched already through the log files (maillog) and found only this:
    Code:
    warning: connect to 127.0.0.1:10023: connection refused 
    I checked postgrey, it is running. I restarted it, I upgraded ISPConfig in the wake of which all services were restarted, yet the problem remains. There are no failed services according to
    Code:
    systemctl --state=failed
    In additon to that, messages sent will go out without error, but don't reach the recipient.
    Where else can I look for the cause of the problem?
     
    Last edited: May 11, 2021
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please run this command and post the result:

    Code:
    netstat -ntap | grep 10023
     
  3. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Did you make a typo, or is it trying to reach 127.90.0.1? I suspect this address does not having anything listening on it - 127.0.0.1 is the default.
     
  4. DrMartinus

    DrMartinus Member HowtoForge Supporter

    There is nothing, no output.
     
  5. DrMartinus

    DrMartinus Member HowtoForge Supporter

    Yes, it's a typo...
     
  6. DrMartinus

    DrMartinus Member HowtoForge Supporter

    No more ideas?
    I just checked in roundcubemail, there it's the same, no mail for 4 days now.
     
    Last edited: May 12, 2021
  7. DrMartinus

    DrMartinus Member HowtoForge Supporter

    I just checked amavisd (again), and for some strange reason the service wasn't running. So I restarted it, and lo, now mails are trickling in. I hope this solved the problem. But it's still strange, because day before yesterday I checked it as well and then it was running. o_O I'll continue to keep an eye on it.
     
  8. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I had the same problems on a old Amavis system, couldn't find the cause. Nowadays I use Rspamd which does a better job at spamfiltering and doesn't have such random crashes.
    If you want to switch, see https://www.howtoforge.com/replacing-amavisd-with-rspamd-in-ispconfig/
     
  9. DrMartinus

    DrMartinus Member HowtoForge Supporter

    The mail queue is now empty, but the original warning continues to appear:
    Code:
    May 12 14:43:59 postfix/smtpd[25384]: warning: connect to 127.0.0.1:10023: Connection refused
    May 12 14:43:59 postfix/smtpd[25384]: warning: problem talking to server 127.0.0.1:10023: Connection refused
    I will take a look at rspamd. But port 10023 is used by postgrey, and that's not a spam filter, it rather helps avoiding spam in a different way. I would always want to use it next to a spam filter.
     
  10. DrMartinus

    DrMartinus Member HowtoForge Supporter

    I just noticed that amavisd mainly serves as spamfilter. The HowTo is not so useful for me, as I run CentOS, but going through the text I found that the option to use rspamd instead of amavisd is given in the ISPConfig UI. But that doesn't mean it's available, from what I see.
    rspamd is not part of the regular CentOS repositories, it seems.
     
  11. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    When you see that, check the status of postgrey.

    It is available through their own repo: https://rspamd.com/downloads.html - you will indeed have to adjust your commands to CentOS when following the HowToForge guide.
     
  12. DrMartinus

    DrMartinus Member HowtoForge Supporter

    Mail has stopped working again. I check the status of postgrey again and again, it's active and doesn't show any problem...
    There is only one thing. It says:
    Code:
    Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
     
  13. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Fwiw, rspamd makes a much better use of greylisting (based on score threshold), and you can (should?) uninstall postgrey when using rspamd (though that currently requires custom postfix config; it will get implemented in ispconfig eventually).
     
  14. DrMartinus

    DrMartinus Member HowtoForge Supporter

    Thanks for the input. There seem to be more problems CentOS, probably due to RHEL's policy change, so it seems I'll have to change the OS first before getting that done (or find a way around yum restrictions I currently encounter). Before that, I would like to get mail operating again. It has worked well for many years, why should it stop now? And it's probably not wise to change the OS while there are some unresolved issues.
     
  15. DrMartinus

    DrMartinus Member HowtoForge Supporter

    I've been sending mails from different senders which are not on my server to an address on my server in order to find out if there are any error messages returned. Now I got one back saying:
    Code:
    Last error   : 451 4.3.5 
    And a more wordy version:
    Code:
    Server configuration problem
    Unfortunately that's not very helpful. I know that I didn't do any changes to the configuration. I checked if some software updates could have caused this, but none of the recently (on 8th of May, since when mails have stopped) updated packages are in any way related to the mail system (the only package updated was p7zip).
     
  16. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Perhaps; or you can take the opposite view, that if there is an unexplained issue going on with postgrey on your current server, then moving to a new server/OS is quite likely to not have the same issue (particularly if you uninstalled postgrey and used rspamd).
    Is it returning this for all messages or only when postgrey is failing? If all messages, you might have some more clues in your maillog.
     
  17. DrMartinus

    DrMartinus Member HowtoForge Supporter

    The weird thing is that postgrey is reported by systemctl to be active without problems. I find no other clues in the maillog. Only the message reported in my first post is repeated. To avoid confusion: the error message I posted above (Server configuration problem) has been sent by my server to the sender.
     
  18. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    It's there a postgrey process running? According to your netstat output, nothing is listening in 10023, so I'd guess maybe it has died. If not, run 'lsof -p pid' on it's paid. If it has died, try to find traces of why in all your log files; failing that you could start it up then attach with strace (or ltrace, or even a debugger) and wait for it to die again and see what happened.
     
  19. DrMartinus

    DrMartinus Member HowtoForge Supporter

    Here some output:
    Code:
    systemctl status postgrey
    ● postgrey.service - Postfix Greylisting Service
       Loaded: loaded (/usr/lib/systemd/system/postgrey.service; enabled; vendor preset: disabled)
       Active: active (running) since Do 2021-05-13 15:35:47 UTC; 17h ago
         Docs: man:postgrey(8)
      Process: 23634 ExecStart=/usr/sbin/postgrey $POSTGREY_TYPE $POSTGREY_PID $POSTGREY_GROUP $POSTGREY_USER --greylist-text=Greylisted for %%s seconds --daemonize $POSTGREY_DELAY $POSTGREY_OPTS (code=exited, status=0/SUCCESS)
      Process: 23632 ExecStartPre=/bin/rm -f /var/run/postgrey.pid (code=exited, status=0/SUCCESS)
     Main PID: 23637 (postgrey --unix)
       CGroup: /system.slice/postgrey.service
               └─23637 postgrey --unix=/var/spool/postfix/postgrey/socket --pidfile=/var/run/postgrey.pid --group=postgrey --user=postgrey --greylist-text=Greylisted for %s seconds --daemo...
    
    Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
    And this one:
    Code:
     lsof -p 23634
    
    Yes, there is nothing (see my posts above). That's the curious part: postgrey is active, the process seems to run normally, yet there is no active process. How can that be?
     
  20. DrMartinus

    DrMartinus Member HowtoForge Supporter

    How to strace a systemd process? Do I
    Code:
    strace 'systemctl restart postgrey'
    ? or ...
     

Share This Page