我有FreeBSD 10.2,我正在使用几个Jail,其中一个安装了Postfix。
我希望我的其他监狱和我的主机系统在Jail中使用本地Postfix安装。 他们应该使用sendmail将邮件提交给Postfix Jail。
在其他Jail和Host中适当的设置是什么?
我已经可以发送来自Postfix监狱和主机的邮件。
在Host中我已经在/etc/mail/mailertable
:
xxx.yy smtp:mail.xxx.yy *.xxx.yy smtp:mail.xxx.yy
我也有一个/etc/mail/sendmail.mc
(我不确定是否真的需要它,如果它是正确的)在主机上:
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl OSTYPE(freebsd6)dnl DOMAIN(generic)dnl FEATURE(access_db, `hash -o -T<TMPF> /etc/mail/access')dnl FEATURE(blacklist_recipients)dnl FEATURE(local_lmtp)dnl FEATURE(mailertable, `hash -o /etc/mail/mailertable')dnl FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')dnl define(`SMART_HOST', `[10.0.0.3]')dnl define(`MAIL_HUB', `[10.0.0.3]')dnl MASQUERADE_AS(`xxx.yy')dnl FEATURE(`masquerade_envelope')dnl GENERICS_DOMAIN(host.xxx.yy HOST)dnl FEATURE(genericstable)dnl define(`confCW_FILE', `-o /etc/mail/local-host-names')dnl DAEMON_OPTIONS(`Name=IPv4, Family=inet')dnl define(`confBIND_OPTS', `WorkAroundBrokenAAAA')dnl define(`confNO_RCPT_ACTION', `add-to-undisclosed')dnl define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')dnl define(`confDONT_PROBE_INTERFACES',`True')dnl define(`confDEF_CHAR_SET',`ISO-8859-1')dnl MAILER(local)dnl MAILER(smtp)dml
在监狱中,我在rc.conf
设置了sendmail_enable="NO"
但是,当我试图从监狱发送电子邮件时,我得到:
Jan 5 12:54:52 push sendmail[83676]: u05BsqB6083676: from=root, size=55, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost Jan 5 12:54:52 push sm-mta[83677]: STARTTLS=server, relay=push [10.0.0.12], version=TLSv1/SSLv3, verify=NO, cipher=DHE-RSA-AES256-GCM-SHA384, bits=256/256 Jan 5 12:54:52 push sendmail[83676]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-GCM-SHA384, bits=256/256 Jan 5 12:54:52 push sm-mta[83677]: u05Bsq42083677: from=<[email protected]>, size=404, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=Daemon0, relay=push [10.0.0.12] Jan 5 12:54:52 push sendmail[83676]: u05BsqB6083676: [email protected], ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30055, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (u05Bsq42083677 Message accepted for delivery) Jan 5 12:54:52 push sm-mta[83679]: u05Bsq42083677: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=30404, relay=mail.xxx.yy. [XX.XX.XX.XX], dsn=4.0.0, stat=Deferred: Connection refused by mail.xxx.yy.
在后缀监狱我没有得到任何关于这个日志。
修复你的Postfix监狱。 没有日志本身就是一个错误。
另外你的日志说, Connection refused by mail.xxx.yy
– 所以你的中继设置似乎工作,但你不能连接到Postfix。 也许它不绑定到正确的IP?