comparison src/mail/ngx_mail_handler.c @ 404:481e8f936572

Mail: rename "unauth" to "none".
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 23 Jul 2007 23:30:01 +0000
parents d4cac61d8e95
children 52b28d322d76
comparison
equal deleted inserted replaced
403:d4cac61d8e95 404:481e8f936572
1725 case NGX_SMTP_MAIL: 1725 case NGX_SMTP_MAIL:
1726 cscf = ngx_mail_get_module_srv_conf(s, ngx_mail_core_module); 1726 cscf = ngx_mail_get_module_srv_conf(s, ngx_mail_core_module);
1727 1727
1728 if (s->connection->log->log_level >= NGX_LOG_INFO 1728 if (s->connection->log->log_level >= NGX_LOG_INFO
1729 || (cscf->smtp_auth_methods 1729 || (cscf->smtp_auth_methods
1730 & NGX_MAIL_AUTH_UNAUTH_ENABLED)) 1730 & NGX_MAIL_AUTH_NONE_ENABLED))
1731 { 1731 {
1732 l.len = s->buffer->last - s->buffer->start; 1732 l.len = s->buffer->last - s->buffer->start;
1733 l.data = s->buffer->start; 1733 l.data = s->buffer->start;
1734 1734
1735 for (i = 0; i < l.len; i++) { 1735 for (i = 0; i < l.len; i++) {
1751 } 1751 }
1752 1752
1753 l.len = i; 1753 l.len = i;
1754 1754
1755 if (!(cscf->smtp_auth_methods 1755 if (!(cscf->smtp_auth_methods
1756 & NGX_MAIL_AUTH_UNAUTH_ENABLED)) 1756 & NGX_MAIL_AUTH_NONE_ENABLED))
1757 { 1757 {
1758 ngx_log_error(NGX_LOG_INFO, s->connection->log, 0, 1758 ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
1759 "client was rejected: \"%V\"", &l); 1759 "client was rejected: \"%V\"", &l);
1760 } 1760 }
1761 1761
1762 } 1762 }
1763 1763
1764 if (!(cscf->smtp_auth_methods & NGX_MAIL_AUTH_UNAUTH_ENABLED)) 1764 if (!(cscf->smtp_auth_methods & NGX_MAIL_AUTH_NONE_ENABLED))
1765 { 1765 {
1766 text = smtp_auth_required; 1766 text = smtp_auth_required;
1767 size = sizeof(smtp_auth_required) - 1; 1767 size = sizeof(smtp_auth_required) - 1;
1768 break; 1768 break;
1769 } 1769 }
1770 1770
1771 /* allow unauth */ 1771 /* auth none */
1772 1772
1773 if (s->smtp_from.len) { 1773 if (s->smtp_from.len) {
1774 text = smtp_bad_sequence; 1774 text = smtp_bad_sequence;
1775 size = sizeof(smtp_bad_sequence) - 1; 1775 size = sizeof(smtp_bad_sequence) - 1;
1776 break; 1776 break;
1829 return; 1829 return;
1830 } 1830 }
1831 1831
1832 ngx_memcpy(s->smtp_to.data, l.data, l.len); 1832 ngx_memcpy(s->smtp_to.data, l.data, l.len);
1833 1833
1834 s->auth_method = NGX_MAIL_AUTH_UNAUTH; 1834 s->auth_method = NGX_MAIL_AUTH_NONE;
1835 1835
1836 ngx_mail_do_auth(s); 1836 ngx_mail_do_auth(s);
1837 return; 1837 return;
1838 1838
1839 case NGX_SMTP_NOOP: 1839 case NGX_SMTP_NOOP: