[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

imapfilter: delete_messages by uid



On 06-01 I sent this to the <imapfilter-devel@lists.hellug.gr> mailing list 
and got no response… perhaps someone here can help me.


I would like to deliver a group of messages locally and delete them 
individually.  I do not want to delete them after they all have been 
delivered because then duplicates will be downloaded if it is interrupted.

What should I use after the pipe_to line?

Thanks


results = myaccount.INBOX:select_all()
for _, mesg in ipairs(results) do
 mbox, uid = unpack(mesg)
 text = mbox[uid]:fetch_message()
 if (pipe_to('/usr/sbin/sendmail user', text) == 0) then
  mesg:delete_messages()
 end
end

Attachment: signature.asc
Description: Digital signature


Reply to: