0

My laptop running ubuntu.

I've just finished running:

sudo apt-get install php-pear
sudo pear install mail
sudo pear install Net_SMTP
sudo pear install Auth_SASL
sudo pear install mail_mime
sudo apt-get install postfix

and I choose "website" in the configuration instead of "localhost"

and then I send email to gmail. But the email still not arrived..

I dont know why this not works.

2
  • how are you sending email? What configuration option did you choose in Postfix (satellite, satellite with smarthost, local only)? Are you on an Internet connection that blocks outbound SMTP (TCP 25)?
    – gravyface
    May 23, 2011 at 14:56
  • I use Drupal and try registering new user. in the configuration option, I chose website (send and receive) - there is 4 option. I dont know about outbound SMTP. I will looking into it
    – Anonymous
    May 23, 2011 at 15:02

1 Answer 1

1

It sounds like you're setting up a local development environment on your laptop for Drupal.
If this is true, then there's a couple of ways you can go about this (note: I don't use Ubuntu Desktop very much besides Web surfing, so there may be point-and-click ways to achieve the following):

  • send all your test emails to a local account. You need to configure Postfix as 'local only' (if you run sudo dpkg-reconfigure postfix it'll ask you again how you want to configure your mail system. Choose local only, and choose your hostname.local or whatever as your mail domain) and then you can use mutt as a simple mail client through Terminal.
    This is probably the easiest and again, if you're doing dev work, you don't have to worry about sending mail out to real addresses by mistake, SMTP blocking on home connections, or even an Internet connection for that matter.

  • If you really need to send to Internet email addresses, you'll have better luck setting up gmail as your smarthost and reconfiguring Postfix as "Satellite with Smarthost" in the dpkg-reconfigure postfix setup. There's a bit more to it, but this has been covered quite a bit on ServerFault. By using gmail as your smarthost on an alternative port (tcp 587), you can get around ISP firewalls blocking SMTP and should be able to send email out of most Internet connections.

As for Drupal, it's been a while, but I believe by default (and as with most PHP applications), it'll use whatever is configured in the /etc/php5/apache/php.ini file's sendmail_path setting, but by default, it'll use Postfix's built-in sendmail wrapper on the localhost (your laptop) so you shouldn't need to change anything there.

Perhaps someone else can clarify that and I'll update my answer accordingly.

3
  • That's a good tip about the gmail smarthost on port 587. However, some people may still run in to a problem on networks that only allow outbound traffic on certain ports (some company networks do this). I like the first suggestion for keeping it local, but I would recommend alpine instead of mutt. Mutt has a much much steeper learning curve than alpine.
    – James
    May 23, 2011 at 17:44
  • @James: I rephrased the part about sending out most Internet connections because ISPs don't usually block outbound 587. If he's on a really tight network, well, no email for you. :) As for Mutt, well, read-only is pretty dead simple: type mutt, highlight mail with arrow key, hit enter.
    – gravyface
    May 23, 2011 at 17:53
  • Yeah, I figured that was directed towards ISP blocking, but that is why like your first suggestion better. Also, I might add to the email client suggestion that I'm really liking cone.
    – James
    May 23, 2011 at 17:56

You must log in to answer this question.