Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: и снова вопрос про mail в nginx
- To: nginx-ru@xxxxxxxxx
- Subject: Re: и снова вопрос про mail в nginx
- From: Vasiliy Tolstov <v.tolstov@xxxxxxxxx>
- Date: Tue, 10 Mar 2009 12:54:57 +0300
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=dk; d=selfip.ru; h=Received:Subject:From:Reply-To:To:In-Reply-To:References:Content-Type:Organization:Date:Message-Id:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=rGH2BGHZIUhl+85Yd90rWx1L3865oqjDdTyfcqrs4PxCecU5S2K3g2cqkoBgkxGnf20NBjSmJqnbyjy3J0J6+6XTlKdWclbegKWsgkq7HhmJyGR1gjFOLqnhY96XNnUPZFk3LTbHYYD9jnsWlfY6xbRE46Gk0+Y44uZM6dqC50Q=;
- In-reply-to: <1236677847.13281.12.camel@vase>
- Organization: Selfip.Ru
- References: <1236677847.13281.12.camel@vase>
В Втр, 10/03/2009 в 12:37 +0300, Vasiliy Tolstov пишет:
> Добрый день. Есть конфиг nginx вида
> user www-data;
> worker_processes 1;
>
> error_log /var/log/nginx/error.log;
> pid /var/run/nginx.pid;
>
> events {
> worker_connections 1024;
> }
>
> mail {
> server_name mail.localhost;
> proxy_pass_error_message on;
> xclient off;
> server {
> listen 127.0.0.3:25;
> protocol smtp;
> timeout 300s;
> auth_http none;
> }
> }
> nginx -t говорит
> 2009/03/10 09:24:56 [emerg] 3653#0: host not found in auth_http "none"
> in /etc/nginx/nginx.conf:19
> 2009/03/10 09:24:56 [emerg] 3653#0: the configuration
> file /etc/nginx/nginx.conf test failed
>
> Ошибка происходит при парсинге auth_http none;
>
> nginx version: nginx/0.7.38
> built by gcc 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
> configure arguments: --prefix=/usr --conf-path=/etc/nginx/nginx.conf
> --http-log-path=/var/log/nginx/access_log
> --error-log-path=/var/log/nginx/error_log --pid-path=/var/run/nginx.pid
> --without-http --with-sha1-asm --with-sha1=/usr/include --with-md5-asm
> --with-md5=/usr/include --with-mail --with-mail_ssl_module
>
>
> mail.localhost кузолвится в 127.0.0.3 в чем может быть проблема?
>
свою проблему понял, но возник другой вопрос, почему в случае конфига,
приведенного ниже, нет ошибки при nginx -t ?
user nginx users;
worker_processes 1;
error_log /var/log/nginx/error_log warn;
events {
worker_connections 100000;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main
'$remote_addr - $remote_user [$time_local] $request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"
"$uri?$args"'
' $request_time';
client_header_timeout 60;
client_body_timeout 60;
send_timeout 60;
connection_pool_size 4k;
client_header_buffer_size 16k;
large_client_header_buffers 32 16k;
request_pool_size 8k;
client_max_body_size 20m;
gzip on;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_types text/plain;
output_buffers 1 32k;
postpone_output 1460;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 35;
ignore_invalid_headers on;
#rewrite_log on;
access_log /var/log/nginx/access_log main;
msie_padding on;
msie_refresh on;
proxy_buffer_size 8k;
proxy_buffering on;
proxy_buffers 8 32k;
fastcgi_buffer_size 16k;
fastcgi_buffers 8 32k;
fastcgi_busy_buffers_size 32k;
fastcgi_temp_file_write_size 32k;
fastcgi_connect_timeout 600;
fastcgi_send_timeout 600;
fastcgi_read_timeout 600;
open_file_cache max=500 inactive=30s;
open_file_cache_valid 60s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
proxy_pass_header Date;
limit_zone one $binary_remote_addr 10m;
server_names_hash_bucket_size 128;
ssl off;
ssl_certificate /etc/ssl/nginx/nginx.pem;
ssl_certificate_key /etc/ssl/nginx/nginx.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
geo $not_allowed {
default 0;
include not_allowed;
192.168.0.0/16 0;
}
server {
listen 127.0.0.1;
server_name localhost;
access_log off;
location = /stub_status {
stub_status on;
allow 127.0.0.0/8;
deny all;
}
location = /cache_status {
cache_status on;
allow 127.0.0.0/8;
deny all;
}
location / { deny all; }
}
include vhosts/*;
}
mail {
server_name mail.selfip.ru;
# auth_http http://mail.selfip.ru/mail-auth.php;
imap_capabilities "IMAP4rev1" "SASL-IR" "SORT" "THREAD=REFERENCES"
"MULTIAPPEND" "UNSELECT" "LITERAL+" "IDLE" "CHILDREN" "NAMESPACE"
"LOGIN-REFERRALS" "UIDPLUS" "LIST-EXTENDED" "I18NLEVEL=1" "QUOTA"
"STARTTLS" "LOGINDISABLED" "AUTH=DIGEST-MD5" "AUTH=CRAM-MD5";
smtp_auth login plain cram-md5;
smtp_capabilities "SIZE 10485760" "PIPELINING" "8BITMIME";
auth_http_header X-Auth-Key "secret_string";
proxy_pass_error_message on;
xclient off;
server {
listen 77.221.143.26:25;
listen 77.221.143.26:587;
listen 77.221.143.26:465;
protocol smtp;
auth_http none;
timeout 300s;
}
server {
listen 77.221.143.26:143;
listen 77.221.143.26:993;
protocol imap;
auth_http http://mail.selfip.ru/mail-auth.php;
}
}
--
Vasiliy Tolstov <v.tolstov@xxxxxxxxx>
Selfip.Ru
|