How to delete emails for mutt?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I need to know if there is a way to delete messages off mutt
mailarchive. I tried to do it in the following way:
#!/bin/bash
#
#
# Usage:
# ~r : DELETE
# 1y! : 1 year
# 2y! : 2 years
# 7d! : 7 days
# 30d! : 30 days
#
mailbox="/path/to/user/mailbox"
deletePattern="7d!"
mutt -f $mailbox -F/dev/null -e "push <delete-pattern>~r>$deletePattern<enter><sync-mailbox>y<enter><exit>q"
But the syntax is not deleting the entire messages. This is the way that someone told me in order to do it manually:
ssh
into the SMTP server.- Run the command:
mutt -f /var/mail/mailarchive
. After the command is finished running, press D - Then type in
~d dd/mm/yyyy-dd/mm/yyyy
which is the date range to delete the files. Example:~d 01/06/2018-15/06/2018
- Press q to quit
- Then a prompt will come up to confirm. Press y.
- Pressing q and then y might need to be done a few times before the delete kicks off.
- Then check in the Postfix portal in the user mailboxes to see if the deletion worked.
bash mutt
add a comment |Â
up vote
0
down vote
favorite
I need to know if there is a way to delete messages off mutt
mailarchive. I tried to do it in the following way:
#!/bin/bash
#
#
# Usage:
# ~r : DELETE
# 1y! : 1 year
# 2y! : 2 years
# 7d! : 7 days
# 30d! : 30 days
#
mailbox="/path/to/user/mailbox"
deletePattern="7d!"
mutt -f $mailbox -F/dev/null -e "push <delete-pattern>~r>$deletePattern<enter><sync-mailbox>y<enter><exit>q"
But the syntax is not deleting the entire messages. This is the way that someone told me in order to do it manually:
ssh
into the SMTP server.- Run the command:
mutt -f /var/mail/mailarchive
. After the command is finished running, press D - Then type in
~d dd/mm/yyyy-dd/mm/yyyy
which is the date range to delete the files. Example:~d 01/06/2018-15/06/2018
- Press q to quit
- Then a prompt will come up to confirm. Press y.
- Pressing q and then y might need to be done a few times before the delete kicks off.
- Then check in the Postfix portal in the user mailboxes to see if the deletion worked.
bash mutt
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I need to know if there is a way to delete messages off mutt
mailarchive. I tried to do it in the following way:
#!/bin/bash
#
#
# Usage:
# ~r : DELETE
# 1y! : 1 year
# 2y! : 2 years
# 7d! : 7 days
# 30d! : 30 days
#
mailbox="/path/to/user/mailbox"
deletePattern="7d!"
mutt -f $mailbox -F/dev/null -e "push <delete-pattern>~r>$deletePattern<enter><sync-mailbox>y<enter><exit>q"
But the syntax is not deleting the entire messages. This is the way that someone told me in order to do it manually:
ssh
into the SMTP server.- Run the command:
mutt -f /var/mail/mailarchive
. After the command is finished running, press D - Then type in
~d dd/mm/yyyy-dd/mm/yyyy
which is the date range to delete the files. Example:~d 01/06/2018-15/06/2018
- Press q to quit
- Then a prompt will come up to confirm. Press y.
- Pressing q and then y might need to be done a few times before the delete kicks off.
- Then check in the Postfix portal in the user mailboxes to see if the deletion worked.
bash mutt
I need to know if there is a way to delete messages off mutt
mailarchive. I tried to do it in the following way:
#!/bin/bash
#
#
# Usage:
# ~r : DELETE
# 1y! : 1 year
# 2y! : 2 years
# 7d! : 7 days
# 30d! : 30 days
#
mailbox="/path/to/user/mailbox"
deletePattern="7d!"
mutt -f $mailbox -F/dev/null -e "push <delete-pattern>~r>$deletePattern<enter><sync-mailbox>y<enter><exit>q"
But the syntax is not deleting the entire messages. This is the way that someone told me in order to do it manually:
ssh
into the SMTP server.- Run the command:
mutt -f /var/mail/mailarchive
. After the command is finished running, press D - Then type in
~d dd/mm/yyyy-dd/mm/yyyy
which is the date range to delete the files. Example:~d 01/06/2018-15/06/2018
- Press q to quit
- Then a prompt will come up to confirm. Press y.
- Pressing q and then y might need to be done a few times before the delete kicks off.
- Then check in the Postfix portal in the user mailboxes to see if the deletion worked.
bash mutt
bash mutt
edited Sep 9 at 20:41
Rui F Ribeiro
36.8k1272117
36.8k1272117
asked Aug 31 at 14:43
user3513091
12
12
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f466058%2fhow-to-delete-emails-for-mutt%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password