chimeranzl
- Sep 18, 2024
- Joined Jun 14, 2024
- 4 discussions
- 17 posts
- 1 best answer
- Post posted... wait what?
Sorted, root cause = me ;-)
Just a matter of getting nginx config working properly- Edited
You know the irony… is I found that article when troubleshooting earlier today and actually must have stuffed up by pasting the wrong password in when I reset them… so thought id ruled that side out and ended up down a rabbit hole…
It was only after posting additional logs I google searched the “waiting for database to come up” and stumbled back on the same article. it was only when testing with these that I realised I’d fucked up
root@mail:/var/mailcow-dockerized# source mailcow.conf root@mail:/var/mailcow-dockerized# docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} ERROR 1045 (28000): Access denied for user 'mailcow'@'localhost' (using password: YES)Cheers from NZ - enjoy your time when you’re down here!!! :-) PM me if you want any tips for places to go!
- Best Answerset by esackbauer
Thanks, found the same article about 30 mins ago.
Resetting SQL passwords sorted it, thanks!!- Edited
Ubuntu 22.04.3 LTS
root@mail:/var/mailcow-dockerized# docker -v Docker version 25.0.3, build 4debf41Pre-upgrade, test from acme… (although its not upgrade specific, its any process that remove and recreates containers that causes issues)
741e306f2c19:/# ping mailcowdockerized-mysql-mailcow-1 PING mailcowdockerized-mysql-mailcow-1 (172.22.1.10): 56 data bytes 64 bytes from 172.22.1.10: seq=0 ttl=64 time=0.365 ms 64 bytes from 172.22.1.10: seq=1 ttl=64 time=0.127 ms 64 bytes from 172.22.1.10: seq=2 ttl=64 time=0.145 ms 64 bytes from 172.22.1.10: seq=3 ttl=64 time=0.127 ms nc64 bytes from 172.22.1.10: seq=4 ttl=64 time=0.132 ms ^C --- mailcowdockerized-mysql-mailcow-1 ping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max = 0.127/0.179/0.365 ms 741e306f2c19:/# 741e306f2c19:/# 741e306f2c19:/# nc mailcowdockerized-mysql-mailcow-1 3306 a 5.5.5-10.5.25-MariaDB-ubu2004 .^n1DB`>Sh0U>rGK"dTWmysql_native_password ^Cpunt!Post upgrade (only change is different IP address)
f67a352b8136:/# ping mailcowdockerized-mysql-mailcow-1 PING mailcowdockerized-mysql-mailcow-1 (172.22.1.6): 56 data bytes 64 bytes from 172.22.1.6: seq=0 ttl=64 time=0.323 ms 64 bytes from 172.22.1.6: seq=1 ttl=64 time=0.162 ms 64 bytes from 172.22.1.6: seq=2 ttl=64 time=0.124 ms 64 bytes from 172.22.1.6: seq=3 ttl=64 time=0.129 ms ^C --- mailcowdockerized-mysql-mailcow-1 ping statistics --- 4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max = 0.124/0.184/0.323 ms f67a352b8136:/# f67a352b8136:/# f67a352b8136:/# nc mailcowdockerized-mysql-mailcow-1 3306 a 5.5.5-10.5.26-MariaDB-ubu2004(t5HL#fZrQy1$a>PXJKwmysql_native_password ^Cpunt! f67a352b8136:/# ^Cacme logs
Wed Sep 18 21:16:31 NZST 2024 - Waiting for Docker API... Wed Sep 18 21:16:31 NZST 2024 - Docker API OK Wed Sep 18 21:16:31 NZST 2024 - Waiting for Postfix... Wed Sep 18 21:16:32 NZST 2024 - Postfix OK Wed Sep 18 21:16:32 NZST 2024 - Waiting for Dovecot... Wed Sep 18 21:16:32 NZST 2024 - Dovecot OK Wed Sep 18 21:16:32 NZST 2024 - Waiting for database...(stops here and doesnt proceed)
postfix logs
Waiting for database to come up... Waiting for database to come up... Waiting for database to come up... Waiting for database to come up... Waiting for database to come up... Waiting for database to come up...- Edited
Heaps of CPU and RAM, resources are no issue.
As I say, it runs fine usually. Things work as per normal. As soon as I docker-compose down / up, or run the update.sh script (anything that stops, removes, recreates containers) they all get created and start up again but get “waiting on database” error.
If it’s a network issue, what steps do I need to run through to check why its waiting on the database? And why is it running fine now but as soon as containers are recreated it fails? (unless its coz containers are getting a new IP address, different to the current, then cant connect? where are the settings that tell each container where the database is or what it resolves too? Its been a while I cant recall what I may have changed originally to get this working!)
- Edited
Hmmm…. just realised I have 2 x NGINX proxies. One I created myself (for a web site I host) and the manual triggered me to realise there is a NGINX proxy in the mailcow dockerised stack also (or rather, it is the proxy for the GUI, I thought it was the GUI) each on their own networks.
The proxy I deployed myself, I was trying to configure for mailcow…
Will have to rethink this setup
Either way I cant troubleshoot this issue right now til I resolve the waiting for database issue which I’m totally stumped on https://community.mailcow.email/d/4049-waiting-for-database
That makes zero sense to me
Anytime I do anything vaguely different (or even restart mailcow) I get this sort of log entries (used to be waiting for sql prior to upgrading to 2024-08a patch)
Wed Sep 18 12:15:39 NZST 2024 - Waiting for Docker API... Wed Sep 18 12:15:39 NZST 2024 - Docker API OK Wed Sep 18 12:15:39 NZST 2024 - Waiting for Postfix... Wed Sep 18 12:15:39 NZST 2024 - Postfix OK Wed Sep 18 12:15:39 NZST 2024 - Waiting for Dovecot... Wed Sep 18 12:15:39 NZST 2024 - Dovecot OK Wed Sep 18 12:15:39 NZST 2024 - Waiting for database...I have to revert my proxmox snapshot in order to connect to the GUI again
How do I resolve this? How do mailcow conntainers connect to SQL? I can ssh into containers (eg: acme) and ping the container ID of mariadb:10.5 and it resolves to the correct IP fine. I can also ping the container name “mailcowdockerized-mysql-mailcow-1” fine also.
The mariadb logs are as follows, this appears to be ok?
2024-09-18 12:09:13+12:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.5.26+maria~ubu2004 started. 2024-09-18 12:09:13+12:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2024-09-18 12:09:13+12:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.5.26+maria~ubu2004 started. 2024-09-18 12:09:14+12:00 [Note] [Entrypoint]: MariaDB upgrade not required 2024-09-18 12:09:14 0 [Note] Starting MariaDB 10.5.26-MariaDB-ubu2004 source revision 7a5b8bf0f5470a13094101f0a4bdfa9e1b9ded02 server_uid htq1MTURYLUrMuU4LgOH1bA5G2A= as process 1 2024-09-18 12:09:14 0 [Note] InnoDB: Uses event mutexes 2024-09-18 12:09:14 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2024-09-18 12:09:14 0 [Note] InnoDB: Number of pools: 1 2024-09-18 12:09:14 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions 2024-09-18 12:09:14 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts) 2024-09-18 12:09:14 0 [Note] InnoDB: Using Linux native AIO 2024-09-18 12:09:14 0 [Note] InnoDB: Initializing buffer pool, total size = 25165824, chunk size = 25165824 2024-09-18 12:09:14 0 [Note] InnoDB: Completed initialization of buffer pool 2024-09-18 12:09:14 0 [Note] InnoDB: 128 rollback segments are active. 2024-09-18 12:09:14 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2024-09-18 12:09:14 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2024-09-18 12:09:14 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2024-09-18 12:09:14 0 [Note] InnoDB: 10.5.26 started; log sequence number 122582461; transaction id 694813 2024-09-18 12:09:14 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool 2024-09-18 12:09:14 0 [Note] Server socket created on IP: '::'. 2024-09-18 12:09:14 0 [Note] mysqld: ready for connections. Version: '10.5.26-MariaDB-ubu2004' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution 2024-09-18 12:09:14 1 [Note] Event Scheduler: scheduler thread started with id 1 2024-09-18 12:09:14 0 [Note] InnoDB: Buffer pool(s) load completed at 240918 12:09:14Help?!
- Edited
What mailcow docker container / port does Let’s encrypt connect too on HTTP for SSL renewals?
I have NGINX proxy on HTTP, wanting to direct to the correct container so ssl can get renewed
Also does it use the autodiscover… record or mail…. record to renew?In logs I get
Confirmed A record with IP x.x.x.x, but HTTP validation failed
Originally I had NGINX for http pointing to another container, but dont need that anymore. So need to point http to the correct container… which one is it supposed to be?
In logs I get
Confirmed A record with IP x.x.x.x, but HTTP validation failed
Originally I had NGINX for http pointing to another container, but dont need that anymore. So need to point http to the correct container… which one is it supposed to be?
Thanks. That dropped RAM usage by 10% Should be enough for what I need.
Thanks for the reply, yeah I just found another post indicating likelihood being a RAM issue, only running 4GB, time for an upgrade I think….
Just caught it again, this time:
{“log”:“Aug 11 22:45:40 03b652ecd236 postfix/tlsmgr[353]: warning: end-of-input while reading request from tlsmgr socket: Application error\n”,“stream”:“stdout”,“time”:“2024-08-11T10:45:40.174395291Z”}
{“log”:“Aug 11 22:45:40 03b652ecd236 postfix/tlsmgr[353]: warning: end-of-input while reading request from tlsmgr socket: Application error\n”,“stream”:“stdout”,“time”:“2024-08-11T10:45:40.174469419Z”}
{“log”:“Aug 11 22:45:40 03b652ecd236 postfix/tlsmgr[353]: warning: end-of-input while reading request from tlsmgr socket: Application error\n”,“stream”:“stdout”,“time”:“2024-08-11T10:45:40.17449916Z”}
{“log”:“Aug 11 22:45:40 03b652ecd236 postfix/tlsmgr[353]: warning: end-of-input while reading request from tlsmgr socket: Application error\n”,“stream”:“stdout”,“time”:“2024-08-11T10:45:40.174593547Z”}
{“log”:“Aug 11 22:45:40 03b652ecd236 postfix/tlsmgr[353]: warning: end-of-input while reading request from tlsmgr socket: Application error\n”,“stream”:“stdout”,“time”:“2024-08-11T10:45:40.174738786Z”}
{“log”:“Aug 11 22:45:40 03b652ecd236 postfix/tlsmgr[353]: warning: end-of-input while reading request from tlsmgr socket: Application error\n”,“stream”:“stdout”,“time”:“2024-08-11T10:45:40.174829562Z”}
{“log”:“Aug 11 22:45:40 03b652ecd236 postfix/tlsmgr[353]: warning: end-of-input while reading request from tlsmgr socket: Application error\n”,“stream”:“stdout”,“time”:“2024-08-11T10:45:40.174857784Z”}
{“log”:“Aug 11 22:45:40 03b652ecd236 postfix/tlsmgr[353]: warning: end-of-input while reading request from tlsmgr socket: Application error\n”,“stream”:“stdout”,“time”:“2024-08-11T10:45:40.174880913Z”}
{“log”:“Aug 11 22:45:40 03b652ecd236 postfix/tlsmgr[353]: warning: end-of-input while reading request from tlsmgr socket: Application error\n”,“stream”:“stdout”,“time”:“2024-08-11T10:45:40.174903617Z”}
{“log”:“Aug 11 22:45:40 03b652ecd236 postfix/tlsmgr[353]: warning: end-of-input while reading request from tlsmgr socket: Application error\n”,“stream”:“stdout”,“time”:“2024-08-11T10:45:40.174926542Z”}- Edited
Mailcow v2024-07
Running mailcow dockerized, on Rpi4 with 128GB SSD, disk usually sits about 15% in use, 3 times now the log file in the postfix container (/var/lib/docker/containers/03b6…8f9-json.log) consumes all disk space. Tailing the log it shows this repeated over and over. Any ideas?
{“log”:“2024-08-11 15:16:40,307 INFO success: processes entered RUNNING state, process has stayed up for \u003e than 1 seconds (startsecs)\n”,“stream”:“stdout”,“time”:“2024-08-11T03:16:40.308066309Z”}
{“log”:“2024-08-11 15:16:40,308 INFO success: postfix entered RUNNING state, process has stayed up for \u003e than 1 seconds (startsecs)\n”,“stream”:“stdout”,“time”:“2024-08-11T03:16:40.308157178Z”}
{“log”:“2024-08-11 15:16:40,308 INFO success: syslog-ng entered RUNNING state, process has stayed up for \u003e than 1 seconds (startsecs)\n”,“stream”:“stdout”,“time”:“2024-08-11T03:16:40.308333621Z”}
{“log”:“\u001b[32mThe AS of your IP is NOT listed as a banned AS from Spamhaus!\u001b[0m\n”,“stream”:“stdout”,“time”:“2024-08-11T03:16:41.062467697Z”}
{“log”:“\u001b[33mUsing the open Spamhaus blocklists.\u001b[0m\n”,“stream”:“stdout”,“time”:“2024-08-11T03:16:41.062570585Z”}
{“log”:“chown: cannot access ‘/usr/share/man/man1/mailq.1.gz’: No such file or directory\n”,“stream”:“stderr”,“time”:“2024-08-11T03:16:41.820820543Z”}
{“log”:“Aug 11 15:16:44 03b652ecd236 postfix/postfix-script[342]: starting the Postfix mail system\n”,“stream”:“stdout”,“time”:“2024-08-11T03:16:44.045942502Z”}
{“log”:“Aug 11 15:16:44 03b652ecd236 postfix/master[344]: daemon started – version 3.7.10, configuration /opt/postfix/conf\n”,“stream”:“stdout”,“time”:“2024-08-11T03:16:44.066376407Z”}
{“log”:“Aug 11 15:17:39 03b652ecd236 syslog-ng[9]: REDIS: failed to connect; driver=‘d_redis_ui_log#0’\n”,“stream”:“stdout”,“time”:“2024-08-11T03:17:39.332629719Z”}
{“log”:“Aug 11 15:17:39 03b652ecd236 syslog-ng[9]: REDIS: failed to connect; driver=‘d_redis_f2b_channel#0’\n”,“stream”:“stdout”,“time”:“2024-08-11T03:17:39.3347554Z”}- Edited
Workaround I’ve done is create a mailbox with members@domain.com, create a cryptic alias, like sdaf902349r123@domain.com and add mailing list members email addresses too it, create a BCC recipient map under ‘Address rewriting’ so members@domain.com goes to the cryptic alias email address, then create a global pre-filter so that…
if address :is "to" "members@domain.com" { if not address :is "from" "admin@domain.com" { reject "You do not have permissions to email this mailing list"; discard; stop; } }This works, only issue is rspamd daemon adds a received header to the email that has the cryptic email address in it. Only visible to those that know how, but still be nice to omit it. Anyway to remove this?!
Feel like Im chasing my tail here
Seems that this works if the email address in the To field is a mailbox, but doesnt work if its an alias
Any other way around this?
- Edited
I have mailcow installed in a docker container and all is working well
I’ve setup an alias as a ‘mailing list’ which also works fine.
I’m now trying to configure a Sieve global prefilter (or post filter) to deny emails to the mailing list address unless its sent from a specific local admin mailbox only. If I send emails externally (from private email address) to the mailing list to test it, they still get sent to all alias addresses - the sieve filter isnt kicking in. I cant tell if its a sieve syntax issue or whether sieve is simply not running (how do I tell?) The script is simply:
# Check if the email is to members if address :is "to" "members@domain.com" { if address :is "from" "admin@domain.com" { keep; } else { discard; stop; } }What am I doing wrong? Internet emails aredelivered direct to mailcow via SMTP (no sync jobs or fetch mail)
