mailx (from address issue)
Bill Campbell
linux-sxs
Thu Oct 26 13:09:29 PDT 2006
On Thu, Oct 26, 2006, Bill Campbell wrote:
>On Thu, Oct 26, 2006, A. Khattri wrote:
>>On Wed, 25 Oct 2006, Dirk Moolman wrote:
>>
>>> Hi, I have a problem where we are trying to send mail from our linux
>>> servers, but would like to display in the "From" line, a specific
>>> address.
>>>
>>> I use the -r option (man page: -r address - Sets the From address)
>>>
>>> But what currently happens, is that we receive the mail in the format:
>>>
>>>
>>> From: <user at domain that mail was sent from on the server> on behalf of
>>> (-r address)
>>>
>>>
>>> Does this formatting come from the exchange server that we are using as
>>> our relay server ?
>>
>>Is your linux server running an MTA? or is it just passing it along to a
>>mail hub?
>
>There are several ways to do this with the best method depending
>on the complexity of the e-mails (do they need MIME parts). For
>simple text e-mails something like this should work:
>
>(
> echo 'From: user at example.com\n\n'
> cat mailfile
>DONE
>) | /usr/sbin/sendmail destination
>
>The echo command generates the from address followed by at least
>one blank line which sendmail takes as the message headers.
Note: The DONE line above is a mistake and left over from
another way I was going to do it.
Bill
--
INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
``Freedom from prices is freedom from responsibility. You can simply pass
laws, using the magic wand of government to satisfy your own desires at
unspecified costs to be paid by others.'' -- Thomas Sowell Aug 2000
More information about the Linux-users
mailing list