/[mailutils]/mailutils/mail.local/main.c
ViewVC logotype

Diff of /mailutils/mail.local/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by gray, Wed Nov 20 12:34:05 2002 UTC revision 1.26 by gray, Sun Nov 24 22:12:10 2002 UTC
# Line 256  _sieve_parse_error (void *user_name, con Line 256  _sieve_parse_error (void *user_name, con
256        free (loc);        free (loc);
257      }      }
258    else    else
259      syslog (LOG_ERR, "(user %s) %s", user_name, text);      syslog (LOG_ERR, "(user %s) %s", (char*)user_name, text);
260    free (text);    free (text);
261    return 0;    return 0;
262  }  }
# Line 591  deliver (message_t msg, char *name) Line 591  deliver (message_t msg, char *name)
591    stream_t istream, ostream;    stream_t istream, ostream;
592    size_t size;    size_t size;
593    int failed = 0;    int failed = 0;
 #if defined(USE_DBM)  
   struct stat sb;  
 #endif    
594        
595    auth = mu_get_auth_by_name (name);    auth = mu_get_auth_by_name (name);
596    if (!auth)    if (!auth)
# Line 674  deliver (message_t msg, char *name) Line 671  deliver (message_t msg, char *name)
671      }      }
672    
673  #if defined(USE_DBM)  #if defined(USE_DBM)
674    switch (check_quota (name, size, &n))    {
675      {      size_t n, isize;
676      case MQUOTA_EXCEEDED:      struct stat sb;
677        mailer_err ("%s: mailbox quota exceeded for this recipient", name);  
678        exit_code = EX_QUOTA();      switch (check_quota (name, size, &n))
679        failed++;        {
680        break;        case MQUOTA_EXCEEDED:
681      case MQUOTA_UNLIMITED:          mailer_err ("%s: mailbox quota exceeded for this recipient", name);
682        break;          exit_code = EX_QUOTA();
683      default:          failed++;
684        if ((status = stream_size (istream, (off_t *) &isize)))          break;
685          {          
686            mailer_err ("can't get stream size (input message): %s",        case MQUOTA_UNLIMITED:
687                        path, mu_errstring (status));          break;
688            exit_code = EX_UNAVAILABLE;          
689            failed++;        default:
690          }          if ((status = stream_size (istream, (off_t *) &isize)))
691        else if (sb.st_size > n)            {
692          {              mailer_err ("can't get stream size (input message): %s",
693            mailer_err ("%s: message would exceed maximum mailbox size for this recipient",                          path, mu_errstring (status));
694                        name);              exit_code = EX_UNAVAILABLE;
695            exit_code = EX_QUOTA();              failed++;
696            failed++;            }
697          }          else if (sb.st_size > n)
698        break;            {
699      }              mailer_err ("%s: message would exceed maximum mailbox size for this recipient",
700                            name);
701                exit_code = EX_QUOTA();
702                failed++;
703              }
704            break;
705          }
706      }
707  #endif  #endif
708        
709    if (!failed && switch_user_id (auth, 1) == 0)    if (!failed && switch_user_id (auth, 1) == 0)

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26