Basically the problem was that postfix was sending mails with this format: email@example.com
This is not what I needed. Then after digging here and there and looking for a solution I finally found a simple way to fix this problem:
Adding this line into the main.cf file for postfix:
myhostname = somehostname.foo.com
After that a simple postfix restart and everything went fine.
[root@CoolDomain postfix]# /etc/init.d/postfix restart
Shutting down postfix: [ OK ]
Starting postfix: [ OK ]