mailserver2 / mailserver

Simple and full-featured mail server using Docker
https://store.docker.com/community/images/mailserver2/mailserver
MIT License
141 stars 30 forks source link

Where are the logs? #15

Closed tflori closed 3 years ago

tflori commented 4 years ago

Classification

Please delete options that are not relevant.

Docker information

Containers: 52
 Running: 30
 Paused: 0
 Stopped: 22
Images: 549
Server Version: 17.05.0-ce
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 3725
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-176-generic
Operating System: Ubuntu 16.04.6 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.37GiB
Name: w00tserver
ID: JA5E:XY6Y:VQBW:FC2Q:NVKM:7HKN:RSU6:OHQH:B4ZS:VGE6:FBLI:34YB
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support
REPOSITORY               TAG                 DIGEST                                                                    IMAGE ID            CREATED             SIZE
mailserver2/mailserver   1.1.2               sha256:9839a6a9593f28ce8099be9faad37f579c9aba58e12ebd2274610c4407cf284f   51798da0fc86        12 days ago         311MB

Description

My general issue is that it seems that mails from DHL are not getting it to my inbox. In the past I just checked the /var/log/mail.log to find out what is the issue with the emails (grep for dhl) but on this image I don't find where the logs for receiving emails are. Or do I have to set somewhere the logging to info or debug to see receiving issues?

sknight80 commented 4 years ago

Hi @tflori ,

Have you tried the following command? docker logs mailserver ? The default settings should be good enough to see the problem. You can also check the spam.<domain> to see what was the reason for the rejection.

tflori commented 4 years ago

Yes, I tried the process logs from docker but I didn't found something useful there (no mail from ... rejected).

Where are these spam.<domain> folders/files? I don't find them:

root@mail:/# find -name "spam.*" 2>/dev/null
root@mail:/#
sknight80 commented 4 years ago

So the spam part is a service in the docker-compose, so you can open it and you can check the Rspamd results.

The docker logs mailserver should return the postfix + dovecot logs because they are logging to docker.

tflori commented 4 years ago

In the linked file is no spam service. On my server I have a lot of services running all in the same docker-compose environment and for a second I thought I'm missing this service after upgrading to mailserver 1.1.

sknight80 commented 4 years ago

hm... @SaraSmiseth do you have any idea?

@tflori , in the meantime, could you please copy your docker-compose.yaml file here without the sensitive data

tflori commented 4 years ago

Ok, I have enough logs when I enable DEBUG_MODE in the environments.

Now I got an email from dhl (contact form copy) but the password reset seems not to send emails at all. That is all I wanted to know - if my server rejects the mails or no mails are sent.

Is there a less verbose mode than debug mode but more than without? Especially I'm interested in these lines:

2020-09-02T16:04:49.741194+00:00 mail postfix/smtpd[1289]: < mail-ed1-f52.google.com[209.85.208.52]: MAIL FROM:<***@gmail.com> SIZE=2314
SaraSmiseth commented 4 years ago

Use DEBUG_MODE to enable the debug mode. Switch to true to enable verbose logging for postfix, dovecot, rspamd and Unbound. To debug components separately, use this syntax: DEBUG_MODE=postfix,rspamd.

Errors are logged to /var/log/mail.err and warnings are logged to /var/log/mail.warn.

I check them like this: sudo docker exec docker_mailserver_1 cat /var/log/mail.err

tflori commented 4 years ago

Thanks @SaraSmiseth that's at least some bit less verbose. Is there no way to make postfix less verbose but not silent?

SaraSmiseth commented 4 years ago

You could try and adjust the configuration file for rsyslog which is here and mount a modified version instead of the one in the image.

The same for postfix config. Possible settings here.

You have to play around with these.

AndrewSav commented 3 years ago

It sounds like this one is solved. Please let me know if there is anything outstanding, or if you would like to re-open.