Skip to content

Delete all emails from a specific user #4303

Answered by casperklein
MarcS1975 asked this question in Q&A
Discussion options

You must be logged in to vote

Something like this should work:

# get mails from sender and verify
grep '^From: Foo Bar <foo@example>' data/maildata/DOMAIN/USER/cur

# get mails from sender and delete
grep -l '^From: Foo Bar <foo@example>' data/maildata/DOMAIN/USER/cur | xargs rm

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by MarcS1975
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@polarathene
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants