Usually they encrypt these sort of things with unique information based on the machine, such as windows serial number, MAC address of a network card, CPU information, serial number of first partition.. Combine all these (and possibly hash the result with sd5 or sha1 for example) to make the key used to crypt the stored password. Then it should be only possible to decrypt it on the same machine it was encrypted on. If you encrypt the password with such methods it doesn't really matter where you store it; in EG config, file in EG directory, file in user directory, possibly even windows registry..
Just choose good sources of machine-based info that does not change such as serial numbers.
(Yes, if you know all these things about the machine it is possible to decrypt it anywhere, however that's not really a big threat In my opinion as if the attacker can poke around your system to retrieve such information one email password stored in EG config is not a big concern anymore)
Take a look at this interesting python WMI module, you can use it to retrieve all sorts of interesting information:
http://tgolden.sc.sabren.com/python/wmi.htmlThere is probably a lot of talk on this issue around the internet already, try looking around a bit.
Also you could look for information on how to make registration/activation keypairs - (the registration key is usually a machine based generated key that you send to the program maker and they give you the activation code for that key). They do that to control the user so that he only has one installation per key at any one time, if you want to move the software to another machine you have to request a new activation code. A good example of this is the Microsoft Windows's activation. Basically it's the same thing as this just different application of it.
-jinxdone