31 Jul
2008
31 Jul
'08
1:19 p.m.
On Jul 26, 2008, at 9:45 AM, Patrick Nagel wrote:
I should think it's a one line to type in the IMAP search command and have it execute?
But I don't know how to wait for / react to answers from the IMAP
server (after listing mailboxes, selecting the mailbox, etc.) in shell (bash) script, which would be my preferred choice as scripting language. Is
it possible? How?
I don't think you need to do any of that. Just:
printf "1 select $mailbox\n2 search text x93hgdgd\n3 logout\n" |
dovecot --exec-mail imap
For getting the list of mailboxes:
mailboxes=printf "1 list "" *\n" | dovecot --exec-mail imap | perl magic