Find specific mails and move them to different folder through shell

Find e-mails inside the inbox that are sent by and move them to Sent items (Verzonden items in Dutch).

# Test first:
find '/var/vmail/' -type f -exec grep -qiF 'From: "Project" <>' {} \; -exec ls {} \;

# Should return matching files.

# Do real task:
find '/var/vmail/' -type f -exec grep -qiF 'From: "Project" <>' {} \; -exec mv {} '/var/vmail/ items/cur/' \;
Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp