aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ansible/roles/postfix/templates/services/fredrick-reply.sh.j212
1 files changed, 11 insertions, 1 deletions
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"