[NTLUG:Discuss] mail replyto address question

David Stanaway david at stanaway.net
Tue May 14 13:44:28 CDT 2002


On Tue, 2002-05-14 at 12:07, Fred James wrote:
> 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:

Well mail accepts the environment variable REPLYTO, but that doesn't
change the From: header.

> (1) for the message?
ciderbox:~# sendmail david at stanaway.net <<EOF
> From: David <david at quickclose.com.au>
> Subject: System Failure
> 
> The system $(hostname) has gone down at $(date).
> EOF

Return-Path: <root at stanaway.net>
Delivered-To: david at stanaway.net
Received: by ciderbox.stanaway.net (Postfix, from userid 0) id
D7C399362A;
        Tue, 14 May 2002 13:21:35 -0500 (CDT)
From: David <david at quickclose.com.au>
Subject: System Failure
Message-Id: <20020514182135.D7C399362A at ciderbox.stanaway.net>
Date: Tue, 14 May 2002 13:21:35 -0500 (CDT)
To: undisclosed-recipients:;
X-Evolution-Source: mbox:/var/spool/mail/dstanawa
Mime-Version: 1.0

The system ciderbox has gone down at Tue May 14 13:21:35 CDT 2002.

> (2) for the system/server?
That depends on what you are using... It is different for
sendmail/postfix/exim/qmail ...

In postfix, you can change the mail domain for outgoing mail by chaning
the:
myorigin setting in main.cf

Also.. you can change the canonical_maps setting (Or Enable it)
EG:
canonical_maps = hash:/etc/postfix/canonical
--/etc/postfix/canonical
postgres@*	dba at mywebfam.com
www-data@*	  webmaster at mywebfarm.com
*		  sysadmin at mywebfarm.com	

> (3) for the "user"?
Ditto ...

> Is this UNIX in general, Linux in general, or OS specific?

This is MTA specific. I use postfix as it has a good balance of
features/security/easy config, but YMMV.


--
David Stanaway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 524 bytes
Desc: This is a digitally signed message part
Url : http://ntlug.org/pipermail/discuss/attachments/20020514/d15be5e9/attachment.bin


More information about the Discuss mailing list