[Dovecot] quota-warning.sh mail from
Proskurin Kirill
k.proskurin at fxclub.org
Tue Oct 21 17:39:42 EEST 2008
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\" <postmaster at domain.off>
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: <dmail at mx.domain.off>
Envelope-to: proskurin-kv at domain.off
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 <dmail at mx.domain.off>)
id 1KsDy7-000L9d-0H
for proskurin-kv at domain.off; Tue, 21 Oct 2008 13:56:03 +0400
From: "Quota Subsystem" <postmaster at domain.off>
TO: proskurin-kv at domain.off
Subject: E-Mail Quota Warning
Sender: Dovecot Mail <dmail at mx.domain.off>
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
More information about the dovecot
mailing list