nginx 로 sendmail 을 전송 하여 메 일 을 보 냅 니 다.

3857 단어 시스템 - linux
수요: 오늘 내부 망 에 설 치 된 zabbix 를 만 났 습 니 다. 인터넷 이 통 하지 않 기 때문에 경보 메 일 을 보 낼 수 없습니다. 경보 메 일 을 외부 메 일 로 보 내 는 것 을 해결 해 야 합 니 다.솔 루 션: 인터넷 에 접근 하고 zabbix 를 연결 할 수 있 는 호스트 를 찾 아 nginx 를 설치 하여 메 일 리 트 윗 을 합 니 다.
zabbix 에서 파일 을 편집 하 는 내용 은 다음 과 같 습 니 다. vi / etc / mail. rc
This is the configuration file for Heirloom mailx (formerly
known under the name "nail".
See mailx(1) for further options.
This file is not overwritten when 'make install' is run in
the mailx build process again.
Sccsid @(#)nail.rc 2.11 (gritter) 8/2/08
Do not forward to mbox by default since this is likely to be
irritating for most users today.
set hold
Append rather than prepend when writing to mbox automatically.
This has no effect unless 'hold' is unset again.
set append
Ask for a message subject.
set ask
Assume a CRT-like terminal and invoke a pager.
set crt
Messages may be terminated by a dot.
set dot
Do not remove empty mail folders in the spool directory.
This may be relevant for privacy since other users could
otherwise create them with different permissions.
set keep
Do not remove empty private mail folders.
set emptybox
Quote the original message in replies by "> " as usual on the Internet.
set indentprefix="> "
Automatically quote the text of the message that is responded to.
set quote
Outgoing messages are sent in ISO-8859-1 if all their characters are
representable in it, otherwise in UTF-8.
set sendcharsets=iso-8859-1,utf-8
Display sender's real names in header summaries.
set showname
Display the recipients of messages sent by the user himself in
header summaries.
set showto
Automatically check for new messages at each prompt, but avoid polling
of IMAP servers or maildir folders.
set newmail=nopoll
If threaded mode is activated, automatically collapse thread.
set autocollapse
Mark messages that have been answered.
set markanswered
Hide some header fields which are uninteresting for most human readers.
ignore received in-reply-to message-id referencesignore mime-version content-transfer-encoding
Only include selected header fields when forwarding messages.
fwdretain subject date from to
For Linux and BSD, this should be set.
set bsdcompat \ # set sendcarsets = iso - 8859 - 1, utf - 8set from = 보 내 는 사람 set smtp = 192.168.119.150 set smtp - auth - user = 메 일 사용자 이름 set smtp - auth - password = 암호 set smtp - auth = login
Nginx 프로필 편집 은 다음 과 같 습 니 다.
For more information on configuration, see:
* Official English Documentation: http://nginx.org/en/docs/
* Official Russian Documentation: http://nginx.org/ru/docs/
worker_processes 1;
Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {worker_connections 1024;}
stream {upstream mailsmtp_pro {server smtp.qiye.163.com:25;}
server {listen 25;proxy_connect_timeout 5s;proxy_timeout 5s;proxy_pass mailsmtp_pro;}}
http {log_format main '$remote_addr - $remote_user [$time_local] "$request" ''$status $body_bytes_sent "$http_referer" ''"$http_user_agent" "$http_x_forwarded_for"';
sendfile            on;
tcp_nopush          on;
tcp_nodelay         on;
keepalive_timeout   65;
types_hash_max_size 2048;

default_type        application/octet-stream;

include /etc/nginx/conf.d/*.conf;

server {
listen 8800;listen 443 ssl;
 location / {
    proxy_pass  https://qyapi.weixin.qq.com;

}}}
zabbix 서버 에서 인증:
echo hello word | mail -s "zabbix ceshi" [email protected]

좋은 웹페이지 즐겨찾기