From f85f6cd1508263542dbbef295cdc31e66417ac9e Mon Sep 17 00:00:00 2001 From: Nicolas KAROLAK <nicolas.karolak@ubicast.eu> Date: Mon, 23 Sep 2019 17:18:09 +0200 Subject: [PATCH] handle maillog file --- tests/test_email.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_email.py b/tests/test_email.py index 7a2308d7..402d2244 100755 --- a/tests/test_email.py +++ b/tests/test_email.py @@ -128,6 +128,8 @@ def check_send(sender: str) -> tuple: # find logs if Path("/var/log/mail.log").is_file(): cmd = "grep '{}' /var/log/mail.log".format(email) + elif Path("/var/log/maillog").is_file(): + cmd = "grep '{}' /var/log/maillog".format(email) else: u.info("/var/log/mail.log not found, trying journalctl") cmd = "journalctl -t postfix/smtp | grep {}".format(email) -- GitLab