| Author |
Message |
devon
Joined: 17 Mar 2010
Posts: 14
|
| Posted: Mon Oct 10, 2011 11:09 pm Post subject: Command line sending mail with different "From"? |
|
|
I followed the linode library article of setting up Exim4 on Ubuntu 10.04. I am able to send e-mail out fine.
My question is how do I specify a different "From" address for the e-mail on the command line?
I am doing this for simple testing purposes and the fact that I have multiple domains pointing to the same server. |
|
| Back to top |
|
tonyyarusso
Joined: 16 Sep 2011
Posts: 3
|
| Posted: Mon Oct 10, 2011 11:19 pm Post subject: |
|
|
| mail -a "From: Fake Person <fakey@gmail.com>" |
|
| Back to top |
|
devon
Joined: 17 Mar 2010
Posts: 14
|
| Posted: Tue Oct 11, 2011 12:01 am Post subject: |
|
|
Thank you! That worked. After testing this it brought up another question. When viewing the raw text of the e-mail message sent using this it will show it came from my original domain name (what is displayed by hostname -f):
Received: from mydomain.com ([72.14.xxx.xxx])
Is it possible for it to show the domain that I am actually sending from? I have two virtual hosts/domains served by Apache and the "Received: from" would always indicate the hostname -f even when I send an e-mail that is supposed to appear from the other domain. The From field displayed in the e-mail client does display correctly. |
|
| Back to top |
|
hoopycat
Joined: 30 Aug 2008
Posts: 1294
Location: Rochester, New York
|
| Posted: Tue Oct 11, 2011 7:46 am Post subject: |
|
|
| Not generally; your system has one hostname, which is used to identify itself whenever it needs to know its name. The best workaround might be to use a hostname under another, neutral domain (like a domain for your company/department, if other companies or departments are your "customers"). If worse comes to worse, the default lixxx-yyy.members.linode.com hostname works too. |
|
| Back to top |
|
| |