HI!

 I am experimenting with procmail+sendmail to
implement mailbox quota using the above two.

i had written following receipe in procmailrc

=================Receipe==============================
NL="
"
QUOTA=20
FROM=`formail -rt -xTo:`
SENDMAIL = /usr/sbin/sendmail
INBOXSIZE=`ls -l $MAIL 2>/dev/null | awk '{print $5}'`
:0
* $ -${INBOXSIZE}^0
* $ ${QUOTA}^0
{
    MAXMSG = $=
    :0
    * $ > ${MAXMSG}
    {
        LOG="Bouncing (message too big!)${NL}"
        EXITCODE=69
        HOST
    }
}
:0E
{
        LOG="BOUNCING(inbox already full)$NL"
        EXITCODE=69
        HOST
}

===================Receipe Ends======================

 Now the problem is sender receives a bounced email
but the mail is also delivered to the receiver. On
checking the maillog i find following entry

Apr  8 19:19:37 qws sendmail[29985]: i38Dnbi0029985:
to=root, delay=00:00:00, xdelay=0
0:00:00, mailer=local, pri=33409, dsn=5.0.0,
stat=Service unavailable

Apr  8 19:19:37 qws sendmail[29985]: i38Dnbhx029985:
Losing ./qfi38Dnbhx029985: savema
il panic

Apr  8 19:19:37 qws sendmail[29985]: i38Dnbhx029985:
SYSERR(root): savemail: cannot sa
ve rejected email anywhere

 I cannot understand why i am getting savemail panic. 

 Also, how can i direct rejected mails to /dev/null
??It appears to me that rejected mails are delivered
to /var/spool/mailbox

What i want is if the mail size is over the allowed
$QUOTA or the mailbox is already over $QUOTA it should
be rejected and a bounced message be sent to the
sender.

Regards
VK

=====
Disclamer
The facts expressed here belong to everybody, the opinions to me. The distinction is 
yours to draw...

__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to