Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Webmaster Newbie Question

I have a low end vps (128MB RAM)running on Debian.I used a bash script by ilevkov to setup the site. After some trial and error, I managed to set up a WordPress on it. Just now I found out that my VPS can't send any email. I tested using the WordPress reset password email, and it shows

The e-mail could not be sent. Possible reason: your host may have disabled the mail() function...

After some Google session I noticed that I can send email from ssh. So I tried

mail myemail@gmail.com
Subject: Halo dion
some message
.

and the result said

EOT
/usr/lib/sendmail: No such file or directory
"/root/dead.letter" 9/243
. . . message not sent.

The question

How can I fix my VPS mail setting?

share|improve this question
    
Who is your host and do you have root access? –  ionFish Nov 2 '12 at 13:54
    
I host my VPS in a local Indonesian hosting provider. I do have root access. –  ifdion Nov 2 '12 at 22:19
add comment

4 Answers

From the script's readme file:

"Remove excess packages (apache2, sendmail, bind9, samba, nscd, etc) and install the basic components needed for a light-weight HTTP(S) web server..."

So this is your problem. You need to install those packages again, especially sendmail.

share|improve this answer
    
Isn't exim4 is a replacement for sendmail? –  ifdion Nov 2 '12 at 22:19
add comment

I’ve checked it again, should work out of the box.

In case it doesn’t:

There is also a new version of lowendscript made by Xeoncross - https://github.com/Xeoncross/lowendscript

share|improve this answer
    
Thank you very much @ILevkov . You are right, there is no problem at all with your script. The problem was actually the pre configured exim4 setup. –  ifdion Nov 3 '12 at 16:11
add comment

I figured it out. The problem is not in the bash script by @ILevkov, but on the exim4 pre configuration. Since exim4 is already installed, it isn't being re configured by the script. At least that's what I thought . Please correct me I'm wrong

All I have to do is to remove the previos exim4

apt-get purge exim4

And then reinstall using @Ilevkov well written bash script

bash setup-debian.sh exim4

Thank you all for your time.

share|improve this answer
add comment

You'll probably need to configure a mail server which is more complicated than using a bash script. You can do that following these instructions http://www.youtube.com/watch?v=dKO4MfOpDVs or setup a plugin in WordPress http://wordpress.org/extend/plugins/wp-mail-smtp/ which you can then configure with an SMTP server. This is the better option in my opinion because if your mail server isn't configured properly your emails from the server will be flagged as spam. So if you have gmail or another email account (zoho.com) provides free email accounts with your domain. Setup the WordPress plugin and use an SMTP server. Then you'll be good to go

share|improve this answer
    
Will give it a try. How about the limitation? Is there a maximum number of email sent daily? Actually almost all of my websites uses Google Apps for their email. If I use another SMTP server (e.g Google Apps), will it reduce my server load (on action that send an email or 2)? If so, than it will be a good news for me :D. –  ifdion Nov 4 '12 at 2:35
    
You'll have to contact Zoho about any mail sending limits. Though if you're not spamming you should be ok. –  Anagio Nov 4 '12 at 4:41
add comment

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.