I sent 0.04 Ether to my metamask address and within minutes the Ether was resent to another address automatically without my knowledge. this is my address 0x627306090abab3a6e1400e9345bc60c78a8bef57 and that the address my ether was sent to without my notice is 0xe3a894890459bb8d23418c8b288c225eb4b13a52. Can anyone tell me whats going.
Unfortunately the address you are using was generated by
truffle develop and the seed used to generate it is know. So anybody can access to any funds send to that account.
You have to stop using this address and generate a new one.
See this article post on reddit [WARNING] I sent ETH to my metamask account generated with truffle and the ETH disappeared.
My guess is that your account has been compromised (meaning that someone else knows your private key). From the account's transaction history, it looks like this sort of thing has been going on for over a month. Every transfer in is followed shortly be a transfer out. Were those previous transactions also unknown to you?
My recommendation: think about how you created the account in the first place and whether you may have used any malicious software/websites to access it. And until you understand what's going on and are sure it's okay, do not use this account anymore.
As mentioned here, metamask accounts are hierarchically deterministic wallets, which essentially means that although there is only one wallet in which you hold your funds, there may be more than one underlying Ethereum account in which your funds are held. I suspect this may be the reason some funds were sent to another account when you transferred the ether.
Seconding @smarx - to my knowledge, MetaMask would not do this. We've had an identical problem to that of the OP, and I believe it's likely because our mnemonic (and therefore our private key) was hacked, and I think a script is then run to automatically transfer those funds from our wallet. Highly suggest abandoning your wallet altogether, and uninstalling any malicious software than could've enabled phishing, if you can.