-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patha.sh
More file actions
25 lines (19 loc) · 695 Bytes
/
a.sh
File metadata and controls
25 lines (19 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# Path to your .procmailrc file
PROCMAIL_CONFIG="/home/shay/a/ece404u5/.procmailrc"
# Directory containing your junkMail files
JUNK_MAIL_DIR="/home/shay/a/ece404u5/Mail/404/"
# Loop through each junkMail file
for i in {1..74}
do
# Format the file name with leading zero for numbers less than 10
FILENAME="junkMail_$(printf "%02d" $i)"
# Execute procmail for each file
procmail $PROCMAIL_CONFIG < "$JUNK_MAIL_DIR/$FILENAME"
# Optional: Echo the file name to track progress
echo "Processed $FILENAME"
done
# Optional: Check if any mails are left unfiltered
# If your mailbox is configured to /var/mail/your_username
# Uncomment the following line
# mailx