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 |
} |
} |
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) |
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) |