Can't send mail

7,641

I had recently setup postfix to do simple email relay via gmail.

I followed this guide to do it and had no problems: https://rtcamp.com/tutorials/linux/ubuntu-postfix-gmail-smtp/

I am not sure if your requirement is just as simple as mine, but you may want to give this setup a try.

Share:
7,641

Related videos on Youtube

JacobTheDev
Author by

JacobTheDev

Updated on September 18, 2022

Comments

  • JacobTheDev
    JacobTheDev almost 2 years

    I can't seem to figure out how to get my server to send out an email. I've installed postfix for a send-only server, and every time I run mail -s "hello world" [email protected], I get at timeout error. Here's my mail.log contents:

    Jun  9 22:09:14 ubuntu postfix/master[1292]: daemon started -- version 2.11.0, configuration /etc/postfix
    Jun  9 22:09:14 ubuntu postfix/qmgr[1308]: 5F4DD2402B3: from=<[email protected]>, size=351, nrcpt=1 (queue active)
    Jun  9 22:09:45 ubuntu postfix/smtp[1317]: connect to 4c83721c8bbbca488ecc043c2e9f68.pamx1.hotmail.com[65.54.188.78]:25: Connection timed out
    Jun  9 22:10:15 ubuntu postfix/smtp[1317]: connect to 4c83721c8bbbca488ecc043c2e9f68.pamx1.hotmail.com[65.54.188.109]:25: Connection timed out
    $Connection timed out)
    Jun  9 22:14:14 ubuntu postfix/qmgr[1308]: CC89B2402D6: from=<[email protected]>, size=350, nrcpt=1 (queue active)
    Jun  9 22:14:26 ubuntu postfix/pickup[1307]: E10C92404AE: uid=1000 from=<[email protected]>
    Jun  9 22:14:26 ubuntu postfix/cleanup[1824]: E10C92404AE: message-id=<[email protected]>
    Jun  9 22:14:27 ubuntu postfix/qmgr[1308]: E10C92404AE: from=<[email protected]>, size=352, nrcpt=1 (queue active)
    

    As you can see it times out when trying to send the message. I've tried reinstall postfix, ensured that port 25 is open on my server and my firewall, checked to see if port 25 was open from an outside network using this website... All the standard stuff, I think. No idea why this is happening.

    The ultimate goal is to get postfix working so that my GitLab server will send out notification emails. It's installed from source, if that helps.

    I have next to no idea what I'm doing with command line and Linux stuff, so please try to explain like I'm an idiot :)

    • Stephen
      Stephen about 9 years
      I had a similar problem when trying to send test messages to gmail, I had to have forward and reverse dns pointers and MX records.
  • JacobTheDev
    JacobTheDev about 9 years
    Will the "from" address for these emails by my gmail address then? Or can I make it whatever I want?
  • JacobTheDev
    JacobTheDev about 9 years
    Alright, so I set it up to send through gmail but it's sending with my email address, and I'd prefer if it sent from [email protected] (which isn't a real email, it's just my git@ my git server's domain. Is this possible?
  • JacobTheDev
    JacobTheDev about 9 years
    Alright, I was able to use this method to configure with a free custom domain email provider, zoho.com. Works perfectly. Thanks much!