mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
14.01k stars 1.44k forks source link

Disable mail info logs #1945

Open zxcvqwerasdf opened 3 years ago

zxcvqwerasdf commented 3 years ago

Hello, i can't turn off mail info logs like this:

Mar 20 18:49:00 lmtp(xxxxx@xx.xx): Info: uOvHJXknVmAvHQAAP/WhQA: sieve: msgid=<xxxxxxxxx@xxxxxx.xxx>: stored mail into mailbox 'INBOX'
Mar 20 18:49:00 lmtp(7471): Info: Disconnect from 127.0.0.1: Successful quit
Mar 20 18:49:00 lmtp(7471): Info: Connect from 127.0.0.1
Mar 21 00:45:00 imap-login: Info: Login: user=<xxxxx@xx.xx>, method=PLAIN, rip=::1, lip=::1, mpid=5293, TLS, session=<60kllf+90tYAAAAAAAAAAAAAAAAAAAAB>
Mar 21 00:45:00 imap(xxxxx@xx.xx): Info: Logged out in=90 out=897
Mar 21 00:45:59 imap-login: Info: Login: user=<xxxxx@xx.xx>, method=PLAIN, rip=::1, lip=::1, mpid=5750, TLS, session=<hc22mP+91tYAAAAAAAAAAAAAAAAAAAAB>
Mar 21 00:45:59 imap(xxxxx@xx.xx): Info: Logged out in=90 out=897
Mar 21 00:46:59 imap-login: Info: Login: user=<xxxxx@xx.xx>, method=PLAIN, rip=::1, lip=::1, mpid=5769, TLS, session=<hlRKnP+92NYAAAAAAAAAAAAAAAAAAAAB>
Mar 21 00:46:59 imap(xxxxx@xx.xx): Info: Logged out in=90 out=897
Mar 21 00:48:00 imap-login: Info: Login: user=<xxxxx@xx.xx>, method=PLAIN, rip=::1, lip=::1, mpid=5776, TLS, session=<0f7sn/+92tYAAAAAAAAAAAAAAAAAAAAB>
Mar 21 00:48:00 imap(xxxxx@xx.xx): Info: Logged out in=90 out=897

I set

auth_verbose = no
auth_verbose_passwords = no
auth_debug = no
auth_debug_passwords = no
mail_debug = no

in /etc/dovecot/conf.d/10-logging.conf but didn't help

Any advice? Thank you.

kiekerjan commented 3 years ago

To stop logging INFO entries you’ll have to take a look at rsyslog: /etc/rsyslog.d/50-default.conf Unfortunately I’m not sure about the exact config to use :frowning: You can start by replacing

mail.* -/var/log/mail.log

with

mail.notice -/var/log/mail.log

which should only log entries of level notice and higher (warn, error etc). However, I have not tested this, and I don’t know if there are any side effects to this, e.g. some log analysis that will fail because of this, or missed log entries.

In the future, you might want to ask your question on discourse or slack. You might get better response there, as the github issue tracker is for reporting bugs and errors.

zxcvqwerasdf commented 3 years ago

So i got it working only by setting info_log_path = /dev/null in /etc/dovecot/conf.d/10-logging.conf Any other settings (50-default.conf) don't work.