更改Exim4 www-data用户(Ubuntu)

如何更改Exim4的发送邮件的默认用户? 我讨厌www数据的事情。 当我尝试发送邮件给某些人时,我得到这个错误(在/ var / log / exim4 / mainlog中find):

2011-04-24 01:10:54 1QDraw-0001mS-QS <= [email protected] U=www-data P=local S=385 2011-04-24 01:10:55 1QDraw-0001mS-QS ** [email protected] R=dnslookup T=remote_smtp: SMTP error from remote mail server after RCPT TO:<[email protected]>: host receiverdomain.com [66.147.242.169]: 550-Verification failed for <[email protected]>\n550-The mail server could not deliver mail to [email protected]. The account or domain may not exist, they may be blacklisted, or missing the proper dns entries.\n550 Sender verify failed 2011-04-24 01:10:55 1QDrax-0001mW-Gk <= <> R=1QDraw-0001mS-QS U=Debian-exim P=local S=1536 2011-04-24 01:10:55 1QDraw-0001mS-QS Completed 2011-04-24 01:10:55 1QDrax-0001mW-Gk => www-data <[email protected]> R=local_user T=mail_spool 2011-04-24 01:10:55 1QDrax-0001mW-Gk Completed 

这是超级烦人的。 我可以发送邮件到Gmail和雅虎用户,但不是其他邮件提供商,因为我得到的错误。 我怎样才能解决这个问题?

您似乎通过/usr/sbin/sendmail接口从您的web服务器用户帐户(www-data)发送电子邮件,但是您的系统不接受此地址的电子邮件([email protected]),因此此地址失败接收服务器上的“发件人validation”。

你有两个select。 首先 – 启用万维网数据帐户接收来自外部系统的消息。 其次 – 通过使用/usr/sbin/sendmail -f选项,将信封发件人地址从www-data更改为不同的信息。

有时候,Web应用程序有一个configuration选项来与SMTP通信而不是sendmail或者php mail(),如果你的应用程序有这个选项的话,尝试使用它。 如果不可能,则使用-f选项设置信封发件人地址。

你可以改变文件passwd 。 文件: /etc/passwd

线:

WWW的数据:X:33:1002:WWW的数据:/无功/networking:/ bin / sh的

对于:

WWW的数据:X:33:1002:YOUNAME:/无功/networking:/ bin / sh的

这个解决scheme为我解决了!