These forums are read-only!
Using Google Apps for email?
  • Hello,

    I am a newbie to configuring Linux boxes (but having fun learning!). The articles and tutorials provided by PickledOnion are fantastic, but since there is no documentation on this site for email servers, I'm having trouble with understanding the basics. I would appreciate any help with this issue...

    I would like to use Google Apps for my email. However, when I sign up, it sends an email for verification to my site before my Google Apps account becomes active. Obviously, I cannot activate my Google Apps account because I have no mail server and cannot receive the verification email. In this case, would a mail server need to be installed and able to receive mail BEFORE I can sign up for Google Apps? My reason in asking is because in the tutorial for creating MX records for Google Apps, it says you can verify ownership of the domain by uploading an HTML file or changing the CNAME...but the only way I can do that is if I log into my Google Apps account and choose one of those options.

    If Postfix needs to be installed and running first, can anyone point me in the direction of any good documentation or tutorials on how to install and get it working? I tried on my own, but could not figure out why I was able to send emails but not receive from outside my localhost (e.g. - gmail, yahoo).

    Any help or advice on this issue would be greatly appreciated. Thank you for your time in reading this.

    Jonny
  • I recently spent some time configuring basic email services on my server as well. Here is the process that got me up and running with Ubuntu 8 (Hardy)

    It's mostly based on The Perfect Setup article with some tweaks to get it working on the newer version of Ubuntu. Of course if you're not running Ubuntu it probably won't be of much use... What distribution are you running?

    Edit: Another article that I ran across when setting up my server that has a title that may pertain to what you are trying to do: http://wiki.slicehost.com/doku.php?id=lightweight_mail_relay_to_google_apps_or_gmail_smtp_server
  • Thanks for the link Jon - this is a great resource to help get me started. Excellent job writing it! The tutorial I was using before was this: http://flurdy.com/docs/postfix/ ...and encountered the issue with being able to send mail but not receive from external accounts.

    The distro I'm running is Ubuntu Hardy so this applies perfectly.

    Thanks again!
  • Is local account to account mail working?

    Just some random thoughts:
    Did you follow the article about setting up Ubuntu Hardy on articles.slicehost.com with the sample firewall rules for iptables? You should rule out any firewall problems first.

    When you try accessing the mail service remotely via telnet do you get a response?

    If the connection is making it though to the server then the mail logs will help point you in the right direction.
  • Yes, local account to account mail was working. With that said, I was able to send mail to my gmail account successfully. However, when I sent email back from gmail, I would get the mailer daemon failure notice.

    And yes, I did follow the setup articles for Hardy, so the sample firewall rules for iptables is exactly as the tutorial. I did not modify or add anything.

    I was also able to remotely telnet through port 25 to my mail server. I did look in the mail logs, but didn't see anything that stuck out. I probably should have analyzed the logs more because this is where I got stuck!

    I recently rebuilt my slice and started over. This afternoon I'm going to walk through your article to get Postfix installed and configured.

    Thanks again for your help in analyzing this issue.
  • Sounds like a plan. I think I ended up purging postfix and friends twice before I got it running like I wanted.
  • Jon - your guide worked great. You definitely cut out a lot of extra clutter from the tutorial that you went off of that can confuse newbies like me! :)

    In addition, I installed mailx so I could test and send some mail from the command line. I'm still having the issue of receiving mail - now it does not receive mail from outside accounts (gmail) or localhost accounts. From the sounds of this, do you know what the issue could be?
  • Hmm, attaching the mail logs would be beneficial. What is the domain that you're using and with what subdomain have you setup with MX records?

    The local mail problem sounds like the postfix configuration isn't quite right but the logs should let us know what's going on. Be sure to check all of the mail logs.

    Edit: Also, what values are you using for the myhostname, mydestination, and mynetworks in the postfix configuration?
  • Posted By: twampssHello,
    I would like to use Google Apps for my email. However, when I sign up, it sends an email for verification to my site before my Google Apps account becomes active. Obviously, I cannot activate my Google Apps account because I have no mail server and cannot receive the verification email. In this case, would a mail server need to be installed and able to receive mail BEFORE I can sign up for Google Apps? My reason in asking is because in the tutorial for creating MX records for Google Apps, it says you can verify ownership of the domain by uploading an HTML file or changing the CNAME...but the only way I can do that is if I log into my Google Apps account and choose one of those options.


    You don't need to be running a mail server at all to use Google Apps. The CNAME creation is the easiest way to verify ownership of the domain - follow Google's instructions for the record creation, and once verified, you can then use Google Apps to handle your mail. No Postfix required.
  • Hey guys, I've been trying to setup google apps email on my slice, I can send mail to and from my @mydomain email via gmail, but on my slice I'm getting a timeout error. I've verified I can telnet to smtp.google.com on port 587.

    I've got my config setup by following the below,
    http://www.rubyinside.com/how-to-use-gmails-smtp-server-with-rails-394.html

    The error is coming from:
    sock = timeout(@open_timeout) { TCPSocket.open(@address, @port) }

    Has anyone come across this one before?
  • Posted By: jmstaceyEdit: Also, what values are you using for the myhostname, mydestination, and mynetworks in the postfix configuration?


    Hi Jon, thanks again. I figured out the local mail issue, so here are the values as requested above:

    myhostname = mail.mydomain.com
    mydestination = mail.mydomain.com, mydomain.com, localhost.mydomain.com, localhost
    mynetworks = 127.0.0.0/8

    Also, is there more configuration needed if I wanted to be able to send mail from an outside email (gmail, yahoo, etc.) to any account on mydomain.com?
  • Posted By: elithrarYou don't need to be running a mail server at all to use Google Apps. The CNAME creation is the easiest way to verify ownership of the domain - follow Google's instructions for the record creation, and once verified, you can then use Google Apps to handle your mail. No Postfix required.


    Thanks for your input elithrar. I signed up for an account as an admin and as a normal user, and it sends an email to my domain for verification before I can even log into my Google Apps account. From there, I know you can choose an option to verify ownership of my domain (just from reading the Google Apps documentation), but the account doesn't become active if I don't click the verification link. What am I missing?? :)
  • Just to be sure, you did replace mydomain.com with your actual domain right? There aren't any other configurations needed that I'm aware of. What do the logs say?
  • Posted By: jmstaceyJust to be sure, you did replace mydomain.com with your actual domain right? There aren't any other configurations needed that I'm aware of. What do the logs say?


    Yes I did :) I'm beyond that phase of "newb-ness" ;)
  • Posted By: jmstaceyWhat do the logs say?


    Ah-ha! This is a good sign - I've never seen this in the logs before in my past attempts...

    Jul 18 19:21:38 3atmospheres postfix/smtpd[6251]: NOQUEUE: reject: RCPT from mail.3atmospheres.com[209.20.78.19]: 554 5.7.1 : Relay access denied; from= to= proto=ESMTP helo=<3atmospheres.com>
    Jul 18 19:22:18 3atmospheres postfix/smtpd[6251]: disconnect from mail.3atmospheres.com[209.20.78.19]
    Jul 18 19:25:38 3atmospheres postfix/anvil[6253]: statistics: max connection rate 1/60s for (smtp:209.20.78.19) at Jul 18 19:20:48
  • hehe, just making sure. I can't provide any tips with Google Apps since I don't trust them with my data (they lost my analytics data and support never got back to me).

    Nothing very helpful in that particular log entry about receiving email from other providers...