我在CentOs 6.4中配置了sendmail。使用当前配置我可以发送邮件,但问题是@ domain.com等地址。
我的情况是这样的。 服务器1:xyz.com(包含http,域面板也指向此) 服务器2:test.xyz.com(包含sendmail配置)
此域名面板中分配了此xyz.com,并为test.xyz.com创建了一条记录。现在我在服务器2中配置了sendmail,它可以在外面发送所有邮件,但是当我使用user@xyz.com这样的地址时,它会在本地发送该邮件。实际上我已经设置了谷歌邮件服务器的地址,如@ xyz.com,并为此添加了所需的MX记录。
我想将所有邮件从服务器2发送到我的谷歌服务器。请帮我解决这个问题。我也很感激你。
我的sendmail.mc是,
divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
define(`SMART_HOST', `mailout.serverpronto.com')dnl
define(`confDEF_USER_ID', ``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
define(`confTO_IDENT', `0')dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
FEATURE(`accept_unresolvable_domains')dnl
MASQUERADE_AS(`xyz.com')dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(xyz.com)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
define(`MAIL_HUB', `xyz.com')dnl
define(`LOCAL_RELAY', `xyz.com.')dnl
答案 0 :(得分:0)
I spent a lot of time on this, but these two lines did it for me in the end. Can it be that you have dot (.) in your LOCAL_RELAY argument?
define(`MAIL_HUB', `xyz.com')dnl
define(`LOCAL_RELAY', `xyz.com')dnl
Update. So it seems that you properly have to masquerade your domain.
I think this means that you should have:
MASQUERADE_AS(`xyz.com')
and
MASQUERADE_DOMAIN(`test.xyz.com')
Play around a little with all these options and see what happens.
答案 1 :(得分:0)
通常情况下,您的服务器会指向某个域名,因此当您将任何邮件发送到@ domain.com的地址时,它始终是一个问题,它会在本地提供。