[Dovecot] quota-warning.sh mail from

Sotiris Tsimbonis tsimbonis at forthnet.gr
Tue Oct 21 11:28:42 EEST 2008


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

See again the example script I posted earlier, that allows you to send 
multiline warnings with custom from.. 
http://www.dovecot.org/list/dovecot/2008-October/034507.html

Sot.

> Sotiris Tsimbonis wrote:
>> On 10/20/2008 10:28 AM, Proskurin Kirill wrote:
>>> #cat quota-warning.sh:
>>>
>>> #!/bin/sh
>>>
>>> PERCENT=$1
>>> TO=$2
>>>
>>> echo "Your mailbox is $PERCENT% full. If it overfill - you will can 
>>> not get new email. Please clean up your mailbox.
>>>
>>> -- 
>>> Mail Administator" | /usr/bin/mail -s "Email mailbox is $PERCENT% 
>>> full" $TO -f postmaster at domain.off
>>>
>>> exit 0
>>> ----------
>>>
>>> But im still got this message with mail from "dmail at mx.domain.off" 
>>> *dmail it is user dovecot deliver runnig from*
>>>
>>> If im run quota-warning.sh cript by hands - im got 
>>> postmaster at domain.off in mail from. What im do wrong?..
>>>
>>
>> I'm not sure that you can have that multiline echo ...
>> Anyway, try the following which uses sendmail -f to set the From 
>> Address..
> 



More information about the dovecot mailing list