Era,
era eriksson wrote:
On Mon, 27 Sep 1999 10:07:07 +0200, Jost Schaper <jost(_at_)schaper(_dot_)org>
wrote:
> When they are read by a perl-script, and printed in a new mail, I very
> often get "Pipe broken", whenever there is a "." alone in one line.
> (After deleteing the "." it works.)
What exactly are you piping to? Sendmail (raw Sendmail) thinks "."
alone on a line means "end of message". You can use sendmail -oi to
make sure this doesn't happen.
My Script:
...
$mailprog = '/usr/lib/sendmail';
if (-f "/home/jost/Mail/interne-liste/$direc/$dateiname") {
open (MAIL, "|$mailprog -t") || die "Can't open $mailprog!\n";
print MAIL "To: $email\n";
print MAIL "From: jost\(_at_)schaper(_dot_)org\n";
print MAIL "Reply-to: jost\(_at_)schaper(_dot_)org\n";
print MAIL "Subject: Listenarchiv vom $dateiname\n\n";
# my script reads from the file
open (DATEI, "/home/jost/Mail/interne-liste/$direc/$dateiname");
while (<DATEI>) {
print MAIL "$_";
}
close (DATEI);
print MAIL "Ende der Datei\n";
close (MAIL);
}
...
This usually works, the Data-file is fed from procmail:
:0 w:
* ^TOintern-list
|formail -X"From" -k
${MAILDIR}/interne-liste/${MONTHFOLDER}/${DAYFILE}
I have no Idea, where to put the -oi - flag.
Thank you,
Jost