NotesException: Size limit exceeds quota

06/08/2011 11:49:17 PM Agent error: Hi

am getting the below, when i try to set the user mail box quota programtically. I have requirement to set the mailbox quota irrespective of the registration policy setting.

Currently the registration policy setting as 250 mb as db size quota and 150 as warning size quota. But am able to set 500 mb for db and 250 for warning quota. If i try to set more than 500mb, am getting the below error.

Please let me know if any of you have answer to it.

NotesException: Size limit exceeds quota 06/08/2011 11:49:17 PM Agent error: at lotus.domino.local.Database.setSizeWarning(Unknown Source)

06/08/2011 11:49:17 PM Agent error: at setMaildbQuota.NotesMain(Unknown Source)

06/08/2011 11:49:17 PM Agent error: at lotus.domino.AgentBase.runNotes(Unknown Source)

06/08/2011 11:49:17 PM Agent error: at lotus.domino.NotesThread.run(Unknown Source)

Subject: problem fixed

If you want to increase the mail db quota from current size then you have to set the dbsize quota first and then the warning threshold. If you want to reduce the db size quota then you have to set first warning threshold and then db size quota. The below code shows the answer to it

                     l_getwarnsize = db_mail.getSizeWarning();

                	   l_getdbsize= db_mail.getSizeQuota();

                	   

                	    i_setdbsize = i_setdbsize * 1024;

                	    i_setwarningsize = i_setwarningsize * 1024;

                	    

                	    if (l_getdbsize <= i_setdbsize) 

                  	   {

                  		  

                     	    db_mail.setSizeQuota(i_setdbsize);

                     	    db_mail.setSizeWarning(i_setwarningsize);

                  		   

                  	   }

                  	   else

                  	   {

                  		  db_mail.setSizeWarning(i_setwarningsize);

                   	      db_mail.setSizeQuota(i_setdbsize);

                  	   }

Subject: Thanks

That helped me a lot. A late Thank You to you.

Subject: Thank you

I have an agent that programmatically creates a replica of mail files on another server.The new replicas did not have quotas or warnings, so I tried to programmatically set the quota and warning in the agent.

I got the same error as you and your solution also worked for me.

Thanks a lot.