mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-01-26 05:27:29 +02:00
[Dovecot, Postfix, SOGo] Fix redis log cleanup, fixes #542
This commit is contained in:
parent
446907944a
commit
1f90433429
@ -20,7 +20,6 @@ destination d_redis_ui_log {
|
|||||||
persist-name("redis1")
|
persist-name("redis1")
|
||||||
port(6379)
|
port(6379)
|
||||||
command("LPUSH" "DOVECOT_MAILLOG" "$(format-json time=\"$S_UNIXTIME\" priority=\"$PRIORITY\" program=\"$PROGRAM\" message=\"$MESSAGE\")\n")
|
command("LPUSH" "DOVECOT_MAILLOG" "$(format-json time=\"$S_UNIXTIME\" priority=\"$PRIORITY\" program=\"$PROGRAM\" message=\"$MESSAGE\")\n")
|
||||||
command("LTRIM" "DOVECOT_MAILLOG" "0" "10000")
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
destination d_redis_f2b_channel {
|
destination d_redis_f2b_channel {
|
||||||
@ -31,6 +30,14 @@ destination d_redis_f2b_channel {
|
|||||||
command("PUBLISH" "F2B_CHANNEL" "$MESSAGE")
|
command("PUBLISH" "F2B_CHANNEL" "$MESSAGE")
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
destination d_redis_cleanup {
|
||||||
|
redis(
|
||||||
|
host("redis-mailcow")
|
||||||
|
persist-name("redis3")
|
||||||
|
port(6379)
|
||||||
|
command("LTRIM" "DOVECOT_MAILLOG" "0" "9999")
|
||||||
|
);
|
||||||
|
};
|
||||||
filter f_mail { facility(mail); };
|
filter f_mail { facility(mail); };
|
||||||
log {
|
log {
|
||||||
source(s_src);
|
source(s_src);
|
||||||
@ -38,4 +45,6 @@ log {
|
|||||||
filter(f_mail);
|
filter(f_mail);
|
||||||
destination(d_redis_ui_log);
|
destination(d_redis_ui_log);
|
||||||
destination(d_redis_f2b_channel);
|
destination(d_redis_f2b_channel);
|
||||||
|
destination(d_redis_cleanup);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -20,7 +20,6 @@ destination d_redis_ui_log {
|
|||||||
persist-name("redis1")
|
persist-name("redis1")
|
||||||
port(6379)
|
port(6379)
|
||||||
command("LPUSH" "POSTFIX_MAILLOG" "$(format-json time=\"$S_UNIXTIME\" priority=\"$PRIORITY\" program=\"$PROGRAM\" message=\"$MESSAGE\")\n")
|
command("LPUSH" "POSTFIX_MAILLOG" "$(format-json time=\"$S_UNIXTIME\" priority=\"$PRIORITY\" program=\"$PROGRAM\" message=\"$MESSAGE\")\n")
|
||||||
command("LTRIM" "POSTFIX_MAILLOG" "0" "10000")
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
destination d_redis_f2b_channel {
|
destination d_redis_f2b_channel {
|
||||||
@ -31,6 +30,14 @@ destination d_redis_f2b_channel {
|
|||||||
command("PUBLISH" "F2B_CHANNEL" "$MESSAGE")
|
command("PUBLISH" "F2B_CHANNEL" "$MESSAGE")
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
destination d_redis_cleanup {
|
||||||
|
redis(
|
||||||
|
host("redis-mailcow")
|
||||||
|
persist-name("redis3")
|
||||||
|
port(6379)
|
||||||
|
command("LTRIM" "POSTFIX_MAILLOG" "0" "9999")
|
||||||
|
);
|
||||||
|
};
|
||||||
filter f_mail { facility(mail); };
|
filter f_mail { facility(mail); };
|
||||||
log {
|
log {
|
||||||
source(s_src);
|
source(s_src);
|
||||||
@ -38,4 +45,5 @@ log {
|
|||||||
filter(f_mail);
|
filter(f_mail);
|
||||||
destination(d_redis_ui_log);
|
destination(d_redis_ui_log);
|
||||||
destination(d_redis_f2b_channel);
|
destination(d_redis_f2b_channel);
|
||||||
|
destination(d_redis_cleanup);
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,6 @@ destination d_redis_ui_log {
|
|||||||
persist-name("redis1")
|
persist-name("redis1")
|
||||||
port(6379)
|
port(6379)
|
||||||
command("LPUSH" "SOGO_LOG" "$(format-json time=\"$S_UNIXTIME\" priority=\"$PRIORITY\" program=\"$PROGRAM\" message=\"$MESSAGE\")\n")
|
command("LPUSH" "SOGO_LOG" "$(format-json time=\"$S_UNIXTIME\" priority=\"$PRIORITY\" program=\"$PROGRAM\" message=\"$MESSAGE\")\n")
|
||||||
command("LTRIM" "SOGO_LOG" "0" "10000")
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
destination d_redis_f2b_channel {
|
destination d_redis_f2b_channel {
|
||||||
@ -34,10 +33,19 @@ destination d_redis_f2b_channel {
|
|||||||
command("PUBLISH" "F2B_CHANNEL" "$MESSAGE")
|
command("PUBLISH" "F2B_CHANNEL" "$MESSAGE")
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
destination d_redis_cleanup {
|
||||||
|
redis(
|
||||||
|
host("redis-mailcow")
|
||||||
|
persist-name("redis3")
|
||||||
|
port(6379)
|
||||||
|
command("LTRIM" "SOGO_LOG" "0" "9999")
|
||||||
|
);
|
||||||
|
};
|
||||||
log {
|
log {
|
||||||
source(s_sogo);
|
source(s_sogo);
|
||||||
destination(d_redis_ui_log);
|
destination(d_redis_ui_log);
|
||||||
destination(d_redis_f2b_channel);
|
destination(d_redis_f2b_channel);
|
||||||
|
destination(d_redis_cleanup);
|
||||||
};
|
};
|
||||||
log {
|
log {
|
||||||
source(s_sogo);
|
source(s_sogo);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user