Skip to content

Instantly share code, notes, and snippets.

@xardit
Last active January 14, 2026 10:49
Show Gist options
  • Select an option

  • Save xardit/f22bd4b393f4859cabe8fcd4e867e902 to your computer and use it in GitHub Desktop.

Select an option

Save xardit/f22bd4b393f4859cabe8fcd4e867e902 to your computer and use it in GitHub Desktop.
plesk ubuntu tips

plesk email top senders

zgrep -h "sasl_username=" /var/log/maillog* \
| sed -n 's/.*sasl_username=\([^ ,]*\).*/\1/p' \
| sort | uniq -c | sort -nr | head -5

Find emails with subject on cur/ dir inside Maildir and delete

grep -RIl --binary-files=without-match -m1 -E '^Subject: WordPress Updates Digest$' cur/

Find emails containing text and delete

grep -RIl --binary-files=without-match -m1 -E 'WordPress\=20Updates\=20Digest' -r . | xargs -r rm -f

Update index for Inbox

doveadm index -u some@email.com Inbox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment