[Dovecot, Postfix, SOGo] Fix redis log cleanup, fixes #542

master
andryyy 2017-09-03 11:57:58 +02:00
parent 446907944a
commit 1f90433429
3 changed files with 28 additions and 3 deletions

View File

@ -20,7 +20,6 @@ destination d_redis_ui_log {
persist-name("redis1")
port(6379)
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 {
@ -31,6 +30,14 @@ destination d_redis_f2b_channel {
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); };
log {
source(s_src);
@ -38,4 +45,6 @@ log {
filter(f_mail);
destination(d_redis_ui_log);
destination(d_redis_f2b_channel);
destination(d_redis_cleanup);
};

View File

@ -20,7 +20,6 @@ destination d_redis_ui_log {
persist-name("redis1")
port(6379)
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 {
@ -31,6 +30,14 @@ destination d_redis_f2b_channel {
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); };
log {
source(s_src);
@ -38,4 +45,5 @@ log {
filter(f_mail);
destination(d_redis_ui_log);
destination(d_redis_f2b_channel);
destination(d_redis_cleanup);
};

View File

@ -23,7 +23,6 @@ destination d_redis_ui_log {
persist-name("redis1")
port(6379)
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 {
@ -34,10 +33,19 @@ destination d_redis_f2b_channel {
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 {
source(s_sogo);
destination(d_redis_ui_log);
destination(d_redis_f2b_channel);
destination(d_redis_cleanup);
};
log {
source(s_sogo);