0

I have the symbolic link setup for /usr/sbin/sendmail which points to my exim directory /usr/sbin/exim4/ and my php.ini pointing to /usr/sbin/sendmail. My mail isn't sending. I don't know what to do, but when I tried to reconfigure, it just shows the gui and goes straight to the next bash line with twomuchwork:~# 1;2c1;2c1;2c.

Update: I checked my iptables to make sure 25 was open. I think it might have something to do with google apps. At this point, I just want to be able to use Google apps and send mail using PHP's mail(). I have some web applications that requires the mail(). I even tried this post: How to Setup Ubuntu Mail Server with Google Apps?

Update2: I tried almost everything out there. I tried setting up exim4 as smarthost, I tried sendmail, everything works when I send a e-mail to my @gmail.com from terminal, but I still cannot get my PHP mail() to work.

Strawberry
  • 1,162

3 Answers3

1

Interesting, dialog appears to be broken on your system for some reason. Try

dpkg-reconfigure -freadline exim4-config

Can you send email from the terminal (eg mail foo@example.com -s "subject goes here" then entering an email body ending with a . on a line by itself)? Is /usr/sbin/sendmail/ a typo, or do you really have a / on the end, because that shouldn't be there.

DerfK
  • 19,826
0

You seem to think this problem is in some way related to PHP. IME that's very rarely the case, but you've not provided any details of how your php is configured for mail.

It works when I send it from the terminal, but not from php

Can you provide a transcript showing how you sent it from the CLI. Also the permissions for the binary. What happens when you replicate the CLI commands using popen() in php?

symcbean
  • 23,767
  • 2
  • 38
  • 58
0

If the machine is not supposed to receive incoming email try to install nullmailer:

# apt-get install nullmailer
# dpkg-reconfigure nullmailer

This is not a solution to your problem, especially if the machine is supposed to receive mail too. But it is an effort to walk around it.

adamo
  • 7,045