Koozali.org: home of the SME Server

How to setup external SMTP server

Offline pwgsc1

  • ***
  • 93
  • +0/-0
How to setup external SMTP server
« on: October 22, 2009, 02:04:55 PM »
Hi Folks,

I've search the forums and tried the things I've found with no success so I'm asking the question.

How do I setup a 7.4 Server so that it sends e-mails to my external gmail/hotmail/yahoo e-mail address?

I've just installed AFFA and I want it to be able to send it's status and errors messages to my gmail account.

Here's what I've tried.

From the Web Admin screen I go into

- CONFIGURATION - E-MAIL
- Change E-mail Delivery Settings
- Under SMTP Server set:
  -Address if Internet providers mail server:  smtp.gmail.com
  - SMTP Authentication for Internet Provider: Enabled
  - Mail Server user ID:  XXXXXX@gmail.com
  - Mail Server Password:  XXXXXXXXXXX

But it doesn't work.

What am I missing?

Thanks,

Craig

Offline mmccarn

  • *
  • 2,628
  • +10/-0
Re: How to setup external SMTP server
« Reply #1 on: October 22, 2009, 05:11:54 PM »
The "SMTP Server" settings in server-manager are used to configure an upstream SMTP server that your SME server can use for all outbound email.

At my home, for example, my ISP blocks all outbound traffic addressed to port 25 on remote servers, so I have to tell my SME server to relay all outbound SMTP email through the ISP's mail server.

According to http://wiki.contribs.org/Affa#Configuration, once you have your SME server configured to successfully deliver email, then you can configure Affa to send notifications to any email address you desire using
Code: [Select]
db affa jobname EmailAddresses XXXXXX@gmail.com(replace "jobname" with the name of a specific Affa backup job)

Offline pwgsc1

  • ***
  • 93
  • +0/-0
Re: How to setup external SMTP server
« Reply #2 on: October 23, 2009, 11:42:59 AM »
Thanks mmccarn,

I'll try setting up the SMTP Server for my local ISP instead of Gmail and post back.

Something I've notice when doing the  Affa --mailtest JOB   command, the response is:

- Testmail sent to XXXX@gmail.com
- Watchdog testmail from (insert IP/domain of server I'm backing up) sent to XXXXX@gmail.com

When I saw this I setup the SMTP SERVER settings on the Server I'm backing up with the SMTP.Gmail.com with no success.   I'll also change this to my local ISP settings and see what I get and post back

thanks,

Craig
 

Offline pwgsc1

  • ***
  • 93
  • +0/-0
Re: How to setup external SMTP server
« Reply #3 on: October 23, 2009, 05:32:37 PM »
OK,

I tried setting up the SMTP SERVER info with my local smtp info, the same info that i use in thunderbird to send e-mail via my ISP.  sent a test message from AFFA with no success.

Someone most have their Server sending e-mail via an external SMTP Server??

Thanks,

Craig

Offline mmccarn

  • *
  • 2,628
  • +10/-0
Re: How to setup external SMTP server
« Reply #4 on: October 25, 2009, 03:21:30 PM »
I do - and it works fine for me.

My configuration looks like this:
- Browse to /server-manager::Configuration::E-mail
- click on "Change e-mail delivery settings":
   Address of Internet provider's mail server: outgoing.verizon.net
   SMTP authentication for Internet provider: Enabled
   Mail server user id: myverizonuserid
   Mail server password: myverizonpassword

By default SME uses SMTP Auth on an unencrypted connection to port 25 of your ISP's mail server. 

According to the SME 7.4 release notes, you should be able to change this.

From looking at //usr/local/sbin/smtp-auth-proxy.pl (line 31) it looks like you need to open a command prompt and run a command like the following (this example would tell the "smtp-auth-proxy" service to connect to your upstream mail server on the port used by smtp-over-ssl):
Code: [Select]
config setprop smtp-auth-proxy PeerPort 465
signal-event email-update

If your SME server cannot send email, take a look at /var/log/smtp-auth-proxy/current and (if that doesn't tell you anything useful) /var/log/qmail/current.  Both of these files are available from server-manager::Administration::View log files.

(Note: I've added the info about PeerPort to http://wiki.contribs.org/DB_Variables_Configuration#Miscellaneous_Other_DB_Variables)

Offline mmccarn

  • *
  • 2,628
  • +10/-0
Re: How to setup external SMTP server
« Reply #5 on: October 25, 2009, 03:25:52 PM »
I forgot to mention - get your email working (from the SME server), then work on Affa. 

Affa emails will never work until you can successfully send email to the selected target address using webmail on your SME (https://your-sme-server/webmail).


Offline pwgsc1

  • ***
  • 93
  • +0/-0
Re: How to setup external SMTP server
« Reply #6 on: October 29, 2009, 01:01:24 AM »
MMCcarn,

Thank you.  Your example worked for me.  Proof that real world examples work best.  I just put in my ISP's SMTP Server name with no authorization/authentication and the AFFA e-mails started pouring.

Thanks very much, appreciate the help

Craig