Sotiris Tsimbonis wrote:
Ok, fair enough (my "mail" does not understand -f to set From)...
Maybe you've got different "mail" executables in your path and the
script's default path?
See output of "whereis mail" ..
Even better, run "which mail" on your shell, and put the full path in
your script..
I have only one mail program.
Anyway - I try this:
#!/bin/sh
PERCENT=$1
echo "From: \"Quota Subsystem\" <[EMAIL PROTECTED]>
To: $USER
Subject: E-Mail Quota Warning
Mime-Version: 1.0
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 8bit
Your mailbox is $PERCENT% full. If it overfill - you will can not get
new email.
Please clean up your mailbox.
--
Mail Administator" | /usr/sbin/sendmail $USER
----
And all ok. But I have this headers:
Return-path: <[EMAIL PROTECTED]>
Envelope-to: [EMAIL PROTECTED]
Delivery-date: Tue, 21 Oct 2008 13:56:03 +0400
Received: from dmail by mx.domain.off with local (Exim 4.69 (FreeBSD))
(envelope-from <[EMAIL PROTECTED]>)
id 1KsDy7-000L9d-0H
for [EMAIL PROTECTED]; Tue, 21 Oct 2008 13:56:03 +0400
From: "Quota Subsystem" <[EMAIL PROTECTED]>
TO: [EMAIL PROTECTED]
Subject: E-Mail Quota Warning
Sender: Dovecot Mail <[EMAIL PROTECTED]>
As you see - it have sender header and dont looks good im clients MUA.
But it is a "problem" of my MTA and not for this list.
P.S. Oh. All I ask it is to explain HOW launch of quota-warning.sh work
to make me free to write my own script.
Anyway - thank you for you answers.
--
Best regards,
Proskurin Kirill