2

How can I change Exim4's default user for sending mail? I hate the www-data thing. When I try sending mail to certain people I get this error (found in /var/log/exim4/mainlog):

2011-04-24 01:10:54 1QDraw-0001mS-QS <= www-data@mydomain.com U=www-data P=local S=385
2011-04-24 01:10:55 1QDraw-0001mS-QS ** trey@receiverdomain.com R=dnslookup T=remote_smtp: SMTP error from remote mail server after RCPT TO:<trey@receiverdomain.com>: host receiverdomain.com [66.147.242.169]: 550-Verification failed for <www-data@mydomain.com>\n550-The mail server could not deliver mail to www-data@mydomain.com.  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 <www-data@mydomain.com> R=local_user T=mail_spool
2011-04-24 01:10:55 1QDrax-0001mW-Gk Completed

This is super annoying. I can send mail to Gmail and Yahoo users but not other mail providers as I get that error. How can I fix this?

3 Answers3

2

You seems to be sending emails from your webserver user account (www-data) through /usr/sbin/sendmail interface but your system doesn't accept e-mails for this address (www-data@mydomain.com) so this address fails 'sender verification' on receiving server.

You have two options. First - enable www-data account to receive messages from external systems. Second - change envelope sender address from www-data to something different by using -f option for /usr/sbin/sendmail.

AlexD
  • 8,747
  • 2
  • 29
  • 38
0

Sometimes web applications have a configuration option to talk to SMTP instead of sendmail or php mail(), if your app has that option, try using that. If impossible, then set the envelope sender address with the -f option.

Tutul
  • 892
  • 6
  • 20
0

You can alter the file passwd. File: /etc/passwd

line:

www-data:x:33:1002:www-data:/var/www:/bin/sh

for:

www-data:x:33:1002:YOUNAME:/var/www:/bin/sh

This solution resolved it for me!

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209