and when i scanned the file avast detected it
So what is the problem? Avast uses on-access, that means a file is scanned when you acces it. Create the eicar test file as instructed and try to move it around on your system. See if Avast gives an alert.

To test it for your mail, use the last link in my previous post.