Snert . Com Ecartis MLM Archive/1.2
      from   Snert . Com



List Index > linux > 2000-01 > 378   Previous  Next  Post

Date: Thu, 13 Jan 2000 15:25:12 +0100 (CET)
From: Bart-Jan Vrielink 
Subject: Re: Mail-script

On Thu, 13 Jan 2000, Paul Rijke wrote:

> Heeft iemand een scriptje om elke alias in /etc/aliases een mail te
sturen?
> 
> Dus niet elke gebruiker, maar elke alias...

#!/bin/bash
for adres in `awk -F':' '{print $1}' < /etc/mail/aliases | grep -v ^#
`
do mail $adres -s subject < mailbericht.txt
done

Maar andere oplossingen zijn natuurlijk ook mogelijk (het blijft Unix)

Je was niet helemaal duidelijk of je de aliases wou mailen of juist de
adressen waarheen wordt gealiast (verander $1 in $2 voor dat effect), en
of je 1 mailtje per adres wil, of de hele lijst wil CC'en. Een
verbeterde
versie van bovenstaande zou wel handig zijn als je dubbele adressen er
uit
wilt filteren.

-- 
Tot ziens,

Bart-Jan


-- 
Nederlandse Linux Gebruikers Groep        http://www.nllgg.nl/
Mailinglist info: http://mail.nllgg.nl/
Afmelden: echo "SIG linux" | mail listserv@nllgg.nl


List Index > linux > 2000-01 > 378   Previous  Next  Post


About the Ecartis MLM Archive/1.2 software.