

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
1 message in net.sourceforge.lists.courier-maildrop[maildropl] maildroprc for managing o...| From | Sent On | Attachments |
|---|---|---|
| Mohan Nakka | Oct 8, 2008 1:51 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [maildropl] maildroprc for managing overquota notifications | Actions... |
|---|---|---|
| From: | Mohan Nakka (kna...@gmail.com) | |
| Date: | Oct 8, 2008 1:51:12 pm | |
| List: | net.sourceforge.lists.courier-maildrop | |
Hello,
I have mailserver setup with postfix+mysql+courier with maildrop as the delivery agent for virtual users. I would like to send a custom bounce message to the sender notifying that the recipients mailbox is full.
master.cf file has:
maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -w 95 /etc/maildroprc -d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop} ${sender}
Which sends a warning message to the mailbox owner when the mailbox hits 95%. This part works well. Currently, /etc/maildroprc file contains filtering for vacation/autorespond.
I would like to have filtering done for quota, so that when the mailbox hits the quotalimit, the sender receives a custom message.
So far I have tried something like the following in /etc/maildroprc just for quota: The problem is that, it is not able to catch the RETURNCODE of 77 to process the custom message, since xfilter returns either 0 or 1. How do I go about solving this?
Thanks much...
--------------------- VERBOSE="9" EXTENSION="$1" USER="$5" HOST="$6" FROM="$USER@$HOST" HOME="/home/vmail" DEFAULT="$HOME/$HOST/$USER/Maildir"
logfile "/tmp/maildrop.log"
`test -e $DEFAULT/maildirsize` if (RETURNCODE == 0) { MAILDIRQUOTA=`/usr/bin/head -n1 $DEFAULT/maildirsize` }
`test -x /usr/bin/deliverquota` if (RETURNCODE == 1) { log " WARNING: no deliverquota!" } else { if (RETURNCODE == 77) { log " Over Quota. Current size $MAILDIRQUOTA" to "| mailbot -t /tmp/fullwarning.txt /usr/sbin/sendmail -t -f ''" } else { exception { xfilter "/usr/bin/deliverquota -w 95 $DEFAULT" log "Delivered to $DEFAULT" }
if (RETURNCODE == 0) { log "success quota $MAILDIRQUOTA" to "$DEFAULT" # EXITCODE=0 # exit } else { log "different error code" } } }
----------------------------------------
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ Courier-maildrop mailing list Cour...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/courier-maildrop







