2

I've gone as far as I can go on my own, but I'm not a Linux guru and am now stuck.

I've got an Oracle database running Oracle Enterprise Linux 5.1 on an Amazon EC2 instance. I migrated it from a box that was connected via a home broadband connection, and it was sending emails without problem via the ISP's SMTP server - but now that it is running on EC2, the ISP doesn't recognise it and refuses to accept the emails.

So now I want to set it up, the simplest way possible, so that it can continue to send emails.

  1. I've tried emailrelay as per instructions here: http://jiri.wordpress.com/2010/03/24/send-emails-using-utl_mail-and-google-gmail-smtp-server/#comment-108

    (background note: https://stackoverflow.com/questions/3430820/emailrelay-cannot-bind-the-listening-port)

    I had problems getting it to work because openssl wasn't installed:

    $ emailrelay –as-proxy smtp.gmail.com:587 –client-tls –client-auth /etc/emailrelay.auth –port 8025
    emailrelay: error: cannot do tls/ssl: openssl not built in
    emailrelay: exception: cannot do tls/ssl: openssl not built in
    

    But it wouldn't work because it requires openssl-devel, which I can't install on my system (I couldn't find the dependencies:

    $ rpm -i openssl-devel-0.9.7a-2.i386.rpm
    warning: openssl-devel-0.9.7a-2.i386.rpm: Header V3 DSA signature: NOKEY, key ID db42a60e
    error: Failed dependencies:
    krb5-devel is needed by openssl-devel-0.9.7a-2.i386
    openssl = 0.9.7a-2 is needed by openssl-devel-0.9.7a-2.i386
    

    I gave up at that point because I couldn't find krb5-devel available for Oracle Enterprise Linux 5.1.

  2. I had a look at this sendmail option: http://www.phinesolutions.com/sendmail-gmail-smtp-relay-howto.html

    But this doesn't work because sendmail wasn't compiled with "TLS" or "SASL" options, and how to fix this wasn't covered.

Am I making this more difficult than it has to be? Is there a simple way to send emails from Linux? I have a Google Apps account associated with the domain name.

1

4 Answers 4

1

Shouldn't yum install openssl-devel install the required OpenSSL for you, or do you need some special version of OpenSSL and that's why installing the rpm package by hand? Usually you should not do that!

3
  • I've never heard of yum. I gave it a go, but it says "no match for argument": $ yum install openssl-devel Loading "installonlyn" plugin Loading "security" plugin Setting up Install Process Setting up repositories No Repositories Available to Set Up Reading repository metadata in from local files Parsing package install arguments Setting up repositories No Repositories Available to Set Up Reading repository metadata in from local files No Match for argument: openssl-devel Nothing to do Aug 10, 2010 at 7:15
  • So you need to go back and read the Linux package management 101. :-) You always should use a package manager for installing packages and NOT download & install those rpm packages by hand. A package manager will keep track of dependencies, takes care of updating your system and so on. With "Enterprise Linux 5.1" you probably mean "Red Hat Enterprise Linux 5.1"? If you have an entitlement bought for it, you need to then register your server to Red Hat Network with command rhn_register. After that the previous yum install openssl-devel should work. Aug 10, 2010 at 7:36
  • Definitely need the 101 :) I'm using Oracle Enterprise Linux 5.1, and rhn_register requires a CSI, which I don't have. Aug 10, 2010 at 8:00
0

RHEL is particularly bad when it comes to untangling the dependencies - you may find some of the packages you need in the CENTOS repositories. Failing that, installing stunnel should be a no-brainer. There's a centos package here. Note that you will still need the openssl libs installed (but not the dev kit).

C.

3
  • Or just configure sendmail to do it for you (assuming this does not undermine your SPF records / gmail's policy)
    – symcbean
    Aug 10, 2010 at 7:55
  • Sorry, I really am at sea once I'm outside Oracle - I don't understand how stunnel would work, and the centos link appears to be broken. Also, I did mention that I couldn't get the sendmail option working either. Aug 10, 2010 at 8:08
  • There are specific details for gmail on the internet. A quick google found this - spampal.sanesecurity.com/manual_eng/servers/stunnel/… Just configure stunnel.conf as shown, start up the daemon then point your code to 127.0.0.1:259 as the SMTP server (alternatively set stunnel to listen on port 25 and switch off sendmail).
    – symcbean
    Aug 10, 2010 at 11:23
0

I have earlier posted a solution on Stackoverflow.

-2

I believe that you're only interested in using it to send admin/cron/system messages and not a full-blown SMTP setup. If that is the case, the simplest method would be to use SSMTP. I believe that there are packages for your distribution too.

1
  • I was going to suggest this, too. I use SSMTP with a Gentoo server since we do not actually host mail on that domain; Google Apps does. No mail is sent directly from the server, it is all relayed through a @domain account through Google Apps.
    – laebshade
    Jul 10, 2011 at 21:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .