Skip to content

Commit

Permalink
Learn from Fredrick's therapy results
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
jchristgit committed Feb 3, 2025
1 parent 529c881 commit 8476718
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ansible/roles/postfix/templates/services/fredrick-reply.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 -)

Expand Down Expand Up @@ -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"

0 comments on commit 8476718

Please sign in to comment.