Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Mar 03, 2009 10:10 pm 
Offline
Newbie

Joined: Sun Feb 08, 2009 5:59 pm
Posts: 2
I have multiple domains. I have Gmail to send and receive mail for each domain. How do I configure Postfix to simply send the contents of a php mail script to info@domain1.com, info@domain2.com, and so on? I'm using Ubuntu. There has to be an easy but secure way. Thanks very much.

_________________
chowell


Top
   
 Post subject:
PostPosted: Wed Mar 04, 2009 9:22 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
This document covers setting up Postfix as a "null client" (send-only server). Another discusses client authentication.

Once configured you can feed a message (with To: and Subject: headers) to 'sendmail -t' to test it. If that works, PHP should be able to send mail.


Top
   
 Post subject:
PostPosted: Wed Mar 04, 2009 2:40 pm 
Offline
Senior Member

Joined: Fri Dec 07, 2007 1:37 am
Posts: 385
Location: NC, USA
Postfix may be overkill for what you are doing - something like ssmtp might do all you need:

http://packages.ubuntu.com/hardy/ssmtp


Top
   
 Post subject: thanks for the help
PostPosted: Thu Mar 05, 2009 9:20 am 
Offline
Newbie

Joined: Sun Feb 08, 2009 5:59 pm
Posts: 2
Thanks for responding to my question. I've gotten Postfix to work. But I'll be looking at the ssmpt solution to see if that's a better fit.

I do appreciate the answers and the help.

_________________
chowell


Top
   
 Post subject:
PostPosted: Thu Mar 05, 2009 9:52 am 
Offline
Junior Member
User avatar

Joined: Mon Mar 02, 2009 10:45 pm
Posts: 38
I've got mine set up so that php uses msmtp to send mail through Google via TLS. I used the following guide to set that up:

http://nanotux.com/blog/the-ultimate-server/4/#l-mail

The only problem I had was that no matter how many times I changed php.ini, php just wouldn't take my sendmail override. The phpinfo() function said that it was using the ini I was editing, but it just wouldn't take. I think I restarted lighttpd a million times.

So finally I just set up a symbolic link where php wanted to use sendmail to point to msmtp. It's none the wiser.

It works well, but it is a little slow. Whenever a user leaves a comment there is a noticeable delay while it connects securely to google and sends the mail.

It's not an unbearable delay, but it's slower than the rest of my site.

.


Top
   
 Post subject:
PostPosted: Fri Mar 06, 2009 3:27 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
Another gotcha with ssmtp besides the one Lykaon noted is that while the generic PHP mail function pipes messages to sendmail, some software (I'm looking at you, PunBB) does not and expects to contact an SMTP server. If whatever you are using is this way, ssmtp won't help (guess how I discovered this!). On the other hand, if what you're using supports SMTP authentication, you might be able to configure it to contact Gmail directly and cut out the middleman.

But if you can live with these, ssmtp (or msmtp) do the job just fine and are simpler to set up than a full MTA.


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


Who is online

Users browsing this forum: No registered users and 2 guests


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