Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tlug: /bin/mail




I've got a question about /bin/mail.  I've introduced a set of
aliases on our system that track the group membership of account
holders, using a Pretty Ordinary Script in Tcl, which is invoked
in the /etc/aliases file like this:

everyone:       "|/etc/runmailto group 200\\\|201\\\|202\\\|203\\\|204\\\|300\\\|400"
kyokan:         "|/etc/runmailto group 200"
ug:             "|/etc/runmailto group 201"
ma:             "|/etc/runmailto group 202"
pg:             "|/etc/runmailto group 203"
sma:            "|/etc/runmailto group 204"
jimu:           "|/etc/runmailto group 300"
expiring:       "|/etc/runmailto group 400"

The idea is to save time and error by linking alias membership
with the group or groups to which a user is assigned when their
account is set up.

The script is doing the job of cloning mail to group members, but
with one snag: I haven't been able to figure out how to get the
subject header and sender information that the mailer provides to
merge into the actual message headers.  So every message ends up
with a standard subject header that I provide when the script is
invoked.  Mail is invoked in the script like this:

     exec echo $message | mail -s "Note from Nomolog" $name

And the message comes out looking like this (other messages
provided for comparison purposes):

E  [  14: John Faulkner       ] Chelsea Flower Show
R  [  32: mail                ] Note from Nomolog
   [  50: Scott Stone         ] Re: tlug: good news & better news
       <  19: Jonathan Byrne - 3We> 

Has anyone had experience with using scripts with mail aliases?
There's got to be a way to fix this, but I can't fingure out what
it is.  For info, here's what the headers come through looking
like:

*****

From: mail <mail>
Subject: Note from Nomolog
To: bennett
Date: Thu, 21 May 1998 06:48:51 +0900
X-POP3-Rcpt: bennett@example.com
Return-Path: <mail>
Received: (from mail@example.com)
	by nomolog.nagoya-u.ac.jp (8.8.8/8.8.5) id GAA31063
	for bennett; Thu, 21 May 1998 06:48:51 +0900
Message-Id: <199805202148.GAA31063@example.com>
Status: RO
Lines: 32
Xref: lilliputer.nomolog.nagoya-u.ac.jp Inbox:2766 other:874

>From dean@example.com  Thu May 21 06:48:50 1998
Received: from [133.6.33.109] ([133.6.33.109])
	by nomolog.nagoya-u.ac.jp (8.8.8/8.8.5) with SMTP id GAA31057
	for <kyokan>; Thu, 21 May 1998 06:48:49 +0900
Message-Id: <199805202148.GAA31057@example.com>
Date: Thu, 21 May 1998 15:48:42 +0900
To: kyokan
From: dean@example.com (=?ISO-2022-JP?B?GyRCPHIwZiEhOlpKZjtSGyhC?=)
Subject: =?ISO-2022-JP?B?GyRCO0pLIUxkQmo4JjVmMnEkTj1QQEokSyREJCQkRhsoQg==?=
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-2022-jp
X-Mailer: Eudora-J(1.3.8.5-J13)

*****

Anyone have any idea how to improve on this?

Cheers,
-- 
Frank G Bennett, Jr         @@
Faculty of Law, Nagoya Univ () email: bennett@example.com
Tel: +81[(0)52]789-2239     () WWW:   http://rumple.soas.ac.uk/~bennett/
--------------------------------------------------------------
Next TLUG Meeting: 13 June Sat, Tokyo Station Yaesu gate 12:30
Featuring Stone and Turnbull on .rpm and .deb packages
Next Nomikai: (?) July, 19:30 Tengu TokyoEkiMae 03-3275-3691
--------------------------------------------------------------
Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links