Koozali.org: home of the SME Server

SME and Google Apps as relay - How To?

Offline F22-Raptor

  • **
  • 31
  • +0/-0
SME and Google Apps as relay - How To?
« on: February 09, 2009, 07:07:42 PM »
My ISP is blocking port 25 and I had to move my email to Google Apps.

How can I configure my SME server to send all internal email like the error emails or report emails for admin to the admin inbox (or whatever email I choose) configured on Google Apps?

This issue is also a pain with 3rd party apps that have no provisions for configuring the email other than the local SMTP. For example I use an e-Commerce package and there is no way to configure it to use SMTP authentication + port number. The only option is local SMTP.

Can this be done?

In the past I used to configure Postfix to use a relaying service but things have changed now, I not even sure SME uses Postfix plus I use Google Apps.

Thanks

D.

Offline engdev

  • *
  • 71
  • +0/-0
Re: SME and Google Apps as relay - How To?
« Reply #1 on: February 09, 2009, 08:51:12 PM »
Did you try this from the wiki?:

Internet provider's port 25 is blocked: How to set an alternative port for the SMTP server
If your provider is blocking smtp port 25 on your internet connection but your hosting provider is offering an alternative port (or when using some relay service) you can simply set this alternative port by adding it to the 'Address of Internet provider's mail server' value in the 'E-mail delivery settings' screen of the server-manager like this:

<internet providers mail server name or ip-address>:<alternative port>
For example: mail.mydomain.com:587


You can setup the user's SME account to forward e-mails to your Google domain address, just look in the User option in the server-manager.

Did you try sending them thru your ISP's smtp server? This is how I send our internal mails thru to our Google apps domain.

http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter13#E-mail_Delivery


hope this helps

John

Offline F22-Raptor

  • **
  • 31
  • +0/-0
Re: SME and Google Apps as relay - How To?
« Reply #2 on: February 09, 2009, 10:10:53 PM »
Hi John,

Thanks for the info. I will try it tonight when I get home.

D.

Offline F22-Raptor

  • **
  • 31
  • +0/-0
Re: SME and Google Apps as relay - How To?
« Reply #3 on: February 10, 2009, 03:04:58 AM »
Well, it didn't work. I'll have to keep playing with it.
How does one test the settings w/out going through webmail?

D.

Offline engdev

  • *
  • 71
  • +0/-0
Re: SME and Google Apps as relay - How To?
« Reply #4 on: February 10, 2009, 01:32:49 PM »
Can you advise what SME setup you originally had and what you're trying to achieve now? Was your SME server acting as the mailserver for your domain, and were you previously able to send e-mails ok to internal and external addresses?
When you now try to send an SME e-mail to an external address, what happens? Do you get any error messages in the log file?

Our server is setup in server only mode. All external smtp mail is sent via our ISP's server (we did this as we occasionally had e-mails rejected if they were sent straight from SME), and we download some Google accounts via Pop onto the sme server for local distribution (using Fetchmail contrib).

Another thought, do you have your domain hosted by Google but also setup on your SME server? If that's the case, if an e-mail is sent by SME to admin@yourdomain.com, it will just go to the internal SME mailbox. To get round this problem I have my admin user account setup to both forward and deliver locally. The forwarding address is another google apps account (say admin@xyz.com) but it could be a normal gmail account if you don't have another domain hosted by Google. I then setup the admin@xyz.com account to forward all messages to the user you want them to go to at yourdomain.com. That way the admin messages seamlessly arrive in my Google apps account.
« Last Edit: February 10, 2009, 03:45:04 PM by engdev »

Offline F22-Raptor

  • **
  • 31
  • +0/-0
Re: SME and Google Apps as relay - How To?
« Reply #5 on: February 10, 2009, 10:59:54 PM »
My ISP is Rogers (in Canada). I have two SME servers, one is my gateway and another one is a test server where I fool around with things like osCommerce or Joomla + ValueMart, so in a sense this is my sand box.
My gateway was initially configured to use Roger's SMTP server but first they blocked port 25 and later they sent me an email saying that my emails will not be allowed because they appear to come from a different domain, which is correct given that I have my own domain and all emails were sent from this domain.
At that point I signed up with Google Apps and stopped using my gateway as my mail server.

Now I would like to have the SME reports sent/forwarded to my email address handled by Google Apps which uses the same domain name as my servers, let's say john.doe@mydomain.com and my servers are gateway.mydomain.com and sandbox.mydomain.com

I was able to get osCommerce to send all email via Google Apps but no luck with VirtueMart.

Last night I changed the settings for sandbox.mydomain.com as you recommended but no emails were sent out, that included "internal" emails and external like Hotmail and Yahoo.

It would be nice if there was a contribution that allowed the admin to fully configure the email settings (port #, etc) to use a relaying SMTP server like Google's SMTP.

Thanks for your help and I hope this makes sense.

Offline engdev

  • *
  • 71
  • +0/-0
Re: SME and Google Apps as relay - How To?
« Reply #6 on: February 11, 2009, 01:57:41 PM »
Does osCommerce have it's own settings inside the program for the smtp server, so this is how you are able to send the messages via smtp.gmail.com, but Virtuemart uses the SME mail program?

I guess you've tried changing the main SME smtp settings to smtp.gmail.com, but this doesn't work because TLS isn't available?

Sounds like your problem is the ISP and I'm not sure how you're going to get round it as I imagine they have this policy to stop spammers?
We use Google apps for our domain but our actual domain (& website as it happens) is hosted by our ISP, with the MX records etc. setup so that the mail sent to us goes to the Google servers. I hadn't really considered it before but I imagine that way our ISP knows about our domain and so is happy for the smtp e-mails from our SME server (with our domain address) to be sent ok. Maybe you need to have Rogers host your domain, I imagine this will cost very little and should solve your problem?
Hope I've understood the situation correctly.
Regards
John

Offline engdev

  • *
  • 71
  • +0/-0
Re: SME and Google Apps as relay - How To?
« Reply #7 on: February 11, 2009, 03:25:21 PM »
Another thought, possibly the easiest thing to do is to forward the SME emails for admin@yourdomain.com to a Rogers address (presumably this will be ok with your ISP  ;-) )!. In your google mail account you can retrieve mails from other accounts via POP3, so just set this up to retrieve the messages from the Rogers account and they will appear in your Google apps account as if they've come direct from the SME server. You can setup a filter so that they're automatically labelled 'SME' for instance if you wanted to.
regards
John

Offline F22-Raptor

  • **
  • 31
  • +0/-0
Re: SME and Google Apps as relay - How To?
« Reply #8 on: February 11, 2009, 05:04:38 PM »
Hi John, osCommerce has its own mail client (PHP based) and it can be changed to use SMTP authentication using an osC contribution. VirtuMart is also PHP based but so far all the information I found re. Google Apps is either incomplete or wrong.

I like the idea of sending the admin emails to my Rogers account, I'll have to look into that.

I found a Google guide that describes how to use qmail and Google Apps as a mail relay but you need to have the Educational or Premium package. Educational is not applicable in my case and Premium is $50/user/year, it might not sound like much but since I'm not using my boxes to make any money I just don't want to spend any money to send email. No to mention that I would end up having to pay for about 4 users so that's $200/year at least ($CAD 240)

I have a better chance at winning the lottery than getting Rogers to OK my emails without paying an arm and a leg.

My gateway server is really just my firewall/router, I don't use it for web hosting or mail or anything like that, my other SME server is just for me to play with. If I ever end up having a proper (and profitable) e-Store I'd definitely look into using a hosting service, until then I have to do it on the cheap.

If I could configure my server(s) to use an account an Google Apps to send emails that would be enough for me, sort of IMAP client on the server and account on Google Apps.

Maybe I have to look into a mail forwarding service or something like that.

Thanks for your help, I really appreciate it.

D.

Offline christian

  • *
  • 369
  • +0/-0
    • http://www.szpilfogel.com
Re: SME and Google Apps as relay - How To?
« Reply #9 on: February 12, 2009, 01:44:34 AM »
My ISP is Rogers (in Canada). My gateway was initially configured to use Roger's SMTP server but first they blocked port 25 and later they sent me an email saying that my emails will not be allowed because they appear to come from a different domain, which is correct given that I have my own domain and all emails were sent from this domain.

I'm on Rogers and they aren't blocking port 25 to my knowledge though they did provide secure authentication for their email proxy (which SME supports) which I found handy to get past email servers blocking me due to my DynIP address. They also added a "senders list" for allowed email addresses that are not @rogers.com addresses. This can be configured in their email web interface under "My accounts".

That said, I'm looking for an easier mechansim. EasyDNS does provide a secure email proxy and I may eventually go for that.

SME since 2003

Offline F22-Raptor

  • **
  • 31
  • +0/-0
Re: SME and Google Apps as relay - How To?
« Reply #10 on: February 12, 2009, 12:33:06 PM »
Thanks Christian.
I know Rogers blocked port 25 a while back, that's why I had to use a mailhop relay service from DynDNS. That was mainly for incoming mail. For outgoing I still used the SMTP authentication form Rogers but they stopped allowing my emails to go thorough. From what you are saying, it sounds like I can go to my online account and configure the senders list.

I stopped using the setup above last year in June when I switched to Google Apps. Now I see the limitations of my current setup.

I'll have to investigate the options with Rogers.

Thanks

D.

Offline k_graham

  • ****
  • 146
  • +0/-0
Re: SME and Google Apps as relay - How To?
« Reply #11 on: June 28, 2010, 08:56:23 PM »
My ISP is blocking port 25 and I had to move my email to Google Apps.

How can I configure my SME server to send all internal email like the error emails or report emails for admin to the admin inbox (or whatever email I choose) configured on Google Apps?
Can this be done?

In the past I used to configure Postfix to use a relaying service but things have changed now, I not even sure SME uses Postfix plus I use Google Apps.

Thanks

D.

Consider using Google to retrieve email instead of sending email;

Go to Gmail then under Accounts and Imports set up POP3 mail, always use SSL, and use port 995 works for me.

We use www.mydomain.com for DNS and  we have a static domain, our Website is actually hosted externally so for our sme email we have it set up with the initials of our town.your_domain_name.com   gmail can be configured to leave a copy of retrieved message on server or to delete it after retrieving it. Your pop server will look like mail.town_initials.your_domain_name.com
You will I think have to add a domain in sme server to get the email to allow town_initials.your_domain_name.com
 

I think it works better to retrieve mail than send mail as mail can be blocked when sent by other parties but should always work to retrieve.

Ken