FindAllAddresses32013-01-16 19:20:33RobinTempletonauthor credit22013-01-16 06:47:16RobinTempletonuse getpass to avoid echoing password12013-01-16 01:06:11LunaThis is a script which will find all To-addresses for a particular domain that exist in your email. The purpose is mainly so that people who want to migrate off of having a catch-all for forwarding to Gmail can explicitly set all the addresses they have ever used. You need python with IMAPClient installed (I haven't checked if this is true or not on bog). or Run the script with replacing the variables with your particular situation. It can take a very long time to run. If you want to test that it works reasonably well for your situation, you can find a folder that is small and run the script on that folder (in my case, that's the inbox). Uncomment the line with 'INBOX' below (and change folder to a smaller one if your inbox is big). Let me know if there are any issues. //luna
from imapclient import IMAPClient
import sys
import re
from getpass import getpass
]]>