|
@@ -775,35 +775,28 @@ function menu_encryption_keys {
|
775
|
775
|
function menu_email {
|
776
|
776
|
while true
|
777
|
777
|
do
|
778
|
|
- data=$(mktemp 2>/dev/null)
|
779
|
|
- dialog --backtitle $"Freedombone User Control Panel" \
|
780
|
|
- --title $"Change Email Filtering Rules" \
|
781
|
|
- --radiolist $"Choose an operation:" 14 70 7 \
|
782
|
|
- 1 $"Add yourself to a mailing list" off \
|
783
|
|
- 2 $"Remove yourself from a mailing list" off \
|
784
|
|
- 3 $"Add an email rule for an address" off \
|
785
|
|
- 4 $"Add an email rule for a subject" off \
|
786
|
|
- 5 $"Block or unblock an email address" off \
|
787
|
|
- 6 $"Block or unblock email with subject text" off \
|
788
|
|
- 7 $"Back to main menu" on 2> "$data"
|
789
|
|
- sel=$?
|
790
|
|
- case $sel in
|
791
|
|
- 1) rm -f "$data"
|
792
|
|
- break;;
|
793
|
|
- 255) rm -f "$data"
|
794
|
|
- break;;
|
795
|
|
- esac
|
796
|
|
- case $(cat "$data") in
|
|
778
|
+ W=(1 $"Add yourself to a mailing list"
|
|
779
|
+ 2 $"Remove yourself from a mailing list"
|
|
780
|
+ 3 $"Add an email rule for an address"
|
|
781
|
+ 4 $"Add an email rule for a subject"
|
|
782
|
+ 5 $"Block or unblock an email address"
|
|
783
|
+ 6 $"Block or unblock email with subject text")
|
|
784
|
+
|
|
785
|
+ # shellcheck disable=SC2068
|
|
786
|
+ selection=$(dialog --backtitle $"Freedombone User Control Panel" --title $"Change Email Filtering Rules" --menu $"Choose an operation, or ESC for main menu:" 14 70 7 "${W[@]}" 3>&2 2>&1 1>&3)
|
|
787
|
+
|
|
788
|
+ if [ ! "$selection" ]; then
|
|
789
|
+ break
|
|
790
|
+ fi
|
|
791
|
+
|
|
792
|
+ case $selection in
|
797
|
793
|
1) add_to_mailing_list;;
|
798
|
794
|
2) remove_user_from_mailing_list;;
|
799
|
795
|
3) email_rule_address;;
|
800
|
796
|
4) email_rule_subject;;
|
801
|
797
|
5) block_unblock_email;;
|
802
|
798
|
6) block_unblock_subject;;
|
803
|
|
- 7) rm -f "$data"
|
804
|
|
- break;;
|
805
|
799
|
esac
|
806
|
|
- rm -f "$data"
|
807
|
800
|
done
|
808
|
801
|
}
|
809
|
802
|
|
|
@@ -910,7 +903,7 @@ function menu_top_level {
|
910
|
903
|
9 $"Exit to the command line")
|
911
|
904
|
|
912
|
905
|
# shellcheck disable=SC2068
|
913
|
|
- selection=$(dialog --backtitle $"Freedombone Control Panel" --title $"User Control Panel" --menu $"Choose an operation, or ESC to log out:" 20 60 13 "${W[@]}" 3>&2 2>&1 1>&3)
|
|
906
|
+ selection=$(dialog --backtitle $"Freedombone User Control Panel" --title $"User Control Panel" --menu $"Choose an operation, or ESC to log out:" 20 60 13 "${W[@]}" 3>&2 2>&1 1>&3)
|
914
|
907
|
if [ ! "$selection" ]; then
|
915
|
908
|
kill -HUP "$(pgrep -s 0 -o)"
|
916
|
909
|
break
|