From: Kóczán Péter [mailto:[EMAIL PROTECTED]
> 
> is it ok, if I write a script in PHP (that would be ran as any bash
> script with #!/usr/local/bin/php) and it would do some checks on the
> email and also check if the recipient user has exceeded his quota or
> not and do various things then.
> 
> I would place it in the local delivery like this: 
> || /usr/lib/courier/bin/maildrop -V 1 | myscript.php

You can write a script to do whatever checks you want, but you can't
call it like this.  If you write your script to accept the message on
STDIN, add headers to the message depending on your checks, and then
return the result via STDOUT, then you can call it like this in your
.mailfilter (or /etc/courier/maildroprc) file:

    xfilter myscript.php

Then you can use maildrop's scripting to decide what to do with the
message depending on what headers your script added.

man maildropfilter

> Another question, is it ok if I place deliverquota behind maildrop
> like this:
> 
> || /usr/lib/courier/bin/maildrop -V 1 | deliverquota
> 
> so that the server checks quota (I use mysql backend), but I am not
> sure if this make courier deliver the mail twice or not.

You don't need deliverquota to check quota.  This is available from
within maildrop now.  Call it like this:

    | /usr/lib/courier/bin/maildrop -w 90

This will check quota (if there is one), and send a warning message if
the mailbox is more than 90% full.

man maildrop

Bowie


-------------------------------------------------------
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_id70&alloc_id638&op=click
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to