summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-01-23 18:42:25 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-01-23 18:42:25 +0900
commit79910297e392fab893505a443cb10a521d9a6dd6 (patch)
tree65cd0b8b90a2441ea941540e82a68aae43829b72
parent233394bd9a179623be96ac0ee49f9f018b3e378b (diff)
modified bin/mw, modified mw.1
-rwxr-xr-xbin/mw27
1 files changed, 14 insertions, 13 deletions
diff --git a/bin/mw b/bin/mw
index 21b7bfe..2feadb7 100755
--- a/bin/mw
+++ b/bin/mw
@@ -289,6 +289,7 @@ Main actions:
-c create basic mailboxes for all accounts
-d Remove an already added address
-D your@email.com Force remove account without confirmation
+ -h Show this message
-l List email addresses configured
-r Reorder account numbers
-t number Toggle automatic mailsync every <number> minutes
@@ -299,12 +300,12 @@ Options allowed with -a:
-i IMAP/POP server address
-I IMAP/POP server port
-n "Real name" to be on the email account
+ -N Account login name if not full address
-o Configure address, but keep mail online.
-p Add for a POP server instead of IMAP.
-P Pass Prefix (prefix of the file where password is stored)
-s SMTP server address
-S SMTP server port
- -u Account login name if not full address
-x Password for account (recommended to be in double quotes)
-X Delete an account's local email too when deleting.
@@ -339,14 +340,14 @@ reorder() {
' "$tempfile" >>"$muttrc"
}
-while getopts "cdfhloprTXYa:D:i:I:m:n:P:s:S:t:u:x:y:" o; do case "${o}" in
- c) setact craete ;;
+while getopts "cdfhloprTXYa:D:i:I:m:n:N:P:s:S:t:x:y:" o; do case "${o}" in
+ c) setact create ;;
d) setact delete ;;
f)
setact add
force=True
;;
- h) setact info ;;
+ h) setact usage ;;
l) setact list ;;
o)
setact add
@@ -389,6 +390,10 @@ while getopts "cdfhloprTXYa:D:i:I:m:n:P:s:S:t:u:x:y:" o; do case "${o}" in
setact add
realname="$OPTARG"
;;
+ N)
+ setact add
+ login="$OPTARG"
+ ;;
P)
setact add
passprefix="$OPTARG"
@@ -401,10 +406,6 @@ while getopts "cdfhloprTXYa:D:i:I:m:n:P:s:S:t:u:x:y:" o; do case "${o}" in
setact add
sport="$OPTARG"
;;
- u)
- setact add
- login="$OPTARG"
- ;;
t)
setact toggle
cronmin="$OPTARG"
@@ -423,16 +424,12 @@ while getopts "cdfhloprTXYa:D:i:I:m:n:P:s:S:t:u:x:y:" o; do case "${o}" in
;;
esac done
-[ -z "$action" ] && action="info"
+[ -z "$action" ] && action="usage"
case "$action" in
add) checkbasics && askinfo && getboxes && getprofiles && finalize ;;
create) basicdir ;;
delete) delete ;;
-info)
- mwinfo
- exit 1
- ;;
list) list ;;
reorder) reorder ;;
sync)
@@ -440,4 +437,8 @@ sync)
mailsync $fulladdr
;;
toggle) togglecron ;;
+usage)
+ mwinfo
+ exit 1
+ ;;
esac