[NTLUG:Discuss] mail replyto address question

Cameron Moore lists at unbeatenpath.net
Wed May 15 16:03:03 CDT 2002


* fredjame at concentric.net (Fred James) [2002.05.15 12:14]:
> I write scripts to generate text files on the fly (OS system status and 
> such).  In these scripts I use "mail" to send those text files to one or 
> more valid email addresses.  The "user" that sends those messages is not 
> me, and the host is not where I would want replies to be sent.
> 
> Is there a way to set a "replyto" address:
> (1) for the message?
> (2) for the system/server?
> (3) for the "user"?
> 
> Is this UNIX in general, Linux in general, or OS specific?
> 
> Thanks in advance for any suggestions, pointers, or answers.

All you need to do is set the From: field in the body of the message you
are sending.  Try sending a message like this:

  From: Test <whatever at foo.com>
  To: <address1 at foo.com>, <address2 at bar.com>
  Cc: <address2 at foobar.com>
  Subject: my cron script

  Stats:
    ...

I think you can pipe that to `mail` and be done with it.  Using the
sendmail binary works about the same way.
-- 
Cameron Moore
[ If God was a perl hacker:  ($child = 'grave') =~ s/v/c/; ]




More information about the Discuss mailing list