Re: [exim] Router Condition - Quota Exceeded upon SMTP Time

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Brian Spraker
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Router Condition - Quota Exceeded upon SMTP Time
After some changes, I have fixed the issue.  Instead of using a router, I set an ACL.
deny
message = Mail cannot be delivered, $local_part@$domain is over their quota.
!acl = acl_whitelist_local_deny
recipients = ${if exists{CONFDIR/maildir_quota_exceeded}\
                    {CONFDIR/maildir_quota_exceeded}\
                    {}}
Brian S.

Hello all,
I am having troubles getting a situation working.  I am using quotas and have setup the configuration for this appropriately.  However, I would like to ensure that if someone is over their quota, an incoming e-mail is immediately rejected at SMTP time and does not go to the user's inbox.  I have done some readon on this and I opted to use a technique that would check the maildirsize file and then dump accounts into a file that the exim config can do an lsearch on.
However, the original way the algorithm is to work is to only check the local_parts in the router config.  I cannot have this though since I do virtual hosting and need to check the full e-mail address.
So, I cannot come up with a router config that will fail the message.  I have tried several different ways doing lookups, if equal, if exists, and none seem to work.
Here is the pertinent config in the router.  It always accepts the e-mail at SMTP time:
maildir_overquota:
  driver = redirect
  condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/maildir_quota_exceeded}}
  data = :fail:Mailbox quota exceeded
  allow_fail
I have tested the original config - which basically just had the "condition" line substitued for local_parts = lsearch;/etc/exim4/maildir_quota_exceeded".  I put in an address that matched the local part and it does give the Mailbox quota exceeded error.  But when attempting to check the full e-mail address (which is what is put in the file checked), it always accepts.
Thank you for any advice!
Brian S.