iredmail / dockerized

Official dockerized iRedMail.
https://www.iredmail.org/
281 stars 71 forks source link

Container restart breaks email sending #101

Open tpimh opened 2 years ago

tpimh commented 2 years ago

I have been testing this image for a while, and it seems to work just fine. However, if the container is stopped, then started again, it causes the outgoing mail to fail with error 451 4.3.0 Temporary lookup failure. I'm not really sure what exactly is causing this, so could anyone please try to reproduce it like this:

  1. Create new iRedMail container
  2. Send test email (should be fine)
  3. Restart the container
  4. Send test email (should fail with error 451)

If the container is removed, then a new container is created with the same persistent volumes, sending emails is possible again until next restart.

tensor5g commented 2 years ago

I have noticed this too. You always have to delete/start the container. Restart never works.

rothadamcz commented 2 years ago

It looks like it's because of random password generation after each start of the container. I found that vmail db password is not updated in some (maybe all) postfix configuration.

rothadamcz commented 2 years ago

I defined all passwords in ENV vars and it works as long as you start amavis manually (#113).

iredmail commented 2 years ago

Could you please give me a detailed step-by-step instruction (with each shell commands you ran) to reproduce this issue? @tpimh @tensor5g

I don't know how to reproduce it, hence cannot "fix" it at all.

Kerushii commented 2 years ago

It appears the same problem is happening to me too. Basically just use this guide https://hub.docker.com/r/iredmail/mariadb and restart the container using docker restart containerId and in the built in roundcube you should observe "failed to add recipient: temp look up failure" when sending the email

fflrichard commented 2 years ago

Hi, I have the same problem. could you please help

iredmail commented 2 years ago

Does using fixed SQL passwords fix the issue?

fflrichard commented 2 years ago

Does using fixed SQL passwords fix the issue?

i set the VMAIL_DB_PASSWORD and it's ok now

homuraLan commented 1 year ago

Could you please give me a detailed step-by-step instruction (with each shell commands you ran) to reproduce this issue? @tpimh @tensor5g

I don't know how to reproduce it, hence cannot "fix" it at all.

I know this error, it should be caused by Postfix being unable to connect to the database. I filtered the logs once, but now I forget how to proceed https://serverfault.com/questions/506347/postfix-temporary-lookup-failure

tobiasfaust commented 9 months ago

seems like #23 and #123 I have the exactly same problem. I want this fency feature to use new passwords after a container reboot. New passwords can be found here: /root/.my-cnf- But all vmail passwords in /etc/postfix/mysql/ are NOT updated. Amavis password in file /etc/amavis/conf.d/50-user also not

So i have to do that manually :( I think thats an mistake in iredmail docker code??

tobiasfaust commented 5 months ago

Hi @iredmail any news on it? today we had a power shutdown and after reappear the power and restarting the container all passwords are randomly changed. New passwords are in in sync at:

But all passwords in /etc/postfix/mysql/* are NOT updated. Amavis password in file /etc/amavis/conf.d/50-user also not