configurationExim Sendmail进行中继

我在UltraHosting.com上有一个VPS服务器,并要求在发送电子邮件时使用“智能中继”。 但是我不能使用php mail()函数发送邮件。

以下是他们在智能中继上的文章:support.ultrahosting.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=142

显示的设置在我的Eximconfiguration中。

我也尝试configuration我的sendmail,这里build议http://support.ultrahosting.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=175&nav=0

但是我无法在我的centOS服务器上find我的sendmail.cg。 命令“whereis sendmail.cf”表示sendmail:/ usr / sbin / sendmail / usr / lib / sendmail

服务器正在使用cpanel和exim

我发送了以下支持票

如何configuration服务器使用PHP发送邮件。 我正在写一个脚本,将发送用户passwsord usigng PHP邮件function。 但是,发送的电子邮件从未交付。 这是否与“智能继电器”有关? 任何指导如何configuration这个?

回应是:

While we do not provide scripting support of any kind, if you simply 

确保智能主机在你的脚本中被硬编码(不需要authentication),电子邮件应该被转发。

 If your script uses the server's SMTP server to send out email, you'll 

必须确保MTAconfiguration为使用智能主机

任何人都可以请澄清我需要做什么来解决这个问题,所以我可以使用PHP的邮件function?

在您的exim config的路由器部分,您将有一个如下所示的路由器:

  lookuphost: driver = lookuphost transport = remote_smtp 

这是告诉exim直接发送邮件。 你需要告诉它使用智能主机。

用这样的东西replace上面的路由器:

  smarthost: driver = manualroute domains= ! +local_domains transport = remote_smtp route_list = * smtp.ultrahosting.com byname host_find_failed = defer no_more 

确保新路由器中的传输名称与原始传输名称相同(本例中为remote_smtp)。

此外,您需要在进行这些更改后重新启动exim。