Closed TitanFighter closed 4 years ago
ERROR: Update failed.
Caused due to no clamav database.
Amavisd relies on ClamAV for virus scanning, but if clamav doesn't have full database files under /var/lib/clamav/
, clamav service can not start, which causes Amavisd failed to start.
This is how it works, so you have to either run this container again until it correctly downloaded all database files, or keep this container running and login to the container and run freshclam
manually to download files.
In this case I think it would be a good solution to add RUN freshclam
at the end of dockerized/Dockerfiles/Dockerfile
Installing package clamav-db
should fix this issue, but will increase the container size.
Updated, please help test it. :)
Your commit did not help and run freshclam
inside a container also does not work (error below):
root@mail:/var/www/mail/sources# docker exec -it wonderful_wu bash
bash-5.0# freshclam
ClamAV update process started at Mon Mar 23 15:32:54 2020
Current working dir is /var/lib/clamav/
Querying current.cvd.clamav.net
TTL: 1712
fc_dns_query_update_info: Software version from DNS: 0.102.2
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.102.1 Recommended version: 0.102.2
DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Current working dir is /var/lib/clamav/
check_for_new_database_version: No local copy of "daily" database.
query_remote_database_version: daily.cvd version from DNS: 25760
daily database available for download (remote version: 25760)
Retrieving https://database.clamav.net/daily.cvd
downloadFile: Download source: https://database.clamav.net/daily.cvd
downloadFile: Download destination: /var/lib/clamav/tmp/clamav-b95e3bae732b0d57cfedb19e7c933e99.tmp
* Trying 104.16.219.84:443...
* TCP_NODELAY set
* Connected to database.clamav.net (104.16.219.84) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=ssl392509.cloudflaressl.com
* start date: Feb 1 00:00:00 2020 GMT
* expire date: Aug 9 23:59:59 2020 GMT
* subjectAltName: host "database.clamav.net" matched cert's "*.clamav.net"
* issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA Limited; CN=COMODO ECC Domain Validation Secure Server CA 2
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55b533ad8780)
> GET /daily.cvd HTTP/2
Host: database.clamav.net
user-agent: ClamAV/0.102.1 (OS: linux-musl, ARCH: x86_64, CPU: x86_64)
accept: */*
connection: close
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 200
< date: Mon, 23 Mar 2020 15:32:54 GMT
< content-type: application/octet-stream
< content-length: 60308138
< set-cookie: __cfduid=d20f2773b9f1873e697565d5428d263d51584977574; expires=Wed, 22-Apr-20 15:32:54 GMT; path=/; domain=.clamav.net; HttpOnly; SameSite=Lax
< last-modified: Sun, 22 Mar 2020 13:14:00 GMT
< etag: "5e776498-3983aaa"
< expires: Mon, 23 Mar 2020 19:32:54 GMT
< cache-control: public, max-age=14400
< cf-cache-status: HIT
< age: 738
< accept-ranges: bytes
< expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< strict-transport-security: max-age=15552000
< x-content-type-options: nosniff
< server: cloudflare
< cf-ray: 578935329fd5d6ed-FRA
<
Time: 0.6s, ETA; 0.0s [=======================================>] 57.51MiB/57.51MiB
* Connection #0 to host database.clamav.net left intact
WARNING: Mirror https://database.clamav.net is not synchronized.
ERROR: Unexpected error when attempting to update database: daily
WARNING: fc_update_databases: fc_update_database failed: Up-to-date (1)
ERROR: Database update process failed: Up-to-date (1)
ERROR: Update failed.
Will check this issue tomorrow my time (11:47 PM here), sorry about the delay.
Another question is, why freshclam failed on your server? Any network issue?
Will check this issue tomorrow my time (11:47 PM here), sorry about the delay.
No problem. I will be here tomorrow as well.
Another question is, why freshclam failed on your server? Any network issue?
This is for sure not a network issues (I tried few time and the server is in a data center, so it has good inet connection). As I understand after a quick googling this is a clamav issue. You should be able to replicate it, because it is inside a docker.
Could you update version of clamav to 0.102.2?
fc_dns_query_update_info: Software version from DNS: 0.102.2
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.102.1 Recommended version: 0.102.2
Your commit did not help and run
freshclam
inside a container also does not work (error below):
I figured it out. Although package clamav-db
installs clamav database files, but the directory /var/lib/clamav
is mounted as a volume and it's empty. so it's useless. We have to rely on freshclam
command on first run.
Could you update version of clamav to 0.102.2?
We use official Alpine packages. If it offers 0.102.1, then you get 0.102.1. The only way to get 0.102.2 is contacting aport maintainer to update it. :)
During my testing, freshclam
works fine, it successfully downloaded database files and container runs.
2020-03-24 03:05:45,916 INFO success: cron entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 03:05:45,924 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 03:05:45,924 INFO success: mariadb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 03:05:45,926 INFO success: dovecot entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 03:05:45,926 INFO success: mlmmjadmin entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 03:05:45,927 INFO success: iredapd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 03:05:45,927 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 03:05:45,928 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 03:05:45,928 INFO success: phpfpm entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 03:05:45,928 INFO success: nginx entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 03:05:45,928 INFO success: postfix entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Fail2ban is now enabled in container, please help test if possible. Thanks. :)
ClamAV works ok now but amavisd constantly exiting (fresh server and I tested this commit -> Re-organize data directories
).
root@mail:/var/www/mail/src# ./run_all_in_one.sh
[iRedMail] [Entrypoint] /docker/entrypoints/mariadb.sh
[iRedMail] Starting temporary MariaDB instance.
2020-03-24 9:45:31 0 [Note] mysqld (mysqld 10.4.12-MariaDB-log) starting as process 11 ...
[iRedMail] Reset password for SQL user 'root'.
[iRedMail] [Run] /docker/mariadb/pre_start/0-vmail_db.sh
[iRedMail] Grant privileges to SQL user 'vmail' and 'vmailadmin'.
[iRedMail] Make sure postmaster@ryzum.com is a global admin.
[iRedMail] [Run] /docker/mariadb/pre_start/amavisd_db.sh
[iRedMail] [Run] /docker/mariadb/pre_start/iredapd_db.sh
[iRedMail] [Run] /docker/mariadb/pre_start/roundcube.sh
[iRedMail] [Entrypoint] /docker/entrypoints/dovecot.sh
[iRedMail] [Entrypoint] /docker/entrypoints/postfix.sh
[iRedMail] [Entrypoint] /docker/entrypoints/mlmmj.sh
[iRedMail] [Entrypoint] /docker/entrypoints/mlmmjadmin.sh
[iRedMail] [Entrypoint] /docker/entrypoints/iredapd.sh
[iRedMail] [Entrypoint] /docker/entrypoints/antispam.sh
[iRedMail] Run 'sa-update' (required by Amavisd).
Update finished, no fresh updates were available
[iRedMail] [Entrypoint] /docker/entrypoints/nginx.sh
ln: /etc/nginx/sites-enabled/00-default.conf: No such file or directory
ln: /etc/nginx/sites-enabled/00-default-ssl.conf: No such file or directory
ln: /etc/nginx/sites-enabled/autoconfig.conf: No such file or directory
ln: /etc/nginx/conf-enabled/0-general.conf: No such file or directory
ln: /etc/nginx/conf-enabled/cache.conf: No such file or directory
ln: /etc/nginx/conf-enabled/client_max_body_size.conf: No such file or directory
ln: /etc/nginx/conf-enabled/default_type.conf: No such file or directory
ln: /etc/nginx/conf-enabled/fastcgi.conf: No such file or directory
ln: /etc/nginx/conf-enabled/gzip.conf: No such file or directory
ln: /etc/nginx/conf-enabled/headers.conf: No such file or directory
ln: /etc/nginx/conf-enabled/iredadmin.conf: No such file or directory
ln: /etc/nginx/conf-enabled/log.conf: No such file or directory
ln: /etc/nginx/conf-enabled/mime_types.conf: No such file or directory
ln: /etc/nginx/conf-enabled/open_file_cache.conf: No such file or directory
ln: /etc/nginx/conf-enabled/php_fpm.conf: No such file or directory
ln: /etc/nginx/conf-enabled/reset_timedout_connection.conf: No such file or directory
ln: /etc/nginx/conf-enabled/sendfile.conf: No such file or directory
ln: /etc/nginx/conf-enabled/server_tokens.conf: No such file or directory
ln: /etc/nginx/conf-enabled/types_hash_max_size.conf: No such file or directory
[iRedMail] [Entrypoint] /docker/entrypoints/phpfpm.sh
[iRedMail] [Entrypoint] /docker/entrypoints/roundcube.sh
[iRedMail] CMD: /usr/bin/supervisord -c /etc/supervisord.conf
2020-03-24 09:45:35,287 INFO Included extra file "/etc/supervisor.d/amavisd.conf" during parsing
2020-03-24 09:45:35,288 INFO Included extra file "/etc/supervisor.d/clamav.conf" during parsing
2020-03-24 09:45:35,288 INFO Included extra file "/etc/supervisor.d/cron.conf" during parsing
2020-03-24 09:45:35,288 INFO Included extra file "/etc/supervisor.d/dovecot.conf" during parsing
2020-03-24 09:45:35,289 INFO Included extra file "/etc/supervisor.d/iredapd.conf" during parsing
2020-03-24 09:45:35,289 INFO Included extra file "/etc/supervisor.d/mariadb.conf" during parsing
2020-03-24 09:45:35,289 INFO Included extra file "/etc/supervisor.d/mlmmjadmin.conf" during parsing
2020-03-24 09:45:35,289 INFO Included extra file "/etc/supervisor.d/nginx.conf" during parsing
2020-03-24 09:45:35,289 INFO Included extra file "/etc/supervisor.d/phpfpm.conf" during parsing
2020-03-24 09:45:35,290 INFO Included extra file "/etc/supervisor.d/postfix.conf" during parsing
2020-03-24 09:45:35,290 INFO Included extra file "/etc/supervisor.d/rsyslog.conf" during parsing
2020-03-24 09:45:35,290 INFO Set uid to user 0 succeeded
2020-03-24 09:45:35,297 INFO RPC interface 'supervisor' initialized
2020-03-24 09:45:35,297 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-03-24 09:45:35,298 INFO supervisord started with pid 1
2020-03-24 09:45:36,303 INFO spawned: 'cron' with pid 304
2020-03-24 09:45:36,309 INFO spawned: 'rsyslog' with pid 305
2020-03-24 09:45:36,325 INFO spawned: 'mariadb' with pid 306
2020-03-24 09:45:36,332 INFO spawned: 'dovecot' with pid 307
2020-03-24 09:45:36,344 INFO spawned: 'mlmmjadmin' with pid 308
2020-03-24 09:45:36,348 INFO spawned: 'iredapd' with pid 309
2020-03-24 09:45:36,364 INFO spawned: 'clamav' with pid 313
2020-03-24 09:45:36,376 INFO spawned: 'amavisd' with pid 314
2020-03-24 09:45:36,396 INFO spawned: 'phpfpm' with pid 316
2020-03-24 09:45:36,417 INFO spawned: 'nginx' with pid 317
2020-03-24 09:45:36,459 INFO spawned: 'postfix' with pid 318
2020-03-24 09:45:36,483 INFO success: cron entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:36,494 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:36,498 INFO success: mariadb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:36,499 INFO success: dovecot entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:36,500 INFO success: mlmmjadmin entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:36,500 INFO success: iredapd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:36,502 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:36,510 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:36,514 INFO success: phpfpm entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:36,514 INFO success: nginx entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:36,515 INFO success: postfix entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:39,636 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:45:40,654 INFO spawned: 'amavisd' with pid 458
2020-03-24 09:45:41,490 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:42,510 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:45:43,516 INFO spawned: 'amavisd' with pid 459
2020-03-24 09:45:44,525 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:45,572 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:45:46,578 INFO spawned: 'amavisd' with pid 460
2020-03-24 09:45:47,394 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:48,410 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:45:49,415 INFO spawned: 'amavisd' with pid 461
2020-03-24 09:45:50,241 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:51,260 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:45:52,273 INFO spawned: 'amavisd' with pid 462
2020-03-24 09:45:53,093 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:54,112 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:45:55,117 INFO spawned: 'amavisd' with pid 463
2020-03-24 09:45:55,959 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:56,970 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:45:57,975 INFO spawned: 'amavisd' with pid 464
2020-03-24 09:45:58,740 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:45:59,756 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:46:00,760 INFO spawned: 'amavisd' with pid 465
2020-03-24 09:46:01,573 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:46:02,588 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:46:03,593 INFO spawned: 'amavisd' with pid 466
2020-03-24 09:46:04,530 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:46:05,545 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:46:06,551 INFO spawned: 'amavisd' with pid 467
2020-03-24 09:46:07,401 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:46:08,420 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:46:09,424 INFO spawned: 'amavisd' with pid 468
2020-03-24 09:46:10,195 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:46:11,216 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:46:12,221 INFO spawned: 'amavisd' with pid 469
2020-03-24 09:46:12,984 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:46:13,776 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:46:13,779 INFO spawned: 'amavisd' with pid 470
2020-03-24 09:46:13,782 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
.....
the same again and again
If you wish you can give me your ssh and I can give you access to the server.
Also, as I understand,
[iRedMail] [Entrypoint] /docker/entrypoints/nginx.sh
ln: /etc/nginx/sites-enabled/00-default.conf: No such file or directory
is not good?
Fail2ban is now enabled in container, please help test if possible. Thanks. :)
I will, but amavisd needs to be fixed :)
Could you rebuild the container with latest git version? It should be fixed.
Doing it. You forgot to add FAIL2BAN_DB_PASSWORD to README and to default_settings :)
Could you rebuild the container with latest git version? It should be fixed.
Tested. Still the same problem.
Hmm, doesn’t make much sense to me.
Will test later, I need some rest. :)
hi @TitanFighter,
After git clone
this repo, you should have files config/etc/nginx/sites-available/*.conf
and config/etc/nginx/conf-available/*.conf
, and all files under config/
directory will be copied to the container for building.
What confused me is, your error message indicates you don't have config/etc/nginx/sites-available/*.conf
at all:
[iRedMail] [Entrypoint] /docker/entrypoints/nginx.sh
ln: /etc/nginx/sites-enabled/00-default.conf: No such file or directory
ln: /etc/nginx/sites-enabled/00-default-ssl.conf: No such file or directory
ln: /etc/nginx/sites-enabled/autoconfig.conf: No such file or directory
ln: /etc/nginx/conf-enabled/0-general.conf: No such file or directory
...
Could you double check these files after git clone?
Fresh OS installation + latest commit -> No more No such file or directory
, so for now just
2020-03-24 09:46:12,984 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:46:13,776 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:46:13,779 INFO spawned: 'amavisd' with pid 470
2020-03-24 09:46:13,782 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
left unsolved.
I guess caused by missing clamav database files? 😂 How about this as a temporary fix so that you can continue the testing:
apk add clamav-db
/var/lib/clamav
. And this directory should be a volume of Docker host machine, directory /opt/iredmail/clamav
.I think it's still a network issue, either your network, or clamav mirror site (but works for me here).
But DB of clamav is updated without errors:
* Connection #0 to host database.clamav.net left intact
updatedb: Running g_cb_download_complete callback...
download_complete_callback: Download complete for database : /var/lib/clamav/tmp/clamav-cffd4232e1b0de5b9767fa45b79c7530.tmp-bytecode.cvd
download_complete_callback: fc_context->bTestDatabases : 1
download_complete_callback: fc_context->bBytecodeEnabled : 1
Testing database: '/var/lib/clamav/tmp/clamav-cffd4232e1b0de5b9767fa45b79c7530.tmp-bytecode.cvd' ...
Loading signatures from /var/lib/clamav/tmp/clamav-cffd4232e1b0de5b9767fa45b79c7530.tmp-bytecode.cvd
Properly loaded 95 signatures from /var/lib/clamav/tmp/clamav-cffd4232e1b0de5b9767fa45b79c7530.tmp-bytecode.cvd
Database test passed.
bytecode.cvd updated (version: 331, sigs: 94, f-level: 63, builder: anvilleg)
fc_update_database: bytecode.cvd updated.
Would you still like me to test with apk add clamav-db
?
clamav-db
./var/log/maillog
to figure out why amavisd can not start.bash-5.0# cat /var/log/mail.log
2020-03-24T15:07:48.224747+00:00 mail postfix/postfix-script[464]: warning: not owned by root: /var/spool/postfix/etc
2020-03-24T15:07:48.237068+00:00 mail postfix/postfix-script[465]: warning: not owned by root: /var/spool/postfix/etc/resolv.conf
2020-03-24T15:07:48.243268+00:00 mail postfix/postfix-script[466]: warning: not owned by root: /var/spool/postfix/etc/hosts
2020-03-24T15:07:48.282218+00:00 mail postfix/postfix-script[472]: starting the Postfix mail system
2020-03-24T15:07:48.302897+00:00 mail postfix/master[473]: daemon started -- version 3.4.9, configuration /etc/postfix
hmm, i don't understand this issue now.
Any related info in other log files under /var/log/
? Although Amavisd is configured to log to same file as Postfix, but let's check whether there's some other info in /var/log/messages
and /var/log/supervisor/
.
/var/log/messages
:
2020-03-24T15:12:04.554651+00:00 mail /supervisord: amavisd Error in config file "/etc/amavisd.conf": Can't open PEM file /opt/iredmail/custom/amavisd/dkim/a.io.pem: No such file or directory at /usr/sbin/amavisd line 639.
Probably this is the issue.
/var/log/supervisor/supervisord.log
shows the same as before:
2020-03-24 09:46:12,984 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:46:13,776 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:46:13,779 INFO spawned: 'amavisd' with pid 470
2020-03-24 09:46:13,782 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Got it, it's a bug caused by hard-coded first mail domain name. Give me one min to fix it. Stay tuned.
Updated. Please give it one more try. :)
Again I see the same
2020-03-24 09:46:12,984 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2020-03-24 09:46:13,776 INFO exited: amavisd (exit status 2; not expected)
2020-03-24 09:46:13,779 INFO spawned: 'amavisd' with pid 470
2020-03-24 09:46:13,782 INFO success: amavisd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
but there is a new issue in /var/log/messages
:
bash-5.0# cat /var/log/messages
2020-03-24T16:00:14.359006+00:00 mail : imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
2020-03-24T16:00:14.359017+00:00 mail : activation of module imklog failed [v8.1911.0 try https://www.rsyslog.com/e/2145 ]
2020-03-24T16:00:14.359026+00:00 mail : [origin software="rsyslogd" swVersion="8.1911.0" x-pid="323" x-info="https://www.rsyslog.com"] start
2020-03-24T16:00:14.578309+00:00 mail /supervisord: rsyslog rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
2020-03-24T16:00:14.578424+00:00 mail /supervisord: rsyslog rsyslogd: activation of module imklog failed [v8.1911.0 try https://www.rsyslog.com/e/2145 ]
2020-03-24T16:00:14.578724+00:00 mail /supervisord: mariadb 2020-03-24 16:00:14 0 [Note] /usr/bin/mysqld (mysqld 10.4.12-MariaDB-log) starting as process 325 ...
2020-03-24T16:00:14.579688+00:00 mail /supervisord: clamav WARNING: Ignoring deprecated option ScanOnAccess at /etc/clamav/clamd.conf:73
2020-03-24T16:00:16.141435+00:00 mail /supervisord: fail2ban 2020-03-24 16:00:16,140 fail2ban [339]: ERROR Failed during configuration: Have not found any log file for postfix-pregreet jail
2020-03-24T16:00:16.382011+00:00 mail /supervisord: mlmmjadmin http://0.0.0.0:7790/
2020-03-24T16:00:18.045114+00:00 mail /supervisord: amavisd The value of variable $myhostname is "mail", but should have been
2020-03-24T16:00:18.045127+00:00 mail /supervisord: amavisd a fully qualified domain name; perhaps uname(3) did not provide such.
2020-03-24T16:00:18.045134+00:00 mail /supervisord: amavisd You must explicitly assign a FQDN of this host to variable $myhostname
2020-03-24T16:00:18.045143+00:00 mail /supervisord: amavisd in amavisd.conf, or fix what uname(3) provides as a host's network name!
2020-03-24T16:00:18.266079+00:00 mail /supervisord: fail2ban Server ready
2020-03-24T16:00:21.095559+00:00 mail /supervisord: amavisd The value of variable $myhostname is "mail", but should have been
2020-03-24T16:00:21.095574+00:00 mail /supervisord: amavisd a fully qualified domain name; perhaps uname(3) did not provide such.
2020-03-24T16:00:21.095581+00:00 mail /supervisord: amavisd You must explicitly assign a FQDN of this host to variable $myhostname
2020-03-24T16:00:21.095594+00:00 mail /supervisord: amavisd in amavisd.conf, or fix what uname(3) provides as a host's network name!
2020-03-24T16:00:24.996860+00:00 mail /supervisord: amavisd The value of variable $myhostname is "mail", but should have been
2020-03-24T16:00:24.996891+00:00 mail /supervisord: amavisd a fully qualified domain name; perhaps uname(3) did not provide such.
2020-03-24T16:00:24.996904+00:00 mail /supervisord: amavisd You must explicitly assign a FQDN of this host to variable $myhostname
2020-03-24T16:00:24.996917+00:00 mail /supervisord: amavisd in amavisd.conf, or fix what uname(3) provides as a host's network name!
Also as I understand it is midnight for you. We can continue tomorrow.
The value of variable $myhostname is "mail", but should have been
Your have incorrect hostname defined in iredmail.conf
:
HOSTNAME=mail
It must be a FQDN hostname like mail.xxx.yyy
.
Yeah. Already fixed. I forgot that it's taken from iredmail.conf
:)
There is a new error:
bash-5.0# cat /var/log/messages
2020-03-24T16:23:05.224112+00:00 mail : imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
2020-03-24T16:23:05.224120+00:00 mail : activation of module imklog failed [v8.1911.0 try https://www.rsyslog.com/e/2145 ]
2020-03-24T16:23:05.224127+00:00 mail : [origin software="rsyslogd" swVersion="8.1911.0" x-pid="323" x-info="https://www.rsyslog.com"] start
2020-03-24T16:23:05.401525+00:00 mail /supervisord: rsyslog rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
2020-03-24T16:23:05.402310+00:00 mail /supervisord: rsyslog rsyslogd: activation of module imklog failed [v8.1911.0 try https://www.rsyslog.com/e/2145 ]
2020-03-24T16:23:05.402554+00:00 mail /supervisord: mariadb 2020-03-24 16:23:05 0 [Note] /usr/bin/mysqld (mysqld 10.4.12-MariaDB-log) starting as process 325 ...
2020-03-24T16:23:05.402790+00:00 mail /supervisord: clamav WARNING: Ignoring deprecated option ScanOnAccess at /etc/clamav/clamd.conf:73
2020-03-24T16:23:07.195661+00:00 mail /supervisord: fail2ban 2020-03-24 16:23:07,194 fail2ban [339]: ERROR Failed during configuration: Have not found any log file for postfix-pregreet jail
2020-03-24T16:23:07.413399+00:00 mail /supervisord: mlmmjadmin http://0.0.0.0:7790/
2020-03-24T16:23:09.682849+00:00 mail /supervisord: fail2ban Server ready
2020-03-24T16:23:10.060856+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:23:14.561173+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:23:18.953997+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:23:23.421239+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:23:27.967752+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:23:32.519643+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:23:37.055292+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:23:41.526306+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:23:46.202975+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:23:50.569463+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:23:54.845155+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: Global time limit set to 120000 milliseconds.
2020-03-24T16:23:54.845625+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: Global size limit set to 31457280 bytes.
2020-03-24T16:23:54.845963+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: File size limit set to 31457280 bytes.
2020-03-24T16:23:54.846280+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: Recursion level limit set to 10.
2020-03-24T16:23:54.846605+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: Files limit set to 50.
2020-03-24T16:23:54.847010+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: MaxEmbeddedPE limit set to 10485760 bytes.
2020-03-24T16:23:54.847357+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: MaxHTMLNormalize limit set to 10485760 bytes.
2020-03-24T16:23:54.847704+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: MaxHTMLNoTags limit set to 2097152 bytes.
2020-03-24T16:23:54.848069+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: MaxScriptNormalize limit set to 5242880 bytes.
2020-03-24T16:23:54.848424+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: MaxZipTypeRcg limit set to 1048576 bytes.
2020-03-24T16:23:54.848793+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: MaxPartitions limit set to 50.
2020-03-24T16:23:54.849393+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: MaxIconsPE limit set to 100.
2020-03-24T16:23:54.849703+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: MaxRecHWP3 limit set to 16.
2020-03-24T16:23:54.849794+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: PCREMatchLimit limit set to 100000.
2020-03-24T16:23:54.849871+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: PCRERecMatchLimit limit set to 2000.
2020-03-24T16:23:54.849945+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Limits: PCREMaxFileSize limit set to 26214400.
2020-03-24T16:23:54.850036+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Archive support enabled.
2020-03-24T16:23:54.850063+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> AlertExceedsMax heuristic detection disabled.
2020-03-24T16:23:54.850446+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Heuristic alerts enabled.
2020-03-24T16:23:54.852558+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Portable Executable support enabled.
2020-03-24T16:23:54.852629+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> ELF support enabled.
2020-03-24T16:23:54.852658+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Mail files support enabled.
2020-03-24T16:23:54.852689+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> OLE2 support enabled.
2020-03-24T16:23:54.852724+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> PDF support enabled.
2020-03-24T16:23:54.852759+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> SWF support enabled.
2020-03-24T16:23:54.852796+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> HTML support enabled.
2020-03-24T16:23:54.852839+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> XMLDOCS support enabled.
2020-03-24T16:23:54.852877+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> HWP3 support enabled.
2020-03-24T16:23:54.852913+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Self checking every 3600 seconds.
2020-03-24T16:23:54.852952+00:00 mail /supervisord: clamav Tue Mar 24 16:23:54 2020 -> Set stacksize to 1048576
2020-03-24T16:23:54.886345+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:23:58.003509+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:24:01.106859+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:24:04.396222+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:24:07.569909+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:24:10.750676+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
2020-03-24T16:24:13.878172+00:00 mail /supervisord: amavisd Suicide () TROUBLE in pre_loop_hook: config: no rules were found! Do you need to run 'sa-update'?
Need to run command “sa-update” manually.
I hacked the script to not run it each time container runs, but seems not perfect. Will fix it tomorrow.
hi @TitanFighter
Updated git repo, it now runs 'sa-update' each time you launch the container. Amavisd should work fine now. :)
Ubuntu 18.04 LTS x64. Docker version 19.03.6, build 369ce74a3c
I double checked using fresh OS installation - no changes.