Skip to content

Commit 8476718

Browse files
committed
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?
1 parent 529c881 commit 8476718

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

ansible/roles/postfix/templates/services/fredrick-reply.sh.j2

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ SENDER=$(echo "$EMAIL" | maddr -h from -)
1616
# Grab the display name of the sender
1717
SENDER_DISPLAY_NAME=$(echo "$EMAIL" | maddr -h from -d -)
1818

19+
# Grab the target address
20+
RECIPIENT=$(echo "$EMAIL" | maddr -a -h to -)
21+
1922
# Sender date as a unix timestamp
2023
DATE_UNIX=$(echo "$EMAIL" | mhdr -h date -D -)
2124

@@ -89,5 +92,12 @@ rm "$REPLY_PATH"
8992
EOF
9093

9194
# Use the z queue for maximum niceness
92-
at -q z -f "$ATSCRIPT" now + 10 min
95+
case $RECIPIENT in
96+
"fredrick+ritalin@"*)
97+
at -q z -f "$ATSCRIPT" now + 1 min
98+
;;
99+
*)
100+
at -q z -f "$ATSCRIPT" now + 20 min
101+
;;
102+
esac
93103
rm "$ATSCRIPT"

0 commit comments

Comments
 (0)