Alle 17:49, lunedì 22 agosto 2005, Tom Collins ha scritto:
> On Aug 22, 2005, at 6:58 AM, Riccardo Bini wrote:
> > ok.. with 5.4.12 works but not as I would want 8-)
> > I mean when vdelivermail deliver the email and the user is over system
> > quota
> > vdeliver return a "deferral: system_error/".
> > vdelivermail would have to return "user is over quota" with an
> > 'deliver_quota_warning'. Instead the email keep in queue like an error
> > message.
>
> Well, there's a good chance it won't be able to deliver the over quota
> message if the user has hit their system quota.
>
> I'll take a look at the code, and see if we can catch the system quota
> error and do an overquota bounce instead of a deferral.
>
Well, if the user is in overquota, generate a overquota bounce but it's
impossible (I think) to deliver the quota warn message.. but if he is in
grace time, it's possible to send the quota warn message??
BWT: there is a bug in vdelivermail.c:
the 'domains' dir is incorrect.
I attach the patch. (5.4.12)
Thx
Rick
--- vdelivermail.c.orig 2005-08-22 18:25:41.000000000 +0200
+++ vdelivermail.c 2005-08-22 18:22:48.000000000 +0200
@@ -550,7 +550,7 @@
sprintf(tmp_file, "%s/.over-quota.msg",TheDomainDir);
if ( (fs=fopen(tmp_file, "r")) == NULL ) {
/* if no domain over quota then check in vpopmail dir */
- sprintf(tmp_file, "%s/domains/.over-quota.msg",VPOPMAILDIR);
+ sprintf(tmp_file, "%s/%s/.over-quota.msg",VPOPMAILDIR,DOMAINS_DIR);
fs=fopen(tmp_file, "r");
}
@@ -580,7 +580,7 @@
sprintf(tmp_file, "%s/.over-quota.msg",TheDomainDir);
if ( (fs=fopen(tmp_file, "r")) == NULL ) {
/* if no domain over quota then check in vpopmail dir */
- sprintf(tmp_file, "%s/domains/.over-quota.msg",VPOPMAILDIR);
+ sprintf(tmp_file, "%s/%s/.over-quota.msg",VPOPMAILDIR,DOMAINS_DIR);
fs=fopen(tmp_file, "r");
}
@@ -946,7 +946,7 @@
sprintf(tmp_file, "%s/.no-user.msg",TheDomainDir);
if ( (fs=fopen(tmp_file, "r")) == NULL ) {
/* if no domain no user then check in vpopmail dir */
- sprintf(tmp_file, "%s/domains/.no-user.msg",VPOPMAILDIR);
+ sprintf(tmp_file, "%s/%s/.no-user.msg",VPOPMAILDIR,DOMAINS_DIR);
fs=fopen(tmp_file, "r");
}
if ( fs == NULL ) {
@@ -1016,7 +1016,7 @@
(stat(quotawarnmsg, &sb) != 0)) {
/* if that fails look in vpopmail dir */
- sprintf(quotawarnmsg, "%s/domains/.quotawarn.msg", VPOPMAILDIR);
+ sprintf(quotawarnmsg, "%s/%s/.quotawarn.msg", VPOPMAILDIR, DOMAINS_DIR);
if ( ((read_fd = open(quotawarnmsg, O_RDONLY)) < 0) ||
(stat(quotawarnmsg, &sb) != 0)) {
return 0;