We use a perl script,
sits in /mail/auto/ with a symlink to /etc/smrsh/

/etc/aliases has this:

info:           "|/mail/auto/autoreply data/info.reply"

where "info" is the alias and "info.reply" is the text file which sits in
/mail/auto/data/

<<<<<<<<<

#!/usr/bin/perl

unless ($ARGV[0]) {
        open (OUT, "!/usr/bin.mail -s 'MailRobot error!' postmaster");
        print OUT "Whoops! The MailRobot has gone loco!\n\n\n";
        close OUT;
        exit 1;
}

$mailfile = "\/mail\/auto\/$ARGV[0]";

while(<STDIN>) {
        if (s/^From: //) {
                 s/[\012\015]|^ *//g;  #Remove all CR and LF
                 $to = $_;
                 open (OUT, "|/usr/sbin/sendmail -oi -t");
                 open (IN, $mailfile );

                 #Read and display FROM line
                 $_ = <IN>;
                 print OUT $_;

                 print OUT "To: $to\n";

                 while (<IN>) { print OUT $_; }
                 close IN;
                 close OUT;
        }
}

exit 0;


>>>>>>>>>>

Works fine.
Hope this helps.
Luke.

On Tue, 6 Mar 2001, Shannon Doyle wrote:

> Hi people,
> 
> I am wanting to setup up an autoresponder for one of my clients under a linux 
>mandrake/sendmail system. Any suggestions as to the software of choice and any 
>pointers as to how easy/hard it is to be configured. I kinda need to get this up and 
>running within the hour. It doesn't need to be all that extensive in features,  just 
>send an email to the sender with the contents of a text file.
> 
> Any help would be great,
> 
> - Shannon
> 
> 

-- 
Luke Szymanski <[EMAIL PROTECTED]>
Network Administrator
The Asia Pacific Internet Company <www.apic.net>


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to