Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Feb 2001 17:25:51 +1100
From:      Tony Landells <ahl@austclear.com.au>
To:        Brennan Stehling <brennan@offwhite.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: a temporary mail alias 
Message-ID:  <200102120625.RAA13092@tungsten.austclear.com.au>
In-Reply-To: Your message of "Mon, 12 Feb 2001 00:01:25 MDT." <Pine.BSF.4.21.0102112350450.73165-100000@home.offwhite.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> I am avoiding creating a majordomo system and would like to know if there
> is a way to create a temporary mail alias.  I have aliases in
> /etc/mail/aliases but in order to create more aliases the only way I know
> to do it is edit that file to add a new alias with a list of addresses and
> then run newaliases.

There are more options, such as alternate .forward paths, and aliases
that refer to files with lists of users, but they all require some
understanding of how to pacify sendmail.

> I am wondering if there is another way to do it.  Any sendmail buffs out
> there?  I have used bulk_mailer in the past to send mailings out to
> friends for summer parties and such, but what I want to do is build a nice
> web interface which can leverage sendmail as a delivery agent.  Since the
> web server will never run as root it will not have access to edit the
> alias file.  This web interface would allow users to add and remove
> themselves for the list easily.
> 
> Previously I have sent an email to each user one by one, and that is
> inefficient.  It is also prone to problems and it also takes longer than
> it should.

I would have thought for what you're doing you could just maintain the
list through your web thing, and then do something like:

	mail -s "message subject" `cat /var/lists/message_list` < message_text

assuming the list of user names is in /var/lists/message_list, which
should work fine if your lists aren't that big (say 10 or 20 people).

Of course, if this sort of thing is okay, and you have a fixed number
of lists, then you're only one short step from having aliases that
refer to the files of users anyway with an alias like:

	message_list:	:include:/var/lists/message_list

If you set things up carefully (in this example, /var and /var/lists
would need to be mode 755 or less, and /var/lists/message_list would
need to be mode 644 or less) you should be able to make it work without
having to fiddle with the awful DontBlameSendmail option, though it
isn't something I've tried to do myself--for the effort it will take
to do the web interface I could have Majordomo up and running.

Good luck,
Tony
-- 
Tony Landells					<ahl@austclear.com.au>
Senior Network Engineer				Ph:  +61 3 9677 9319
Australian Clearing Services Pty Ltd		Fax: +61 3 9677 9355
Level 4, Rialto North Tower
525 Collins Street
Melbourne VIC 3000
Australia




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102120625.RAA13092>