Skip to content
Snippets Groups Projects
Commit f85f6cd1 authored by Nicolas KAROLAK's avatar Nicolas KAROLAK
Browse files

handle maillog file

parent e905a59c
No related branches found
No related tags found
No related merge requests found
...@@ -128,6 +128,8 @@ def check_send(sender: str) -> tuple: ...@@ -128,6 +128,8 @@ def check_send(sender: str) -> tuple:
# find logs # find logs
if Path("/var/log/mail.log").is_file(): if Path("/var/log/mail.log").is_file():
cmd = "grep '{}' /var/log/mail.log".format(email) cmd = "grep '{}' /var/log/mail.log".format(email)
elif Path("/var/log/maillog").is_file():
cmd = "grep '{}' /var/log/maillog".format(email)
else: else:
u.info("/var/log/mail.log not found, trying journalctl") u.info("/var/log/mail.log not found, trying journalctl")
cmd = "journalctl -t postfix/smtp | grep {}".format(email) cmd = "journalctl -t postfix/smtp | grep {}".format(email)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment