On Tue, 29 Aug 2000, Audouy J�r�me wrote:
> I have a problem with the /var/qmail/bin/sendmail program
> i try to send a mail via a script (AMaViS) but the command line doesn't work :
>
> $cat <<EOF | /usr/lib/sendmail -i -t [EMAIL PROTECTED] [EMAIL PROTECTED]
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: test
> my test text.
>
Well, using -t and -f together does not make sense imho. Here's a quote of
the man-page from sendmail
-t Extract recipients from message headers. This
requires that no recipients be specified on the
command line.
The following small script (tested with qmail, of course) worked for me.
#!/bin/sh
cat <<EOF| /usr/sbin/sendmail -i -t
From: rainer@localhost
To: test@localhost
Subject: test
my test text.
EOF
That's basically just the same way we use to generate notification
messages in AMaViS :)
Anyway, I would use AMaViS-Perl instead of AMaViS with qmail :)
(Note to all SuSE Linux users: /usr/bin/suidperl is for security reasons
not setuid on SuSE Linux systems as it's IIRC not on FreeBSD systems,
too. But to get AMaViS-Perl to work with qmail it has to be setuid)
HTH
best regards,
Rainer Link
--
Rainer Link, SuSE GmbH, eMail: [EMAIL PROTECTED], Web: www.suse.de
Developer of A Mail Virus Scanner (AMaViS): http://amavis.org/
Founder of Linux AntiVirus Project: http://lavp.sourceforge.net/