Mailbox cleaner on an IMAP basis?
fgeiger at datec.at
Mon Sep 22 19:11:30 CEST 2003
As I saw Alex Martelli's post about a mbox cleaner based on POP3, I thought,
it could be possible to do that based on IMAP too. That way I could ask the
server for mails having attached EXE files and delete all those mails on the
server. This would save me a lot of traffic over my phone line connection.
But I'm missing one important thing: How do I get the server to tell me
What I've found out so far is how to get at the fields:
r, d = i.fetch(1, "(BODY.PEEK[HEADER.FIELDS])")
Alas, there's no such thing like 'filename' or 'attachments'.
r, d = i.fetch(1, "(BODY.PEEK[HEADER.FIELDS (Content-type)])")
doesn't show a file name either.
More information about the Python-list