mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 17:06:01 +03:00
[GH-ISSUE #2200] error 451 4.3.5 #1540
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1540
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CHazz on GitHub (Mar 18, 2021).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2200
hi, i have new error without any reasson .. maybe restart or update any package .. but now have this :/
debian 10, maria 10.5 , nginx mainline, --
Mar 18 16:56:16 mail postfix/postscreen[20786]: CONNECT from [127.0.0.1]:57479 to [127.0.0.1]:25
Mar 18 16:56:16 mail postfix/postscreen[20786]: WHITELISTED [127.0.0.1]:57479
Mar 18 16:56:16 mail postfix/smtpd[20787]: connect from localhost[127.0.0.1]
Mar 18 16:56:17 mail postfix/smtpd[20787]: warning: problem talking to server 127.0.0.1:9999: Success
Mar 18 16:56:17 mail postfix/smtpd[20787]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 451 4.3.5 user@domain2.eu: Recipient address rejected: Server configuration problem; from=user@domain1.net to=user@domain2.eu proto=ESMTP helo=<email.domain1.net>
Mar 18 16:56:17 mail postfix/smtpd[20787]: disconnect from localhost[127.0.0.1] ehlo=1 auth=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=5/6
thanks a lot !
@CHazz commented on GitHub (Mar 19, 2021):
when disabling modoboa policy on port 9999 .. all working now .. but not known where is bug ...
in /etc/postfix/main.cf
#Recipient restriction rules
smtpd_recipient_restrictions =
check_policy_service inet:127.0.0.1:9999 << - buged .. (working everything when comment this line ..)
port is working for python ..
hidden@mail:/etc/postfix# sudo netstat -tnlp | grep :9999 tcp 0 0 127.0.0.1:9999 0.0.0.0:* LISTEN 25510/python tcp6 0 0 ::1:9999 :::* LISTEN 25510/pythonedit : reinstalling modoboa on this system did not help.
@tonioo commented on GitHub (Mar 20, 2021):
@CHazz The policy daemon is using ipv6 but your postfix configuration tries to use ipv4. You can force the use of ipv4 by using the --host option available with the policy_daemon startup script.
@CHazz commented on GitHub (Mar 20, 2021):
thanks for reply .. i try set force ipv4 in /etc/supervisor/conf.d/policyd.conf
command=/srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py policy_daemon --host 127.0.0.1
deamon listening now only on ipv4
root@mail:/var/log# sudo netstat -tnlp | grep :9999
tcp 0 0 127.0.0.1:9999 0.0.0.0:* LISTEN 5149/python
but have same error :(
Mar 20 20:02:02 mail postfix/postscreen[11084]: CONNECT from [127.0.0.1]:7297 to [127.0.0.1]:25
Mar 20 20:02:02 mail postfix/postscreen[11084]: WHITELISTED [127.0.0.1]:7297
Mar 20 20:02:02 mail postfix/smtpd[11085]: connect from localhost[127.0.0.1]
Mar 20 20:02:03 mail postfix/smtpd[11085]: warning: problem talking to server 127.0.0.1:9999: Success
Mar 20 20:02:03 mail postfix/smtpd[11085]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 451 4.3.5 mail@domain.eu: Recipient address rejected: Server configuration problem; from=mail@domain.net to=mail@domain.eu proto=ESMTP helo=<email.domain.net>
Mar 20 20:02:03 mail postfix/smtpd[11085]: disconnect from localhost[127.0.0.1] ehlo=1 auth=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=5/6
something wrong from my side ? thanks
edit:
i try change both to another localhost ip .. 127.0.0.2 .. same problem
Mar 20 21:42:28 mail postfix/postscreen[23099]: CONNECT from [127.0.0.1]:9233 to [127.0.0.1]:25
Mar 20 21:42:28 mail postfix/postscreen[23099]: WHITELISTED [127.0.0.1]:9233
Mar 20 21:42:28 mail postfix/smtpd[23100]: connect from localhost[127.0.0.1]
Mar 20 21:42:29 mail postfix/smtpd[23100]: warning: problem talking to server 127.0.0.2:9999: Success
Mar 20 21:42:29 mail postfix/smtpd[23100]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 451 4.3.5 mail@domain1.eu: Recipient address rejected: Server configuration problem; from=mail@domain2.net to=mail@domain1.eu proto=ESMTP helo=<email.domain2.net>
Mar 20 21:42:29 mail postfix/smtpd[23100]: disconnect from localhost[127.0.0.1] ehlo=1 auth=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=5/6
root@mail:/var/log#
root@mail:/etc# sudo netstat -tnlp | grep :9999
tcp 0 0 127.0.0.2:9999 0.0.0.0:* LISTEN 22971/python
@tonioo commented on GitHub (Mar 23, 2021):
Have you checked supervisor logs for the policyd component?
@CHazz commented on GitHub (Mar 23, 2021):
ah here is problem ... but not know where
2021-03-20 21:35:47,694 INFO spawned: 'policyd' with pid 18503
2021-03-20 21:35:47,698 INFO spawned: 'radicale' with pid 18504
2021-03-20 21:35:47,934 INFO exited: radicale (exit status 1; not expected)
2021-03-20 21:35:48,935 INFO success: policyd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-20 21:35:48,936 INFO spawned: 'radicale' with pid 18539
2021-03-20 21:35:49,156 INFO exited: radicale (exit status 1; not expected)
2021-03-20 21:35:51,168 INFO spawned: 'radicale' with pid 18541
2021-03-20 21:35:51,381 INFO exited: radicale (exit status 1; not expected)
2021-03-20 21:35:54,387 INFO spawned: 'radicale' with pid 18618
2021-03-20 21:35:54,602 INFO exited: radicale (exit status 1; not expected)
2021-03-20 21:35:55,604 INFO gave up: radicale entered FATAL state, too many start retries too quickly
2021-03-20 21:42:16,684 INFO waiting for policyd to die
2021-03-20 21:42:16,700 WARN received SIGTERM indicating exit request
2021-03-20 21:42:16,913 INFO stopped: policyd (exit status 1)
2021-03-20 21:42:17,125 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2021-03-20 21:42:17,125 INFO Included extra file "/etc/supervisor/conf.d/policyd.conf" during parsing
2021-03-20 21:42:17,125 INFO Included extra file "/etc/supervisor/conf.d/radicale.conf" during parsing
2021-03-20 21:42:17,136 INFO RPC interface 'supervisor' initialized
2021-03-20 21:42:17,136 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2021-03-20 21:42:17,136 INFO supervisord started with pid 22963
2021-03-20 21:42:18,139 INFO spawned: 'policyd' with pid 22971
2021-03-20 21:42:18,143 INFO spawned: 'radicale' with pid 22972
2021-03-20 21:42:18,368 INFO exited: radicale (exit status 1; not expected)
2021-03-20 21:42:19,370 INFO success: policyd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-20 21:42:19,373 INFO spawned: 'radicale' with pid 23005
2021-03-20 21:42:19,599 INFO exited: radicale (exit status 1; not expected)
2021-03-20 21:42:21,603 INFO spawned: 'radicale' with pid 23010
2021-03-20 21:42:21,818 INFO exited: radicale (exit status 1; not expected)
2021-03-20 21:42:24,825 INFO spawned: 'radicale' with pid 23022
2021-03-20 21:42:25,042 INFO exited: radicale (exit status 1; not expected)
2021-03-20 21:42:26,043 INFO gave up: radicale entered FATAL state, too many start retries too quickly
and
Task exception was never retrieved
future: <Task finished coro=<run_at() done, defined at /srv/modoboa/env/lib/python3.7/site-packages/modoboa/policyd/core.py:64> exception=OSError("Multiple exceptions: [Errno 111] Connect call failed ('::1', 6379, 0, 0), [Errno 111] Connect call failed ('127.0.0.1', 6379)")>
Traceback (most recent call last):
File "/srv/modoboa/env/lib/python3.7/site-packages/modoboa/policyd/core.py", line 67, in run_at
return await coro(*args)
File "/srv/modoboa/env/lib/python3.7/site-packages/modoboa/policyd/core.py", line 258, in reset_counters
rclient = await aioredis.create_redis_pool(settings.REDIS_URL)
File "/srv/modoboa/env/lib/python3.7/site-packages/aioredis/commands/init.py", line 198, in create_redis_pool
loop=loop)
File "/srv/modoboa/env/lib/python3.7/site-packages/aioredis/pool.py", line 58, in create_pool
await pool._fill_free(override_min=False)
File "/srv/modoboa/env/lib/python3.7/site-packages/aioredis/pool.py", line 383, in _fill_free
conn = await self._create_new_connection(self._address)
File "/srv/modoboa/env/lib/python3.7/site-packages/aioredis/connection.py", line 113, in create_connection
timeout)
File "/usr/lib/python3.7/asyncio/tasks.py", line 388, in wait_for
return await fut
File "/srv/modoboa/env/lib/python3.7/site-packages/aioredis/stream.py", line 24, in open_connection
lambda: protocol, host, port, **kwds)
File "/usr/lib/python3.7/asyncio/base_events.py", line 968, in create_connection
', '.join(str(exc) for exc in exceptions)))
OSError: Multiple exceptions: [Errno 111] Connect call failed ('::1', 6379, 0, 0), [Errno 111] Connect call failed ('127.0.0.1', 6379)
and radicale
[7f93f85ed740] ERROR: An exception occurred during server startup: Failed to load storage module 'radicale_storage_by_index': No module named 'radicale.storage.multifilesystem'; 'radicale.storage' is not a package
[7f8075206740] ERROR: An exception occurred during server startup: Failed to load storage module 'radicale_storage_by_index': No module named 'radicale.storage.multifilesystem'; 'radicale.storage' is not a package
[7f2ef090d740] ERROR: An exception occurred during server startup: Failed to load storage module 'radicale_storage_by_index': No module named 'radicale.storage.multifilesystem'; 'radicale.storage' is not a package
[7fda8764b740] ERROR: An exception occurred during server startup: Failed to load storage module 'radicale_storage_by_index': No module named 'radicale.storage.multifilesystem'; 'radicale.storage' is not a package
[7fb88ea61740] ERROR: An exception occurred during server startup: Failed to load storage module 'radicale_storage_by_index': No module named 'radicale.storage.multifilesystem'; 'radicale.storage' is not a package
@tonioo commented on GitHub (Mar 24, 2021):
Have you installed redis and is it running?
For Radicale, can you check what version you're running?
@CHazz commented on GitHub (Mar 24, 2021):
redis is not present on this system.. its not contain in modoboa installer ? or any way to use dedicated redis server, It looks bizarrely running redis cache on each station.. but i try find reason why redis is not installed now ..
i manualy install redis-server and now working everything fine :) thanks a lot !
@jfs commented on GitHub (Apr 27, 2021):
Just did a brand new install on Debian 10 using the installer (also my first time using Modoboa) and I think I have the exact same problem. I would say, since this is a brand new install, there is an opportunity to improve the installer.
Looks like if I install redis-server this will resolve my issue? Anything special I need to do config wise?
@jfs commented on GitHub (Apr 27, 2021):
Actually I just looked and redis-server is installed. Might be the ipv4 vs ipv6 thing.
@rheinon commented on GitHub (Apr 27, 2021):
To those having install issues on Debian 10, are you using at least 8GB storage during initial install? I had all kinds of problems when installed below that.
@jfs commented on GitHub (Apr 27, 2021):
I'm on a new VM with 2GB memory and 50GB of disk space. My understanding was that was fine for a small install.
@jfs commented on GitHub (Apr 27, 2021):
Forcing ipv4 worked...
In
/etc/supervisor/conf.d/policyd.conf@mcg-simple commented on GitHub (Jul 1, 2021):
It didn't work for me. I set "--host 127.0.0.1" and there's still the same error.
@SofianeLasri commented on GitHub (Aug 1, 2021):
I have the same error and I have set "--host 127.0.0.1". Redis is already installed on my server.
Here is the policyd log:
Task exception was never retrieved future: <Task finished coro=<new_connection() done, defined at /srv/modoboa/env/lib/python3.7/site-packages/modoboa/policyd/core.py:200> exception=AttributeError("module 'aioredis' has no attribute 'create_redis_pool'")> Traceback (most recent call last): File "/srv/modoboa/env/lib/python3.7/site-packages/modoboa/policyd/core.py", line 202, in new_connection await asyncio.wait_for(handle_connection(reader, writer), timeout=5) File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for return fut.result() File "/srv/modoboa/env/lib/python3.7/site-packages/modoboa/policyd/core.py", line 193, in handle_connection action = await apply_policies(attributes) File "/srv/modoboa/env/lib/python3.7/site-packages/modoboa/policyd/core.py", line 145, in apply_policies rclient = await aioredis.create_redis_pool(settings.REDIS_URL) AttributeError: module 'aioredis' has no attribute 'create_redis_pool''@SofianeLasri commented on GitHub (Aug 12, 2021):
Here is the reason of the problem: https://github.com/ray-project/ray/issues/17475
So delete all aioredis packages here :
/srv/modoboa/env/lib/python3.7/site-packagesAnd install the version 1.3.1 with this command:
pip3 install -Iv aioredis==1.3.1 --target=/srv/modoboa/env/lib/python3.7/site-packagesReboot your server and the problem will be solved.
@pcd1000 commented on GitHub (Sep 5, 2021):
I have tried the "--host 127.0.0.1" fix, but it didn't work for me. I am not sure if I am confident enough to attempt a downgrade to 1.3.1 , do you have any more detailed instructions on how to do this, more specifically, what files/directories to delete?
@JettBurns14 commented on GitHub (Sep 5, 2021):
I tried adding "--host 127.0.0.1" to the
/etc/supervisor/conf.d/policyd.conffile and rebooting without success in my case.I followed the advise of @SofianeLasri to revert the AIORedis version and that immediately fixed my issue. I am running Ubuntu Server 20.04.2, Python 3.8.10, and Modoboa 1.17.0 (latest currently) on a 2 core, 2 GB RAM, 25 GB SSD Proxmox virtual machine. Working perfectly now, hope this helps someone! 😃
Here are the commands I used and the error logs from previously:
Main error I was getting, logs from
/var/log/mail.log:Logs now that it works, from
/var/log/mail.log:@pcd1000 commented on GitHub (Sep 6, 2021):
Many thanks for your time and effort Jett, that resolved the issue for me!
@Meseira commented on GitHub (Oct 8, 2021):
I encountered the same problem and the details given by @JettBurns14 solve it. Thanks Jett !
@florealcab commented on GitHub (Oct 10, 2021):
Thank youuuuu a loooot @JettBurns14 and @SofianeLasri you save me!
This should be fixed asap on the installer!
@monfared01 commented on GitHub (Oct 14, 2021):
@JettBurns14
I dont know who u are but allah with u man
@Perlover commented on GitHub (Dec 10, 2021):
Today (2021-12-10) I used the installator (from Github) (default type not
--beta) and I had same problems till I read this and applied the fixes from @JettBurns14So @florealcab please if you are developer of installation please check up this again (is there fix or not)
Thanks to @JettBurns14 !
@Perlover commented on GitHub (Dec 10, 2021):
I created issue here too:
https://gitlab.com/amavis/amavis/-/issues/81
@jarforce commented on GitHub (May 7, 2022):
For those who still got error with V2 : Failed to connect to 127.0.0.1 port 9999: Connection refused
and reload postfix
check https://github.com/modoboa/modoboa/issues/2200#issuecomment-913231983, version 2.0.1 of aioredis working on V2, and Ubuntu 20.4LTS
check redis, and make sure deamon run on IPv4
if still failed, run:
on CLI to check what's module is missing and install it, in my case when upgrade to Modoboa 2.0 need install: