Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: sendmail help
PostPosted: Mon Jan 05, 2009 8:48 pm 
Offline
Senior Newbie

Joined: Mon Jun 30, 2008 4:39 pm
Posts: 15
Website: http://www.thezach.net
Location: Kalamazoo, MI
I'm trying to get sendmail set up in my debian install. I used Apt to install Apache and PHP - how would I use to to install sendmail and incorporate it into PHP?


Top
   
 Post subject:
PostPosted: Mon Jan 05, 2009 9:06 pm 
Offline
Senior Member

Joined: Sun Nov 14, 2004 6:37 pm
Posts: 138
Website: http://oldos.org
WLM: jasonlfaulkner@hotmail.com
Yahoo Messenger: jasonfncsu
AOL: jaylfaulkner
Location: NC, USA
Why in the world are you punishing yourself with sendmail?

_________________
Jay Faulkner
http://oldos.org


Top
   
 Post subject:
PostPosted: Mon Jan 05, 2009 9:23 pm 
Offline
Senior Newbie

Joined: Mon Jun 30, 2008 4:39 pm
Posts: 15
Website: http://www.thezach.net
Location: Kalamazoo, MI
Well what other options are available?


Top
   
 Post subject:
PostPosted: Mon Jan 05, 2009 9:37 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
TheZach wrote:
Well what other options are available?


If you're using the Debian disk image from Linode, you probably already have exim4 installed.

Or you can install postfix, currently the most popular MTA.

apt-get install postfix


Top
   
 Post subject:
PostPosted: Mon Jan 05, 2009 10:02 pm 
Offline
Senior Newbie

Joined: Mon Jun 30, 2008 4:39 pm
Posts: 15
Website: http://www.thezach.net
Location: Kalamazoo, MI
Whats MTA mean?

And if I have exim4 how would I tell? And if so how would I incorporate it into my PHP?


Top
   
 Post subject:
PostPosted: Mon Jan 05, 2009 11:57 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
MTA means mail transfer agent. It's a program that takes care of receiving and sending emails to and from your server. Sendmail, exim4, postfix, etc. are different kinds of MTA's. You only need one of them.

In order to tell if exim4 (or postfix, or anything else) is installed, try

apt-get install exim4

If it tells you that exim4 is already installed, then it is. If not, the command above will automatically install it for you. Same goes for sendmail/postfix/etc. Just replace the last word with the name of the program you want to install.

What do you mean, incorporating mail into PHP? If you mean sending welcome emails, password reminders, etc. from your blog/forum software, all you need to do is to install the MTA, and PHP takes care of the rest. There's no need to manually put the two together. On Debian, these things just work out of the box.

If you do install an MTA on your server, and you're only going to use it for sending emails from PHP, you must make sure that your port 25 is unreachable from the outside. Otherwise, bad people could send spam using your server!


Top
   
 Post subject:
PostPosted: Wed Jan 07, 2009 11:06 am 
Offline
Senior Newbie

Joined: Mon Jun 30, 2008 4:39 pm
Posts: 15
Website: http://www.thezach.net
Location: Kalamazoo, MI
I installed exim4 and PHP still wont send emails


Top
   
 Post subject:
PostPosted: Wed Jan 07, 2009 11:24 am 
Offline
Junior Member

Joined: Fri Aug 29, 2008 10:43 pm
Posts: 32
Website: http://digitaldeviation.com
Location: Ohio
Did you update sendmail_path in your php.ini? it points to /usr/sbin/sendmail by default.

The simple fix is to create a symbolic link.
ln -s /usr/sbin/sendmail /usr/sbin/exim
Then you won't need to update the php.ini. I'm guessing on the exim binary path as I don't use exim.

_________________
Digital Deviation - http://digitaldeviation.com


Top
   
 Post subject:
PostPosted: Wed Jan 07, 2009 11:34 am 
Offline
Senior Member
User avatar

Joined: Sat Oct 16, 2004 11:13 am
Posts: 176
Deviation wrote:
Did you update sendmail_path in your php.ini? it points to /usr/sbin/sendmail by default.

The simple fix is to create a symbolic link.
ln -s /usr/sbin/sendmail /usr/sbin/exim
Then you won't need to update the php.ini. I'm guessing on the exim binary path as I don't use exim.


exim4 already has '/usr/sbin/sendmail' - all MTA packages install it for compatibility reasons.

Quote:
I installed exim4 and PHP still wont send emails


Heard of a log report? What errors, etc. You may need to enable debugging in your PHP script.


Top
   
 Post subject:
PostPosted: Wed Jan 07, 2009 11:58 am 
Offline
Senior Newbie

Joined: Mon Jun 30, 2008 4:39 pm
Posts: 15
Website: http://www.thezach.net
Location: Kalamazoo, MI
Code:
2009-01-07 09:01:22 1LKYyI-0007b9-Te <= www-data@TheZach.net U=www-data P=local S=1346 id=05a98ca99f5fc7b4c93ba89d2d29d9df@www.aspieweb.net
2009-01-07 09:01:23 1LKYyI-0007b9-Te ** zach@thezach.net: Unrouteable address
2009-01-07 09:01:23 1LKYyJ-0007bB-2q <= <> R=1LKYyI-0007b9-Te U=Debian-exim P=local S=2175
2009-01-07 09:01:23 1LKYyI-0007b9-Te Completed
2009-01-07 09:01:23 1LKYyJ-0007bB-2q => www-data <www-data@TheZach.net> R=local_user T=mail_spool
2009-01-07 09:01:23 1LKYyJ-0007bB-2q Completed


Top
   
 Post subject:
PostPosted: Wed Jan 07, 2009 12:47 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
So you're trying to send an email to zach@thezach.net, and exim is telling you that it has no idea where to send that email.

1. The public DNS records for thezach.net shows that the one and only MX record for your domain thezach.net is smtp.digitalexample.net. Is this the email hosting company that you're using? If so, is smtp.digitalexample.net the correct MX record to be using?

2. Does your server think that its hostname is thezach.net? The first line of your log suggests that it does. In that case, exim will think that zach@thezach.net is a local email address. It will try to deliver the email to the mailbox of a local user named zach. Not what you want! (I'm assuming that you don't want to use your Linode to read emails, since you're outsourcing your email to another company.) Change your hostname to a subdomain and try again. You'll also need to go through exim's configuration files to update the hostname.


Top
   
 Post subject:
PostPosted: Wed Jan 07, 2009 1:05 pm 
Offline
Junior Member

Joined: Fri Aug 29, 2008 10:43 pm
Posts: 32
Website: http://digitaldeviation.com
Location: Ohio
If it helps, this was his original request: http://www.linode.com/forums/viewtopic.php?t=3791

Basically trying to forward email to his exchange servers.

_________________
Digital Deviation - http://digitaldeviation.com


Top
   
 Post subject:
PostPosted: Wed Jan 07, 2009 1:45 pm 
Offline
Senior Newbie

Joined: Mon Jun 30, 2008 4:39 pm
Posts: 15
Website: http://www.thezach.net
Location: Kalamazoo, MI
Ok, I changed my hostname to server1.thezach.net

The latest error:
Code:
2009-01-07 12:42:29 1LKcQH-0000Sc-7I <= www-data@server1.thezach.net U=www-data P=local S=574 id=589d4dd94ba4dea81bc209cb3634778d@www.aspieweb.net
2009-01-07 12:42:29 1LKcQH-0000Sc-7I smtp.digitalexample.com [69.51.128.242] Connection refused
2009-01-07 12:42:29 1LKcQH-0000Sc-7I ** zach@thezach.net R=dnslookup T=remote_smtp: SMTP error from remote mail server after HELO 127.0.0.1 localhost: host smtp.digitalexample.com [69.51.128.243]: 501 5.5.4$
2009-01-07 12:42:29 1LKcQH-0000Sf-Us <= <> R=1LKcQH-0000Sc-7I U=Debian-exim P=local S=1546
2009-01-07 12:42:30 1LKcQH-0000Sc-7I Completed
2009-01-07 12:42:30 1LKcQH-0000Sf-Us ** www-data@server1.thezach.net: Unrouteable address
2009-01-07 12:42:30 1LKcQH-0000Sf-Us Frozen (delivery error message)


Top
   
 Post subject:
PostPosted: Wed Jan 07, 2009 1:57 pm 
Offline
Junior Member

Joined: Fri Aug 29, 2008 10:43 pm
Posts: 32
Website: http://digitaldeviation.com
Location: Ohio
Looks like a DNS lookup issue. Do you have server1.thezach.net pointed to your linode's IP? Need a DNS entry in thezach.net zone for server1...

_________________
Digital Deviation - http://digitaldeviation.com


Top
   
 Post subject:
PostPosted: Wed Jan 07, 2009 3:41 pm 
Offline
Senior Member
User avatar

Joined: Sat Oct 16, 2004 11:13 am
Posts: 176
As Deviation said, your DNS is not setup correctly. See http://support.microsoft.com/kb/291828

Code:
$ dig server1.digitalexample.com

; <<>> DiG 9.3.4-P1.1 <<>> server1.digitalexample.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 61332
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;server1.digitalexample.com.    IN      A

;; AUTHORITY SECTION:
digitalexample.com.     3600    IN      SOA     cluster1node1.internal.digitalex
ample.com. adevries.digitalexample.com. 2006122165 900 600 3600 3600

;; Query time: 369 msec
;; SERVER: 207.192.69.5#53(207.192.69.5)
;; WHEN: Wed Jan  7 19:40:44 2009
;; MSG SIZE  rcvd: 112

i.e. the host can't be resolved


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group