[Dovecot] quota-warning.sh mail from

Sotiris Tsimbonis tsimbonis at forthnet.gr
Tue Oct 21 14:58:35 EEST 2008


Proskurin Kirill wrote, On 10/21/2008 11:36 AM:
> Sotiris Tsimbonis wrote:
>> Proskurin Kirill wrote, On 10/20/2008 06:27 PM:
>>> Oh. I make my question more short.
>>>
>>> In example on wiki we see such command:
>>>
>>> /usr/sbin/sendmail "$USER"
>>>
>>> As I understand $USER - it is system env mean current login user.
>>> I could not understand still how dovecot understand to whom deliver a 
>>> mail? I dont see it on this example.
>>
>> $USER means current user..
>>> My script work but "mail from" - is a dovecot user but I want see in 
>>> "mail from" postmaster of my domain.
>> You use /usr/bin/mail, which does not accept -f "from" as a parameter 
>> to set the "From" header.. On the other hand, /usr/sbin/sendmail does..
> 
> Hm sorry but mail program clearly understand -f param.
> %echo test | mail -s "Email mailbox is 1 full" proskurin-kv at domain.off 
> -f itiswork at domain.off
> 

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..

Sotiris.

> Here is email:
> ------
> Return-path: <itiswork at domain.off>
> Envelope-to: proskurin-kv at domain.off
> Delivery-date: Tue, 21 Oct 2008 12:34:59 +0400
> Received: from root by mx.domain.off with local (Exim 4.69 (FreeBSD))
>     (envelope-from <itiswork at domain.off>)
>     id 1KsChf-000L2u-46
>     for proskurin-kv at domain.off; Tue, 21 Oct 2008 12:34:59 +0400
> To: proskurin-kv at domain.off
> Subject: Email mailbox is 1 full
> Message-Id: <E1KsChf-000L2u-46 at mx.domain.off>
> From: itiswork at domain.off
> Date: Tue, 21 Oct 2008 12:34:59 +0400
> 
> 
> test
> 
> -----
> 



More information about the dovecot mailing list