Updated mailboxes can't receive outside mail: Server configuration problem

Discussion in 'ISPConfig 3 Priority Support' started by mlnzigzag, Sep 24, 2018.

  1. mlnzigzag

    mlnzigzag New Member

    I am running a multiserver ISPConfig setup.
    Server have been installed following howtoforge's howtos. They are both ubuntu 14.04.5 LTS.
    Master is named web and it works as expected after last update.
    There is a second server named mail and it has the following issue after updating from ISPConfig 3.1.2 to the latest 3.1.13.
    (I followed instructions, updated slave before master, reconfigured services on both).

    The issue was sneaky, as after the update everything went fine, until I updated a mailbox.
    After I update any mailbox (from different domains) the mailbox can't receive mail from outside anymore.
    I checked this even by creating a test mailbox, it's the same.

    In the postifx/dovecot log i have:
    Code:
    Sep 24 18:23:02 mail postfix/smtpd[36842]: NOQUEUE: reject: RCPT from host02.sender.dom[1.2.3.4]: 451 4.3.5 <[email protected]>: Recipient address rejected: Server configuration problem; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<host02.sender.dom>
    
    Also, the updated mailboxes in the mysql table dbispconfig.mail_user all have in common the sysuser field (1) I guess it means they were edited or created by admin and not by the client's account. That's true, BTW editing with the client's account changed anything.

    web also has mail role and its mail domains don't have the issue
    edited mailbox on the "mail" server only will receive mail from its own domain, and other domains on the server, after the mailbox update.

    I'm concerned I came into something I'm unable to further diagnose.
     
    Last edited: Sep 24, 2018
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Is the error in the mail.log the only error that you get when you send an email to that mailobox? Did you compare the mailbox file and folder structure in /var/vmail/domain.tld/.... with a working mailbox?
     
  3. mlnzigzag

    mlnzigzag New Member

    folders structures are the same, after your hint (looking at mail.log with grep before) i found this too:
    Code:
     warning: connect to 127.0.0.1:10023: Connection refused
    But why should this filter be triggered only for updated mailbox?
    And do you know how can I disable the whole filters in order to get it back working, then I can diagnose with no hurries? :)

    Thank you very much for your hints.

    UPDATE: I got into each problematic mailbox and set spamfilter to -not enabled- some mail is now getting in, but the localhost:10023 goes on and not every mail gets in. :(
     
    Last edited: Sep 24, 2018
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please install the postgrey package from Ubuntu and start postgrey. Then check if postgrey listend on port 10023, e.g. with:

    netstat -ntap | grep 10023
     
  5. mlnzigzag

    mlnzigzag New Member

    It is actually installed, but I found it starts and dies with no traces in the log:
    Code:
    root@mail:~# service postgrey status
    ● postgrey.service - LSB: Start/stop the postgrey daemon
       Loaded: loaded (/etc/init.d/postgrey; bad; vendor preset: enabled)
       Active: active (exited) since mer 2018-09-26 13:05:46 CEST; 1min 51s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 23405 ExecStop=/etc/init.d/postgrey stop (code=exited, status=1/FAILURE)
      Process: 23415 ExecStart=/etc/init.d/postgrey start (code=exited, status=0/SUCCESS)
    
    set 26 13:05:46 mail.myserver.tld postgrey[23415]:  * Starting postfix greylisting daemon postgrey
    set 26 13:05:46 mail.myserver.tld postgrey[23415]: Pid_file "/var/run/postgrey.pid" already exists.  Overwriting!
    set 26 13:05:46 mail.myserver.tld postgrey[23426]: Process Backgrounded
    set 26 13:05:46 mail.myserver.tld postgrey[23426]: 2018/09/26-13:05:46 postgrey (type Net::Server::Multiplex) starting! pid(23426)
    set 26 13:05:46 mail.myserver.tld postgrey[23415]:    ...done.
    set 26 13:05:46 mail.myserver.tld systemd[1]: Started LSB: Start/stop the postgrey daemon.
    set 26 13:05:46 mail.myserver.tld postgrey[23426]: Resolved [localhost]:10023 to [127.0.0.1]:10023, IPv4
    set 26 13:05:46 mail.myserver.tld postgrey[23426]: Resolved [localhost]:10023 to [::1]:10023, IPv6
    set 26 13:05:46 mail.myserver.tld postgrey[23426]: Binding to TCP port 10023 on host 127.0.0.1 with IPv4
    set 26 13:05:46 mail.myserver.tld postgrey[23426]: Binding to TCP port 10023 on host ::1 with IPv6
    root@mail:~# service postgrey restart
    root@mail:~# service postgrey status
    ● postgrey.service - LSB: Start/stop the postgrey daemon
       Loaded: loaded (/etc/init.d/postgrey; bad; vendor preset: enabled)
       Active: active (exited) since mer 2018-09-26 13:07:42 CEST; 1s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 23580 ExecStop=/etc/init.d/postgrey stop (code=exited, status=1/FAILURE)
      Process: 23590 ExecStart=/etc/init.d/postgrey start (code=exited, status=0/SUCCESS)
    
    set 26 13:07:42 mail.myserver.tld postgrey[23590]:  * Starting postfix greylisting daemon postgrey
    set 26 13:07:42 mail.myserver.tld postgrey[23590]: Pid_file "/var/run/postgrey.pid" already exists.  Overwriting!
    set 26 13:07:42 mail.myserver.tld postgrey[23600]: Process Backgrounded
    set 26 13:07:42 mail.myserver.tld postgrey[23600]: 2018/09/26-13:07:42 postgrey (type Net::Server::Multiplex) starting! pid(23600)
    set 26 13:07:42 mail.myserver.tld postgrey[23590]:    ...done.
    set 26 13:07:42 mail.myserver.tld systemd[1]: Started LSB: Start/stop the postgrey daemon.
    set 26 13:07:42 mail.myserver.tld postgrey[23600]: Resolved [localhost]:10023 to [127.0.0.1]:10023, IPv4
    set 26 13:07:42 mail.myserver.tld postgrey[23600]: Resolved [localhost]:10023 to [::1]:10023, IPv6
    set 26 13:07:42 mail.myserver.tld postgrey[23600]: Binding to TCP port 10023 on host 127.0.0.1 with IPv4
    set 26 13:07:42 mail.myserver.tld postgrey[23600]: Binding to TCP port 10023 on host ::1 with IPv6
    root@mail:~# journalctl -xe
    set 26 13:07:42 mail.myserver.tld systemd[1]: Stopping LSB: Start/stop the postgrey daemon...
    -- Subject: L'unità postgrey.service inizia la fase di spegnimento
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- L'unità postgrey.service ha iniziato la fase di spegnimento.
    set 26 13:07:42 mail.myserver.tld postgrey[23580]:  * Stopping postfix greylisting daemon postgrey
    set 26 13:07:42 mail.myserver.tld systemd[1]: postgrey.service: Control process exited, code=exited status=1
    set 26 13:07:42 mail.myserver.tld systemd[1]: Stopped LSB: Start/stop the postgrey daemon.
    -- Subject: L'unità postgrey.service termina la fase di spegnimento
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- L'unità postgrey.service ha terminato la fase di spegnimento.
    set 26 13:07:42 mail.myserver.tld systemd[1]: postgrey.service: Unit entered failed state.
    set 26 13:07:42 mail.myserver.tld systemd[1]: postgrey.service: Failed with result 'exit-code'.
    set 26 13:07:42 mail.myserver.tld systemd[1]: Starting LSB: Start/stop the postgrey daemon...
    -- Subject: L'unità postgrey.service inizia la fase di avvio
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- L'unità postgrey.service ha iniziato la fase di avvio.
    set 26 13:07:42 mail.myserver.tld postgrey[23590]:  * Starting postfix greylisting daemon postgrey
    set 26 13:07:42 mail.myserver.tld postgrey[23590]: Pid_file "/var/run/postgrey.pid" already exists.  Overwriting!
    set 26 13:07:42 mail.myserver.tld postgrey[23600]: Process Backgrounded
    set 26 13:07:42 mail.myserver.tld postgrey[23600]: 2018/09/26-13:07:42 postgrey (type Net::Server::Multiplex) starting! pid(23600)
    set 26 13:07:42 mail.myserver.tld postgrey[23590]:    ...done.
    set 26 13:07:42 mail.myserver.tld systemd[1]: Started LSB: Start/stop the postgrey daemon.
    -- Subject: L'unità postgrey.service termina la fase di avvio
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- L'unità postgrey.service ha terminato la fase di avvio.
    --
    -- La fase di avvio è done.
    set 26 13:07:42 mail.myserver.tld postgrey[23600]: Resolved [localhost]:10023 to [127.0.0.1]:10023, IPv4
    set 26 13:07:42 mail.myserver.tld postgrey[23600]: Resolved [localhost]:10023 to [::1]:10023, IPv6
    set 26 13:07:42 mail.myserver.tld postgrey[23600]: Binding to TCP port 10023 on host 127.0.0.1 with IPv4
    set 26 13:07:42 mail.myserver.tld postgrey[23600]: Binding to TCP port 10023 on host ::1 with IPv6
    
    root@mail:~# cat /var/run/postgrey.pid
    23600
    root@mail:~# ps waux |grep postgrey
    root     23674  0.0  0.0  14252   972 pts/0    S+   13:08   0:00 grep --color=auto postgrey
    root@mail:~# ps waux |grep 23600
    root     23678  0.0  0.0  14252  1084 pts/0    S+   13:08   0:00 grep --color=auto 23600
    root@mail:~# grep -v ^\# /etc/default/postgrey
    
    POSTGREY_OPTS="--inet=10023"
    
     
  6. mlnzigzag

    mlnzigzag New Member

    This issue was hidden in the logs, until I've run postgrey binary in console and I got:
    ERROR: Can't connect to TCP port 10023 on ::1 [Cannot assign requested address] at /usr/sbin/postgrey line 776.

    It was an issue related to disabled IPV6 and failed bind to ::1:10023.
    You can fix it by editing /etc/default/postgrey and add 127.0.0.1 to the inet argument: --inet=127.0.0.1:10023

    Or better let systemd handle it by creating /etc/systemd/system/postgrey.service with following content:

    [Unit]
    Description=Postfix Greylisting Service
    Before=postfix.service

    [Service]
    Type=forking
    ExecStartPre=-/bin/rm -f /var/run/postgrey.pid
    PIDFile=/var/run/postgrey.pid
    ExecStart=/usr/sbin/postgrey --inet=127.0.0.1:10023 -d --delay=150 --pidfile=/var/run/postgrey.pid
    Restart=always
    RestartSec=1

    [Install]
    WantedBy=multi-user.target​
     
    Last edited: Dec 7, 2018

Share This Page