Mail stuck in queue ( connect to 127.0.0.1[127.0.0.1]:10024: Connection refused )

Discussion in 'Installation/Configuration' started by slagroom, Jul 23, 2024.

  1. slagroom

    slagroom Member

    Whenever I flush the postfix queue, I have a list of deferred messages with this in it:

    postfix/error[11703]: 5342CC65B0C: to=x, orig_to=X, relay=none, delay=545560, delays=545560/0.22/0/0.01, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

    but this ISPConfig server runs rspamd, there is nothing listening on port 10024 (!?), there is no amavis on this server as far as I can see.

    And, another (perhaps related) thing is that I was at first unable to even see the queue, or flush the queue, because the pickup line in master.cf was commented out! This is using debian 12 clean OS installed with postfix mail_version = 3.7.11 installed by ispconfig install, using the standard debian repos. Just sayin', seems to me that this pickup line in master.cf needs to be uncommented by ispconfig scripting, or you'll see many more users with this issue.. I'm not assuming that the official release of postfix carried by debian has this commented out, or whatever happened, but I found another thread in the forum with the exact same issue on debian 12.

    Can someone post his/her master.cf from a debian bookworm ispconfig install with postfix and rspamd ?
    I don't even remember if amavis was installed or not, I used this to install ispconfig quite long ago:
    Code:
    wget -O - https://get.ispconfig.org | sh -s -- --use-nginx --no-dns --use-unbound --use-php=7.4,8.2 --no-mailman --no-quota --no-ntp --no-firewall --no-quota --unattended-upgrades=autoclean
    And this server's current master.cf:
    Code:
    # cat master.cf
    #
    # Postfix master process configuration file.  For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master" or
    # on-line: http://www.postfix.org/master.5.html).
    #
    # Do not forget to execute "postfix reload" after editing this file.
    #
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (no)    (never) (100)
    # ==========================================================================
    smtp      inet  n       -       y       -       -       smtpd
    
    submission inet n       -       y       -       -       smtpd
      -o syslog_name=postfix/submission
      -o smtpd_tls_security_level=encrypt
      -o smtpd_sasl_auth_enable=yes
      -o { smtpd_client_restrictions = reject_rbl_client auth.spamrats.com=127.0.0.43, permit }
    
    submissions     inet  n       -       y       -       -       smtpd
      -o syslog_name=postfix/submissions
      -o smtpd_tls_wrappermode=yes
      -o smtpd_sasl_auth_enable=yes
    
    #628       inet  n       -       y       -       -       qmqpd
    pickup    unix  n       -       y       60      1       pickup
    cleanup   unix  n       -       y       -       0       cleanup
    qmgr      unix  n       -       n       300     1       qmgr
    #qmgr     unix  n       -       n       300     1       oqmgr
    tlsmgr    unix  -       -       y       1000?   1       tlsmgr
    rewrite   unix  -       -       y       -       -       trivial-rewrite
    bounce    unix  -       -       y       -       0       bounce
    defer     unix  -       -       y       -       0       bounce
    trace     unix  -       -       y       -       0       bounce
    verify    unix  -       -       y       -       1       verify
    flush     unix  n       -       y       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    proxywrite unix -       -       n       -       1       proxymap
    smtp      unix  -       -       y       -       -       smtp
    relay     unix  -       -       y       -       -       smtp
            -o syslog_name=postfix/$service_name
    showq     unix  n       -       y       -       -       showq
    error     unix  -       -       y       -       -       error
    retry     unix  -       -       y       -       -       error
    discard   unix  -       -       y       -       -       discard
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       y       -       -       lmtp
    anvil     unix  -       -       y       -       1       anvil
    scache    unix  -       -       y       -       1       scache
    postlog   unix-dgram n  -       n       -       1       postlogd
    
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRXhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}
    
    uucp      unix  -       n       n       -       -       pipe
      flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    
    ifmail    unix  -       n       n       -       -       pipe
      flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp     unix  -       n       n       -       -       pipe
      flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
    scalemail-backend unix -       n       n       -       2       pipe
      flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
    mailman   unix  -       n       n       -       -       pipe
      flags=FRX user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}
    dovecot   unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
    
    Thanks in advance for any info on all this.
    (Yes, I realize I can run a vm or free hoster instance to just try and clean install ispconfig the same way and then copy the master.cf from that, but I'm lazy and posting this seemed useful either way)..
     
    Last edited: Jul 23, 2024
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    On my Debian 12 installed from Debian installation media and ISPConfig installed with auto-installer the pickup line is not commented out.
    That master.cf is 147 lines long, twice as long as what you posted. Most of the lines are comment lines, though.
     
  3. pyte

    pyte Well-Known Member HowtoForge Supporter

    Made a clean install this week on Debian 12 aswell. No such issues, everything works as expected and is configured correctly. Are you sure you just did a clean install and there was no configuration or packages installed beforehand?

    Installed with:
    Code:
     wget -O - https://get.ispconfig.org | sh -s -- --no-dns --no-pma --no-mailman --use-ftp-ports=40110-40210 --unattended-upgrade
     
  4. slagroom

    slagroom Member

    Yes, I moved all commented stuff out of the master.cf for easy viewing. Since nobody is posting his/her master.cf I will try and find out on a clean debian 12 VM and see where it went wrong. Either way, the first issue, where deferred mail is *still* looking for port 10024 is not solved. I have never installed amavis on this debian, so whatever it is, ispconfig somehow tried amavis before it installed rspamd or something? I have also switched the content filters from rspamd to amavis, saved it, set it back and saved it again. To no avail. The deferred messages are still there. By the way, all in/out mail works fine aside from this, so it's probably an old bunch of messages, but still strange how there are so many of them (a list of about 24, with several valid existing to: addresses on this server).
     
  5. pyte

    pyte Well-Known Member HowtoForge Supporter

    Did you install ISPConfig on a fresh install of Debian 12 or was the host in use for something else before?


    I don't think that that would be super helpful, as something went wrong and we should try to find out what happend instead of just copying over config that may not work on your system. Anyways you can find all config files in the ispconfig install archive which you can download on the website.
     
  6. slagroom

    slagroom Member

    It was a minimal debian 12, so yes, I had to install openssh, and some minor tools, like mc and wget, but definitely no exim because I detest exim. ISPConfig has installed postfix for me, that's for sure.
    No. There is no postfix master.cf that ispconfig uses, it only ads to the existing one.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The setup works perfectly fine on Debian 12 out of the box, installed fresh systems this week. According to your other posts, you are manually altering templates, so your issues might be caused by manually altered templates. Also I wonder why your system seems to try to use Amavis as its a Rspamd setup, maybe you changes spam filter from rspamd to Amavis under System > server config. Check that setting, if its set to Rspamd, set it to amavis, press save, change it back to rspamd, press save. This will rewrite the config.

    And to ensure you get a working system, do not alter any templates and do not alter postfix config files, then you get a setup that works out of the box.
     

Share This Page