From 2754ac4869a84a6c595efe5af778a469105f89bb Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Mon, 3 Feb 2025 21:27:00 +0100 Subject: Learn from Fredrick's therapy results After his diagnosis, Fredrick now finally has access to treatment. Will he use this treatment, or will he continue to fail to reply to his mails? --- .../roles/postfix/templates/services/fredrick-reply.sh.j2 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ansible/roles/postfix/templates/services/fredrick-reply.sh.j2 b/ansible/roles/postfix/templates/services/fredrick-reply.sh.j2 index b33c7c4..7fe77b3 100644 --- a/ansible/roles/postfix/templates/services/fredrick-reply.sh.j2 +++ b/ansible/roles/postfix/templates/services/fredrick-reply.sh.j2 @@ -16,6 +16,9 @@ SENDER=$(echo "$EMAIL" | maddr -h from -) # Grab the display name of the sender SENDER_DISPLAY_NAME=$(echo "$EMAIL" | maddr -h from -d -) +# Grab the target address +RECIPIENT=$(echo "$EMAIL" | maddr -a -h to -) + # Sender date as a unix timestamp DATE_UNIX=$(echo "$EMAIL" | mhdr -h date -D -) @@ -89,5 +92,12 @@ rm "$REPLY_PATH" EOF # Use the z queue for maximum niceness -at -q z -f "$ATSCRIPT" now + 10 min +case $RECIPIENT in + "fredrick+ritalin@"*) + at -q z -f "$ATSCRIPT" now + 1 min + ;; + *) + at -q z -f "$ATSCRIPT" now + 20 min + ;; +esac rm "$ATSCRIPT" -- cgit v1.2.3