On Wed, 9 Jun 2004, Jamie Davey wrote:
> Hi all > > I am trying to get a script (derived from the archives of this list) > running that will deliver a warning mail to users who are in danger of > breaching / have breached their mailbox quota. The script determines the > users affected by running the quota command and then tries to send them > a mail using deliver with the -q directive to deliver regardless of > their quota usage. It works fine for users who are approaching their > full quota but not for those currently over it. > > I have run the script without the deliver portion and manually sent the > mails, again using "deliver -q -l" and get a "452 4.2.2 Over quota" > error which disregards the recipient. Is this a bug with deliver or am I > doing something wrong The man page for deliver shows: SYNOPSIS deliver [ -C config-file ] [ -d ] [ -r address ] [ -f address ] [ -m mailbox ] [ -a auth-id ] [ -q ] [ userid ]... deliver [ -C config-file ] -l This indicates to me that -l and -q are mutually exclusive. I wrote an overquota script. Here is a snippet concerning sending email to an overquota mailbox: # And build a message to send $tmpmsg = $msg_over; $to = "[EMAIL PROTECTED]"; # Substitute values into message $tmpmsg =~ s/%to%/$to/g; $tmpmsg =~ s/%quota%/$quota/g; $tmpmsg =~ s/%percent%/$percent/g; $tmpmsg =~ s/%usage%/$usage/g; $tmpmsg =~ s/%from%/$from/g; $tmpmsg =~ s/%date%/$date/g; open(OUT, "| /usr/local/cyrus/bin/deliver -q -r [EMAIL PROTECTED] $username"); print OUT $tmpmsg; close(OUT); Where $msg_over contains the template of an overquota message that I do some substitutions into before sending. Andy --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html