[Dovecot] lmtp logging to separate file
Hello list,
Testing lmtp deliver I can't constrain it to log all activity to separate file, like dovecot-lda does. Here is config:
protocol lmtp { info_log_path = /var/log/dovecot/dovecot-deliver.log log_path = /var/log/dovecot/dovecot-deliver.log mail_plugins = acl quota trash virtual zlib expire sieve } protocol lda { info_log_path = /var/log/dovecot/dovecot-deliver.log log_path = /var/log/dovecot/dovecot-deliver.log mail_plugins = acl quota trash virtual zlib expire sieve }
When message is proceed via protocol lda - record appear in /var/log/dovecot/dovecot-deliver.log, but when message arrives by protocol lmtp - logs got to /var/log/dovecot.log file.
Is this settings suppose to be overwritten ?
On Thu, 2011-02-10 at 15:27 +0200, Nikita Koshikov wrote:
Hello list,
Testing lmtp deliver I can't constrain it to log all activity to separate file, like dovecot-lda does. Here is config:
LMTP processes are started by dovecot master process, so it logs through it. But you can avoid this with:
service lmtp { executable = lmtp -L }
On Fri, 11 Feb 2011 23:27:45 +0200 Timo Sirainen wrote:
On Thu, 2011-02-10 at 15:27 +0200, Nikita Koshikov wrote:
Hello list,
Testing lmtp deliver I can't constrain it to log all activity to separate file, like dovecot-lda does. Here is config:
LMTP processes are started by dovecot master process, so it logs through it. But you can avoid this with:
service lmtp { executable = lmtp -L }
This works, thank you.
Quick src code view gave more lmtp params, can you tell what is relevant command line keys for this options and maybe comment some of them? wiki2 still lacks all this info.
MAIL_STORAGE_SERVICE_FLAG_DISALLOW_ROOT | MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP | MAIL_STORAGE_SERVICE_FLAG_TEMP_PRIV_DROP | MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT | MAIL_STORAGE_SERVICE_FLAG_NO_IDLE_TIMEOUT;
On 12.2.2011, at 9.46, Nikita Koshikov wrote:
service lmtp { executable = lmtp -L }
This works, thank you.
Quick src code view gave more lmtp params, can you tell what is relevant command line keys for this options and maybe comment some of them? wiki2 still lacks all this info.
These flags have just about nothing to do with command line parameters. They're all about how the binary should work correctly.
MAIL_STORAGE_SERVICE_FLAG_DISALLOW_ROOT |
User root isn't allowed for mail actions (pretty much everything has this, root is evil).
MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP |
Users are looked up via userdb lookup, rather than from environment variables and current process euid.
MAIL_STORAGE_SERVICE_FLAG_TEMP_PRIV_DROP |
Privileges are dropped only temporarily (this is the biggest thing I hate about LMTP processes - they effectively run as root).
MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT |
The "mail storage service" code doesn't change anything related to logging. I don't remember exactly why this matters, but I think lmtp does this internally.
MAIL_STORAGE_SERVICE_FLAG_NO_IDLE_TIMEOUT;
UNIX socket connections to auth-userdb aren't disconnected. Mostly just an optimization.
On Sat, Feb 12, 2011 at 2:23 PM, Timo Sirainen tss@iki.fi wrote:
On 12.2.2011, at 9.46, Nikita Koshikov wrote:
service lmtp { executable = lmtp -L }
This works, thank you.
Quick src code view gave more lmtp params, can you tell what is relevant command line keys for this options and maybe comment some of them? wiki2 still lacks all this info.
These flags have just about nothing to do with command line parameters. They're all about how the binary should work correctly.
MAIL_STORAGE_SERVICE_FLAG_DISALLOW_ROOT |
User root isn't allowed for mail actions (pretty much everything has this, root is evil).
MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP |
Users are looked up via userdb lookup, rather than from environment variables and current process euid.
MAIL_STORAGE_SERVICE_FLAG_TEMP_PRIV_DROP |
Privileges are dropped only temporarily (this is the biggest thing I hate about LMTP processes - they effectively run as root).
MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT |
The "mail storage service" code doesn't change anything related to logging. I don't remember exactly why this matters, but I think lmtp does this internally.
MAIL_STORAGE_SERVICE_FLAG_NO_IDLE_TIMEOUT;
UNIX socket connections to auth-userdb aren't disconnected. Mostly just an optimization.
Thanks for explanation.
participants (2)
-
Nikita Koshikov
-
Timo Sirainen