Searching IMAP inbox for messages from a specefic sender and use of wild cards?

主宰稳场 提交于 2019-12-23 18:58:08

问题


Is it possible to use wildcards in searching for a specific sender on IMAP folder?

typ, data = M.SEARCH(None, 'from','"security@website*"')

回答1:


IMAP RFC 3501 6.4.4:

In all search keys that use strings, a message matches the key if the string is a substring of the field. The matching is case-insensitive.

So you need to search without * and you should almost similar result. (you get security@website ...)



来源:https://stackoverflow.com/questions/7719664/searching-imap-inbox-for-messages-from-a-specefic-sender-and-use-of-wild-cards

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!