Minimalist outgoing email

I need to have my php app on my linode server send out the occasional email. My server does not need to receive emails. I am running Centos 5.5.

I previously had a hell of a time (eventually I found another way) setting up postfix on another linode server. I don't especially want to set up a mail server and really don't need anything more than the ability for an application on my server to send an email.

What's the simplest way to do that, can someone point me or suggest an approach?

Thanks!

Pito

5 Replies

Try using exim if you had problems with postfix http://library.linode.com/email/exim/se … 0.04-lucid">http://library.linode.com/email/exim/send-only-mta-ubuntu-10.04-lucid

use that guide replacing apt stuff with yum.

Sorry I am not familiar with apt.. Guessing now:

apt-get update => yum update

apt-get upgrade => not needed

apt-get install exim4-daemon-light mailutils => yum install exim4-daemon-light mailutils

But, now:

dpkg-reconfigure exim4-config

is that part of apt and does it have a counterpart in yum, or is that step "as is" if I am doing it on centos?

Thanks!!!

Out of curiosity, what problems did you have with postfix?

Usually it is enough to just install the package with no additional configuration if you only want to send emails out.

Anyway, a side note: with either postfix or exim, make sure you've also configured both reverse DNS for your host, and the SPF record for the domain name you will be sending emails from. If you don't do this, your emails may go straight to the recipient's junk folder.

@Vito Botta:

Out of curiosity, what problems did you have with postfix?

Usually it is enough to just install the package with no additional configuration if you only want to send emails out.

Anyway, a side note: with either postfix or exim, make sure you've also configured both reverse DNS for your host, and the SPF record for the domain name you will be sending emails from. If you don't do this, your emails may go straight to the recipient's junk folder.

It was a little tricky for a newbie. I wanted emails sent to mydomain.com to be redirected to gmail. I think I had a mistake in my dns and a mistake in my firewall but after hours of frustration I found that godaddy where my domain lives has a feature to do email forwarding without it ever hitting my server, which was better.

I see, definitely it's easier anyway if you can get Godaddy to forward your emails. For reference, though, if I remember rightly all you need to do to forward emails with Postfix is

  • edit your main.cf and add the location of the canonical map, e.g.

sendercanonicalmaps = hash:/etc/postfix/maps/canonical.map

  • add the forwarding settings for each couple of email addresses to the canonical map (/etc/postfix/maps/canonical.map), e.g.

source@address.com target@email.com

  • postmap /etc/postfix/maps/canonical.map

  • postfix reload

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct