Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to send mail using postfix, I have set up all the things, the mail is going, I have set up the email using my domain i.e. xyz@domain.com. When When I am using the following code

ehlo xyz
mail from:<abc@gmail.com>
rcpt to:<pqe@gmail.com>
data
Subject:Test mail from postfix

This mail is going to inbox of pqe, but the sender address is xyz@domain.com, then what is the use of this abc@gmail.com or this mail from ?/

share|improve this question

2 Answers 2

Try out this :-

ehlo xyz
mail from:abc@gmail.com
rcpt to:pqe@gmail.com
data    
From:abc@gmail.com
To:pqe@gmail.com
Subject:Test mail from postfix

test
.
share|improve this answer
    
I have tried it out but this from and to section is sending as the body of mail –  lord_linus Nov 29 '12 at 5:45
    
Its worked for me. Can you please tell me how did you send test mails ? –  itzforu Nov 29 '12 at 20:43

That from header means that you will be telling the recipient mail server that this is the email where the message generated. However, that means that your domain.com must be listed in the SPF records of gmail.com, which I'm sure isn't the case. That usually means either being unable to send the email or ending up in the junk/spam folder.

share|improve this answer
    
If I have set this from address at abc@gmail.com then the reciever pqe@gmail.com should get the sender name as abc@gamil.com instead of xyz@domain.com –  lord_linus Nov 28 '12 at 13:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.