Sending email from Gmail account to local Ubuntu server












1














I have configured postfix on ubuntu 14.04 and can send email from command line to my personal Gmail account.



Now I want to send email from my Gmail account to my Ubuntu server. How can I do that?










share|improve this question









New contributor




muqeem is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    1














    I have configured postfix on ubuntu 14.04 and can send email from command line to my personal Gmail account.



    Now I want to send email from my Gmail account to my Ubuntu server. How can I do that?










    share|improve this question









    New contributor




    muqeem is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      1












      1








      1







      I have configured postfix on ubuntu 14.04 and can send email from command line to my personal Gmail account.



      Now I want to send email from my Gmail account to my Ubuntu server. How can I do that?










      share|improve this question









      New contributor




      muqeem is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I have configured postfix on ubuntu 14.04 and can send email from command line to my personal Gmail account.



      Now I want to send email from my Gmail account to my Ubuntu server. How can I do that?







      mail-server






      share|improve this question









      New contributor




      muqeem is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      muqeem is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited Dec 29 '18 at 19:19









      Zanna

      50.1k13131240




      50.1k13131240






      New contributor




      muqeem is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Dec 29 '18 at 6:40









      muqeem

      111




      111




      New contributor




      muqeem is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      muqeem is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      muqeem is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          1














          Yes, you can. What you have to do is to get a domain. Configure your mail server with a functioning DNS record (e.g. mail.example.com, if example.com is your domain).



          Next, add a MX Record to DNS. This tells other mailservers whom they should talk to to deliver mail for example.com



          The third thing you have to do is to set up Postfix to accept mail.



          In /etc/postfix/main.cf you will find a line that begins with mydestination. This is a comma seperated list of domains for which postfix will accept mail. It probably contains localhost already. After appending your domain it should look something like this:



          mydestination = localhost, example.com


          At that stage you should be able to accept incoming e-mail from the Internet. There's a lot of configuration you probably want to do in addition, such as adding TLS certificates to the SMTP server, set up IMAP server and so forth, but the tre steps above will make you able to receive e-mail from the Internet.






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });






            muqeem is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1105297%2fsending-email-from-gmail-account-to-local-ubuntu-server%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            Yes, you can. What you have to do is to get a domain. Configure your mail server with a functioning DNS record (e.g. mail.example.com, if example.com is your domain).



            Next, add a MX Record to DNS. This tells other mailservers whom they should talk to to deliver mail for example.com



            The third thing you have to do is to set up Postfix to accept mail.



            In /etc/postfix/main.cf you will find a line that begins with mydestination. This is a comma seperated list of domains for which postfix will accept mail. It probably contains localhost already. After appending your domain it should look something like this:



            mydestination = localhost, example.com


            At that stage you should be able to accept incoming e-mail from the Internet. There's a lot of configuration you probably want to do in addition, such as adding TLS certificates to the SMTP server, set up IMAP server and so forth, but the tre steps above will make you able to receive e-mail from the Internet.






            share|improve this answer


























              1














              Yes, you can. What you have to do is to get a domain. Configure your mail server with a functioning DNS record (e.g. mail.example.com, if example.com is your domain).



              Next, add a MX Record to DNS. This tells other mailservers whom they should talk to to deliver mail for example.com



              The third thing you have to do is to set up Postfix to accept mail.



              In /etc/postfix/main.cf you will find a line that begins with mydestination. This is a comma seperated list of domains for which postfix will accept mail. It probably contains localhost already. After appending your domain it should look something like this:



              mydestination = localhost, example.com


              At that stage you should be able to accept incoming e-mail from the Internet. There's a lot of configuration you probably want to do in addition, such as adding TLS certificates to the SMTP server, set up IMAP server and so forth, but the tre steps above will make you able to receive e-mail from the Internet.






              share|improve this answer
























                1












                1








                1






                Yes, you can. What you have to do is to get a domain. Configure your mail server with a functioning DNS record (e.g. mail.example.com, if example.com is your domain).



                Next, add a MX Record to DNS. This tells other mailservers whom they should talk to to deliver mail for example.com



                The third thing you have to do is to set up Postfix to accept mail.



                In /etc/postfix/main.cf you will find a line that begins with mydestination. This is a comma seperated list of domains for which postfix will accept mail. It probably contains localhost already. After appending your domain it should look something like this:



                mydestination = localhost, example.com


                At that stage you should be able to accept incoming e-mail from the Internet. There's a lot of configuration you probably want to do in addition, such as adding TLS certificates to the SMTP server, set up IMAP server and so forth, but the tre steps above will make you able to receive e-mail from the Internet.






                share|improve this answer












                Yes, you can. What you have to do is to get a domain. Configure your mail server with a functioning DNS record (e.g. mail.example.com, if example.com is your domain).



                Next, add a MX Record to DNS. This tells other mailservers whom they should talk to to deliver mail for example.com



                The third thing you have to do is to set up Postfix to accept mail.



                In /etc/postfix/main.cf you will find a line that begins with mydestination. This is a comma seperated list of domains for which postfix will accept mail. It probably contains localhost already. After appending your domain it should look something like this:



                mydestination = localhost, example.com


                At that stage you should be able to accept incoming e-mail from the Internet. There's a lot of configuration you probably want to do in addition, such as adding TLS certificates to the SMTP server, set up IMAP server and so forth, but the tre steps above will make you able to receive e-mail from the Internet.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 29 '18 at 8:24









                vidarlo

                9,21442445




                9,21442445






















                    muqeem is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    muqeem is a new contributor. Be nice, and check out our Code of Conduct.













                    muqeem is a new contributor. Be nice, and check out our Code of Conduct.












                    muqeem is a new contributor. Be nice, and check out our Code of Conduct.
















                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1105297%2fsending-email-from-gmail-account-to-local-ubuntu-server%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Human spaceflight

                    Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

                    張江高科駅