How to Configure Outgoing Mail on Google Cloud Compute

Discussion in 'Server Operation' started by adamjedgar, Oct 2, 2017.

  1. adamjedgar

    adamjedgar Member

    Hi guys,
    i know this port 25 issue has been spoken about before, however, i need clarification.
    Google Cloud documentation says...
    Google Compute Engine does not allow outbound connections on ports 25, 465, and 587. By default, these outbound SMTP ports are blocked because of the large amount of abuse these ports are susceptible to.

    it then goes on to say...
    While sending email from blocked ports is not allowed, your instances can still receive email.
    In addition to the above, it now gets confusing...
    Although standard email ports are blocked, you can choose a non-standard port to send email through.

    If you don't have a G Suite account or don't want to use G Suite or a third-party mail provider, you can set up your own email server on an instance using a non-standard port. You can choose any ephemeral port that isn't blocked by Compute Engine.
    So my question is this...
    If Google Cloud Compute can recieve mail on port 25,465, and 587, and we can configure for example Postfix to send outgoing mail on say port 2525 (as recomended by google), why would i still need to use a 3rd party mail relay for outgoing mail? Cant i just send mail on port 2525 from my ispconfig google cloud compute instance postfix server?

     
    Last edited: Oct 2, 2017
  2. HSorgYves

    HSorgYves Active Member

    No other mailserver will listen on port 2525 for incoming mail. Where do you want to sent the mail to?
     
  3. adamjedgar

    adamjedgar Member

    between websites and user email accounts on same server

    examples
    1. Wordpress Contact Form to website owners own admin email account for the website
    2. WHMCS confirmation emails to a new client account/service

    The problem i wonder with example 2 above, how is a client going to log into their new email account if they dont actually have access to that particular domain email yet? (ie they need to confirmation email activation link to be able access account, wouldnt this mean that an external email is required for first use?)
     
  4. HSorgYves

    HSorgYves Active Member

    It would be and a client will not be able to sent any mail.
     
  5. adamjedgar

    adamjedgar Member

    I think sendgrid is calling...i dont see any other options. Bloody google cloud compute!
     
  6. HSorgYves

    HSorgYves Active Member

    It's free isn't it? What do you expect?
     
  7. adamjedgar

    adamjedgar Member

    With the 3xception of the trial, Google cloud isnt free. Having said that it is quite cheap if one goes for lowest option, but irrespective of what one pays in google cloud, the port 25 restriction appears to be universal across the google network.
     
  8. HSorgYves

    HSorgYves Active Member

    Then look for another provider ;-)
     
  9. adamjedgar

    adamjedgar Member

    I was comsidering that, however i am finding on forums that blocking port 25 outgoing is widely implemented these days...an ever increasing number of providers are doing the same as google (They are requiring the use of a relay provider for outgoing mail).
    I wonder if this is becoming a standard for vps?
     
  10. HSorgYves

    HSorgYves Active Member

    For low price VPS certainly, but never for real VPS as it is the future of computing.
     
  11. adamjedgar

    adamjedgar Member

    ah i see...apparently googles excuse for forcing clients to use a relay service provider for outgoing mail on port 25 (as well as the other ports 465 and 587 too i believe) is to limit ip address blacklisting and out of control spam on their network...which makes sense. I vaguely read something about one of those ports can be used to communicate with Google Suite for outgoing mail...(i think that was port 587?)

    This is another option i am going to explore. It does require a workaround for those using the free gmail service however, something about changing the default [email protected] to your registered domain [email protected] (which i have no problem with)

    So a couple of questions for clarification...
    1. how does a relay service actually work...is the email server sending emails to the relay service provider on port 2525 (for example), the relay server is then forwarding the email to its destination on port 25?

    2. Is a relay service server specific, or is it client specific? (ie does each client on a webhosting server need an individual sendgrid account to be able to send mail from my google cloud compute instance)

    3. Can i have a hybrid configuration where the server can be used by its virtual users OR they can send outgoing mail using their own sendgrid accounts?
     
    Last edited: Oct 3, 2017
  12. HSorgYves

    HSorgYves Active Member

    1. Yes
    2. "Server" specific, which generally means based on AUTH
     
  13. adamjedgar

    adamjedgar Member

    ah ok.
    I have another related issue, however i will start a new thread as the resolution for it may be of help to someone else searching for help with postfix and relay host services.
     

Share This Page