You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, sorry to ask a question that was asked, but i did not find a solution:
I am using an imap server that offers only one INBOX but several mailaliases. In case a mail comes in with two or more aliases, this mail is duplicated for each of the aliases.
What i can do with imapfilter is moving and copying to other subfolders depending on the to or cc field, but this moves all the messages.
So i need a way to first dedup the messages. How can i achieve this ?
What i found by searching is a extension that covers a similar case:
messages = myaccount.INBOX:select_all()
results = Set {}
for _, message in ipairs(messages) do
mailbox, uid = table.unpack(message)
messageId = mailbox[uid]:fetch_header('Message-Id')
if seen[messageId] then
table.insert(results, uid)
else
seen[messageId] = true
end
end
results:delete_messages()
i tried it but this won't run because i am obviously missing something. can anyone explain what i am missing
The text was updated successfully, but these errors were encountered:
Hi all, sorry to ask a question that was asked, but i did not find a solution:
I am using an imap server that offers only one INBOX but several mailaliases. In case a mail comes in with two or more aliases, this mail is duplicated for each of the aliases.
What i can do with imapfilter is moving and copying to other subfolders depending on the to or cc field, but this moves all the messages.
So i need a way to first dedup the messages. How can i achieve this ?
What i found by searching is a extension that covers a similar case:
messages = myaccount.INBOX:select_all()
results = Set {}
for _, message in ipairs(messages) do
mailbox, uid = table.unpack(message)
messageId = mailbox[uid]:fetch_header('Message-Id')
if seen[messageId] then
table.insert(results, uid)
else
seen[messageId] = true
end
end
results:delete_messages()
i tried it but this won't run because i am obviously missing something. can anyone explain what i am missing
The text was updated successfully, but these errors were encountered: