Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

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.

share|improve this answer

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.

share|improve this answer

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!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.