[GH-ISSUE #2342] Getting Error 451 4.3.0 #1577

Closed
opened 2026-02-27 11:17:54 +03:00 by kerem · 5 comments
Owner

Originally created by @sissieadmin on GitHub (Aug 19, 2021).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2342

Impacted versions

  • OS Type: Ubuntu 20.04.3 LTS
  • OS Version: 20.04.3
  • Database Type: PostgreSQL
  • Database version: 12.8
  • Modoboa: 1.17.0
  • installer used: Yes
  • Webserver: Nginx

Steps to reproduce

Try to send an email as any valid user via a client to any valid address (hosted by this server or otherwise), and an error appears on Thunderbird and Clawsmail.

Try to send an email via the webmail client, and the email appears to be sending.

Current behavior

Inbound email has been inconsistent. Most recent tests seem to work fine.

Sending via a client results in an error:

** error occurred on SMTP session
*** Error occurred while sending the message:
451 4.3.5 <recipient-address@domain.com>: Recipient address rejected: Server configuration problem

On /var/log/mail.log when sending email from valid address outbound.

Aug 18 21:58:11 xm1 postfix/submission/smtpd[3410]: warning: problem talking to server 127.0.0.1:9999: Success
Aug 18 21:58:11 xm1 postfix/submission/smtpd[3410]: NOQUEUE: reject: RCPT from reverse-ip[11.111.111.11]: 451 4.3.5 <recipient-address@domain.com>: Recipient address rejected: Server configuration problem; from=<sender-address@domain.com> to=<recipient-address@domain.com> proto=ESMTP helo=<localhost>

Expected behavior

Mail is queued and sent properly to other mailbox or outside service.

Originally created by @sissieadmin on GitHub (Aug 19, 2021). Original GitHub issue: https://github.com/modoboa/modoboa/issues/2342 # Impacted versions * OS Type: Ubuntu 20.04.3 LTS * OS Version: 20.04.3 * Database Type: PostgreSQL * Database version: 12.8 * Modoboa: 1.17.0 * installer used: Yes * Webserver: Nginx # Steps to reproduce Try to send an email as any valid user via a client to any valid address (hosted by this server or otherwise), and an error appears on Thunderbird and Clawsmail. Try to send an email via the webmail client, and the email appears to be sending. # Current behavior Inbound email has been inconsistent. Most recent tests seem to work fine. Sending via a client results in an error: ``` ** error occurred on SMTP session *** Error occurred while sending the message: 451 4.3.5 <recipient-address@domain.com>: Recipient address rejected: Server configuration problem ``` On /var/log/mail.log when sending email from valid address outbound. ``` Aug 18 21:58:11 xm1 postfix/submission/smtpd[3410]: warning: problem talking to server 127.0.0.1:9999: Success Aug 18 21:58:11 xm1 postfix/submission/smtpd[3410]: NOQUEUE: reject: RCPT from reverse-ip[11.111.111.11]: 451 4.3.5 <recipient-address@domain.com>: Recipient address rejected: Server configuration problem; from=<sender-address@domain.com> to=<recipient-address@domain.com> proto=ESMTP helo=<localhost> ``` # Expected behavior Mail is queued and sent properly to other mailbox or outside service.
kerem 2026-02-27 11:17:54 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@sissieadmin commented on GitHub (Aug 19, 2021):

Double checked aioredis version as per #2200 but had the right version installed. Tried reinstalling, no change in outcome.

I found that removing

# Recipient restriction rules
smtpd_recipient_restrictions =
      check_policy_service inet:127.0.0.1:9999
      permit_mynetworks
      permit_sasl_authenticated
      check_recipient_access
          proxy:pgsql:/etc/postfix/sql-maintain.cf
          proxy:pgsql:/etc/postfix/sql-relay-recipient-verification.cf
      reject_unverified_recipient
      reject_unauth_destination
      reject_non_fqdn_sender
      reject_non_fqdn_recipient
      reject_non_fqdn_helo_hostname

Changed to:

# Recipient restriction rules
smtpd_recipient_restrictions =
#      check_policy_service inet:127.0.0.1:9999
      permit_mynetworks
      permit_sasl_authenticated
      check_recipient_access
          proxy:pgsql:/etc/postfix/sql-maintain.cf
          proxy:pgsql:/etc/postfix/sql-relay-recipient-verification.cf
      reject_unverified_recipient
      reject_unauth_destination
      reject_non_fqdn_sender
      reject_non_fqdn_recipient
      reject_non_fqdn_helo_hostname

Gets around the issue. I am unsure what controls the policies on that daemon, but I am assuming its the web admin portal set policies that come in here and may be broken.

I was able to verify that the port is being listened on, and that the daemon is active.

sudo ss -tanp | grep 9999
LISTEN   0        100              127.0.0.1:9999               0.0.0.0:*        users:(("python",pid=1227,fd=8))                    
sudo ps -aux | grep 1227
modoboa     1227  0.1  2.0 202796 80676 ?        S    21:54   0:01 /srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py policy_daemon --host 127.0.0.1
user      5744  0.0  0.0   6764  2048 pts/0    S+   22:09   0:00 grep --color=auto 1227

Notice that I had made sure Modoboa was on ipv4 with "--host 127.0.0.1" as per this comment with no luck.

<!-- gh-comment-id:901594826 --> @sissieadmin commented on GitHub (Aug 19, 2021): Double checked aioredis version as per #2200 but had the right version installed. Tried reinstalling, no change in outcome. I found that removing ``` # Recipient restriction rules smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:9999 permit_mynetworks permit_sasl_authenticated check_recipient_access proxy:pgsql:/etc/postfix/sql-maintain.cf proxy:pgsql:/etc/postfix/sql-relay-recipient-verification.cf reject_unverified_recipient reject_unauth_destination reject_non_fqdn_sender reject_non_fqdn_recipient reject_non_fqdn_helo_hostname ``` Changed to: ``` # Recipient restriction rules smtpd_recipient_restrictions = # check_policy_service inet:127.0.0.1:9999 permit_mynetworks permit_sasl_authenticated check_recipient_access proxy:pgsql:/etc/postfix/sql-maintain.cf proxy:pgsql:/etc/postfix/sql-relay-recipient-verification.cf reject_unverified_recipient reject_unauth_destination reject_non_fqdn_sender reject_non_fqdn_recipient reject_non_fqdn_helo_hostname ``` Gets around the issue. I am unsure what controls the policies on that daemon, but I am assuming its the web admin portal set policies that come in here and may be broken. I was able to verify that the port is being listened on, and that the daemon is active. ``` sudo ss -tanp | grep 9999 LISTEN 0 100 127.0.0.1:9999 0.0.0.0:* users:(("python",pid=1227,fd=8)) ``` ``` sudo ps -aux | grep 1227 modoboa 1227 0.1 2.0 202796 80676 ? S 21:54 0:01 /srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py policy_daemon --host 127.0.0.1 user 5744 0.0 0.0 6764 2048 pts/0 S+ 22:09 0:00 grep --color=auto 1227 ``` Notice that I had made sure Modoboa was on ipv4 with "--host 127.0.0.1" as per [this comment](https://github.com/modoboa/modoboa/issues/2200#issuecomment-803266165) with no luck.
Author
Owner

@vedrafal commented on GitHub (Aug 21, 2021):

Have you seen the last reply to this post? It worked for me. My Python was on 3.8 already so check your folder path.

https://github.com/modoboa/modoboa/issues/2200#issuecomment-897495315

Here is the reason of the problem: ray-project/ray#17475
So delete all aioredis packages here : /srv/modoboa/env/lib/python3.7/site-packages
And install the version 1.3.1 with this command: pip3 install -Iv aioredis==1.3.1 --target=/srv/modoboa/env/lib/python3.7/site-packages
Reboot your server and the problem will be solved.

<!-- gh-comment-id:903161926 --> @vedrafal commented on GitHub (Aug 21, 2021): Have you seen the last reply to this post? It worked for me. My Python was on 3.8 already so check your folder path. https://github.com/modoboa/modoboa/issues/2200#issuecomment-897495315 > > > Here is the reason of the problem: [ray-project/ray#17475](https://github.com/ray-project/ray/issues/17475) > So delete all aioredis packages here : `/srv/modoboa/env/lib/python3.7/site-packages` > And install the version 1.3.1 with this command: `pip3 install -Iv aioredis==1.3.1 --target=/srv/modoboa/env/lib/python3.7/site-packages` > Reboot your server and the problem will be solved.
Author
Owner

@sissieadmin commented on GitHub (Aug 24, 2021):

Have you seen the last reply to this post? It worked for me. My Python was on 3.8 already so check your folder path.

#2200 (comment)

Here is the reason of the problem: ray-project/ray#17475
So delete all aioredis packages here : /srv/modoboa/env/lib/python3.7/site-packages
And install the version 1.3.1 with this command: pip3 install -Iv aioredis==1.3.1 --target=/srv/modoboa/env/lib/python3.7/site-packages
Reboot your server and the problem will be solved.

Yes. I posted a comment of things I tried, that being the primary fix. But the version of aioredis was already correct, and backing up and reinstalling that directory didnt make a difference.

<!-- gh-comment-id:904251642 --> @sissieadmin commented on GitHub (Aug 24, 2021): > Have you seen the last reply to this post? It worked for me. My Python was on 3.8 already so check your folder path. > > [#2200 (comment)](https://github.com/modoboa/modoboa/issues/2200#issuecomment-897495315) > > > Here is the reason of the problem: [ray-project/ray#17475](https://github.com/ray-project/ray/issues/17475) > > So delete all aioredis packages here : `/srv/modoboa/env/lib/python3.7/site-packages` > > And install the version 1.3.1 with this command: `pip3 install -Iv aioredis==1.3.1 --target=/srv/modoboa/env/lib/python3.7/site-packages` > > Reboot your server and the problem will be solved. Yes. I posted a comment of things I tried, that being the primary fix. But the version of aioredis was already correct, and backing up and reinstalling that directory didnt make a difference.
Author
Owner

@stale[bot] commented on GitHub (Oct 23, 2021):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

<!-- gh-comment-id:950042625 --> @stale[bot] commented on GitHub (Oct 23, 2021): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Author
Owner

@sissieadmin commented on GitHub (Oct 23, 2021):

I was able to resolve this issue by essentially running a reinstall of modoboa on top of the existing one (not removing any packages prior but repulling the git and running the build).

It was pita, in that I had to correct every password for postgres, etc., in the configs. But it started working okay once I was done digging through every service config looking for passwords to correct.

On October 22, 2021 7:23:51 PM PDT, "stale[bot]" @.***> wrote:

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:

https://github.com/modoboa/modoboa/issues/2342#issuecomment-950042625
Sent from my Android device with K-9 Mail. Please excuse my brevity.
<!-- gh-comment-id:950049040 --> @sissieadmin commented on GitHub (Oct 23, 2021): I was able to resolve this issue by essentially running a reinstall of modoboa on top of the existing one (not removing any packages prior but repulling the git and running the build). It was pita, in that I had to correct every password for postgres, etc., in the configs. But it started working okay once I was done digging through every service config looking for passwords to correct. On October 22, 2021 7:23:51 PM PDT, "stale[bot]" ***@***.***> wrote: >This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. > > >-- >You are receiving this because you authored the thread. >Reply to this email directly or view it on GitHub: >https://github.com/modoboa/modoboa/issues/2342#issuecomment-950042625 -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1577
No description provided.