In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "how to use Nginx TCP reverse agent as mail mail agent". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Background
The new version of nginx has TCP reverse proxy function, and the mail proxy configuration authentication of nginx is too troublesome, so I want to use TCP reverse function as mail proxy.
2. Nginx installation (including nginx_upstream_check_module)
Cd / tmp tar zxf pcre-8.35.tar.gz cd pcre-8.35/. / configure-- prefix=/usr/local/pcre make make install cd / tmp tar zxf openssl-1.0.2g.tar.gz cd openssl-1.0.2g/. / config enable-tl***t make make install mv-f / usr/bin/openssl / usr/bin/openssl.old mv-f / usr/include/openssl / usr/include/openssl.old ln-sf / usr/local/ssl/ Bin/openssl / usr/bin/openssl ln-sf / usr/local/ssl/include/openssl / usr/include/openssl cd / tmp git clone git@github.com:yaoweibin/nginx_upstream_check_module.git cd / tmp tar zxf nginx-1.13.4.tar.gz cd nginx-1.13.4/ patch-p1 <.. / nginx_upstream_check_module/check_1.12.1+.patch. / configure-- user=www-- group=www-- prefix=/usr/local/nginx-- with -http_stub_status_module-with-stream=dynamic-with-stream_ssl_module-with-pcre=../pcre-8.35-with-http_ssl_module-with-openssl=../openssl-1.0.2g-add-module=../nginx_upstream_check_module make make install
3. Nginx configuration
Cat nginx.conf user www; worker_processes 8; error_log logs/info.log info; # pid logs/nginx.pid; load_module modules/ngx_stream_module.so; # add the module events {worker_connections 1024;} http {include mime.types; default_type application/octet-stream here # log_format main'$remote_addr-$remote_user [$time_local] "$request" #'$status $body_bytes_sent "$http_referer" # "$http_user_agent" $http_x_forwarded_for "; # access_log logs/access.log main; sendfile on; # tcp_nopush on; # keepalive_timeout 0 Keepalive_timeout 65; # gzip on; # set request buffer server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 300m; # sendfile on; tcp_nopush on; # keepalive_timeout 60; tcp_nodelay on; server_tokens off; client_body_buffer_size 512k Proxy_connect_timeout 20; proxy_send_timeout 60; proxy_read_timeout 20; proxy_buffer_size 16k; proxy_buffers 4 64k; proxy_busy_buffers_size 128k; proxy_temp_file_write_size 128k; client_header_timeout 3m; client_body_timeout 3m; send_timeout 3m; gzip on # enable gzip to save bandwidth gzip_min_length 1100; gzip_buffers 48k; gzip_types text/plain text/css application/x-javascript image/bmp application/javascript; output_buffers 1.32k; postpone_output 1460; limit_rate_after 3mbot # Speed limit module, no speed limit limit_rate 512k when downloading the first 3m; # Speed limit module include vhost/*.conf } stream {include stream/*.conf;} cat stream/mail_pro.conf # TCP reverse proxy load balancer Settings # upstream mailsmtp_pro {server smtp.mxhichina.com:25;} server {listen 25; # external service TCP listening proxy_connect_timeout 5s; proxy_timeout 5s; proxy_pass mailsmtp_pro } "how to use Nginx TCP reverse Agent as mail Mail Agent" ends here. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.