> On Thu, 28 Jun 2007, Derrick wrote:
> >>> From Derrick on Thursday, June 28, 2007 9:27 AM I have a need to 
> >>> bypass the exim quota for messages coming from the 
> company mailing 
> >>> lists, staff members (determined by a field in mysql) and from 
> >>> certain machines (different host naming, internal domain); what 
> >>> would i be looking to do for this? Any examples?
> >
> > Thank you David. Here's more info on the config relating to quota:
> >
> >
> >   quota = ${lookup mysql{SELECT userEmailQuota FROM 
> vfs.tb_user LEFT JOIN infotech.tb_emailaddress \
> >             ON (tb_emailaddress.emailUnixUID = 
> vfs.tb_user.userUnixUID) \
> >             LEFT JOIN infotech.tb_domain ON 
> (tb_domain.domainID = tb_emailaddress.emailDomainID) \
> >             WHERE emailLocalPart = '${quote_mysql:${local_part}}' \
> >             AND domainName='${quote_mysql:${domain}}'}}
> >
> > in vfs.tb_user there is a staffID and a studentID column.  
> One or the 
> > other will be filled with their student or staff ID number

So you need to modify this statement to return zero any time you do not want 
the quota applied. You will probably need some combination if ${if...} 
expansions around the query to match host names and other criteria, and then 
modify the query itself for criteria that come from the database.

For example, maybe start with something like replacing "SELECT userEmailQuota" 
with "SELECT IF(staffID, 0, userEmailQuota)" so that the value returned is zero 
whenever staffID is not null. You will need to come up with appropriate tests 
for your other conditions as a part of this expansion.

David



-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to