Disk Quota Qmail

1999-07-14 Thread Shashi Dahal

Dear All,

I have Redhat 5.2 with Qmail. I have enabled quota and it works fine,
except for the fact that mail send to the user doesn't bounce back to the
sender. The user also doesn't get the mail as Qmail just records "
Temporary Deferral in Maildir Delivery" in its log. Can you please point to
me on how can I use disk quota with qmail ? 
Another question is what is practically good ? use disk quota or force
databytes ?

Please guide.

TIA

Shashi



Re: Disk Quota Qmail

1999-07-14 Thread Jeff Hayward

On Wed, 14 Jul 1999, Shashi Dahal wrote:

I have Redhat 5.2 with Qmail. I have enabled quota and it works fine,
   except for the fact that mail send to the user doesn't bounce back to the
   sender. The user also doesn't get the mail as Qmail just records "
   Temporary Deferral in Maildir Delivery" in its log. Can you please point to
   me on how can I use disk quota with qmail ? 
   Another question is what is practically good ? use disk quota or force
   databytes ?

I use my patch to qmail-local (attached) which treats quota exceeded
as a permanent error, bouncing the message back to the sender.  Use
of control/databytes is suggested as well.

-- Jeff Hayward


*** qmail-1.03/qmail-local.cMon Jun 15 05:53:16 1998
--- qmail-local.c   Tue Sep 15 12:16:57 1998
***
*** 41,46 
--- 41,49 
  void temp_qmail(fn) char *fn;
  { strerr_die5x(111,"Unable to open ",fn,": ",error_str(errno),". (#4.3.0)"); }
  
+ char *overquota = 
+   "Recipient's mailbox is full, message returned to sender. (#5.2.2)";
+ 
  int flagdoit;
  int flag99;
  
***
*** 131,137 
 /* if it was error_exist, almost certainly successful; i hate NFS */
   tryunlinktmp(); _exit(0);
  
!  fail: tryunlinktmp(); _exit(1);
  }
  
  /* end child process */
--- 134,145 
 /* if it was error_exist, almost certainly successful; i hate NFS */
   tryunlinktmp(); _exit(0);
  
!  fail: 
!if (errno == error_dquot) {
!  tryunlinktmp(); _exit(5);
!} else {
!  tryunlinktmp(); _exit(1);
!}
  }
  
  /* end child process */
***
*** 162,167 
--- 170,176 
 case 2: strerr_die1x(111,"Unable to chdir to maildir. (#4.2.1)");
 case 3: strerr_die1x(111,"Timeout on maildir delivery. (#4.3.0)");
 case 4: strerr_die1x(111,"Unable to read message. (#4.3.0)");
+case 5: strerr_die1x(100,overquota);
 default: strerr_die1x(111,"Temporary error on maildir delivery. (#4.3.0)");
}
  }
***
*** 221,227 
   return;
  
   writeerrs:
!  strerr_warn5("Unable to write ",fn,": ",error_str(errno),". (#4.3.0)",0);
   if (flaglocked) seek_trunc(fd,pos);
   close(fd);
   _exit(111);
--- 230,241 
   return;
  
   writeerrs:
!  if (errno == error_dquot) { 
!if (flaglocked) seek_trunc(fd,pos);
!close(fd);
!strerr_die1x(100,overquota);
!  } else
!strerr_warn5("Unable to write ",fn,": ",error_str(errno),". (#4.3.0)",0);
   if (flaglocked) seek_trunc(fd,pos);
   close(fd);
   _exit(111);
*** qmail-1.03/error.h  Mon Jun 15 05:53:16 1998
--- error.h Tue Sep 15 11:52:14 1998
***
*** 16,21 
--- 16,22 
  extern int error_pipe;
  extern int error_perm;
  extern int error_acces;
+ extern int error_dquot;
  
  extern char *error_str();
  extern int error_temp();
*** qmail-1.03/error.c  Mon Jun 15 05:53:16 1998
--- error.c Tue Sep 15 11:53:29 1998
***
*** 93,95 
--- 93,102 
  #else
  -13;
  #endif
+ 
+ int error_dquot =
+ #ifdef EDQUOT
+ EDQUOT;
+ #else
+ -14;
+ #endif



Re: Disk Quota Qmail

1999-07-14 Thread Juan Carlos Castro y Castro

Shashi Dahal wrote:

 Dear All,

 I have Redhat 5.2 with Qmail. I have enabled quota and it works fine,
 except for the fact that mail send to the user doesn't bounce back to the
 sender. The user also doesn't get the mail as Qmail just records "
 Temporary Deferral in Maildir Delivery" in its log. Can you please point to
 me on how can I use disk quota with qmail ?

In truth, it IS temporary. The user can always clean up his directory /
purge previous messages, thus making delivery possible. It'll bouce back
in 5 days if delivery remains impossible for the period. Maybe the
give-up period could be shortened, just for this quota-exceeded case.

 Another question is what is practically good ? use disk quota or force
 databytes ?

Duh. What is "force databytes"?

 Please guide.

Meditate, light an incense and detach yourself from mundane values.
There, you're guided. ;)



Disk Quota Qmail

1999-07-13 Thread Shashi Dahal

Dear All,

I have Redhat 5.2 with Qmail. I have enabled quota and it works fine,
except for the fact that mail send to the user doesn't bounce back to the
sender. The user also doesn't get the mail as Qmail just records "
Temporary Deferral in Maildir Delivery" in its log. Can you please point to
me on how can I use disk quota with qmail ? 
Another question is what is practically good ? use disk quota or force
databytes ?

Please guide.

TIA

Shashi



Disk Quota+Qmail

1999-05-21 Thread Shashi Dahal

Dear All !

I have Redhat 5.2 with Qmail as the MTA. Each user of the system has
limited disk quota. When I send mails to any user whose quota is finished,
Qmail just loggs "Temporary Deferral on Mail Delivery" and the mails just
remains on queue. I want the mails to be bounced back to the sender. My
/var/qmail/control/queuelifetime is set to 2 days. I epected the mail to be
bounced back after 2 days, but didn't worked.

Please suggest !!


Shashi



Re: Disk Quota+Qmail

1999-05-21 Thread Anand Buddhdev

On Fri, May 21, 1999 at 03:27:27PM +0500, Shashi Dahal wrote:

The mail should bounce back. However, when you set the queue lifetime to 2
days, the message will not bounce at exactly 2 days. qmail will make one
last attempt to deliver the email, after the 2 days are up, and if it
fails, then it will bounce. In your case, maybe the 2 days are up, but the
message has not reached its retry time. Try sending an ALRM signal to
qmail-send, and see if it bounces.

 Dear All !
 
 I have Redhat 5.2 with Qmail as the MTA. Each user of the system has
 limited disk quota. When I send mails to any user whose quota is finished,
 Qmail just loggs "Temporary Deferral on Mail Delivery" and the mails just
 remains on queue. I want the mails to be bounced back to the sender. My
 /var/qmail/control/queuelifetime is set to 2 days. I epected the mail to be
 bounced back after 2 days, but didn't worked.

-- 
System Administrator
See complete headers for address, homepage and phone numbers