Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Postfix setup sending emails but cannot send emails with client

  1. #1
    Join Date
    Jul 2020
    Beans
    6

    Postfix setup sending emails but cannot send emails with client

    So I can send emails with the mail command from command line but when I try to send emails externally with SMTP I am getting the message, "The Server refused to allow a connection on port 587." Do you know what could be going wrong? I am just trying to set up a server to send mail not receive it. I have set it up as loopback and even set up opendkim. Thanks so much!!

  2. #2
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Postfix setup sending emails but cannot send emails with client

    Try using port 25 instead. If you're talking to localhost, there aren't any security issues. I have an SMTP server in my home office. It uses no authentication and plain-text SMTP on port 25. Only the machines in my house can see it.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Jul 2020
    Beans
    6

    Re: Postfix setup sending emails but cannot send emails with client

    Just tried port 25. I'm getting the same message? I am on an outside network. Should I try an inside network? Would that help with troubleshooting?

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Postfix setup sending emails but cannot send emails with client

    Did you setup port forwarding on the wan router?
    Last edited by TheFu; October 21st, 2020 at 06:00 PM. Reason: s/dd/Did/

  5. #5
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Postfix setup sending emails but cannot send emails with client

    You won't be able to see the server unless you set up port forwarding as TheFu suggests. However, I don't think that's what you want to do.

    Where are the emails you intend to send originating? On the server? On the server and the local network? If those are the only cases, you don't want to the server to be visible from outside your network. If you just need to send locally-originating mail, then you should be testing from within the local network.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  6. #6
    Join Date
    Jul 2020
    Beans
    6

    Re: Postfix setup sending emails but cannot send emails with client

    Quote Originally Posted by TheFu View Post
    Did you setup port forwarding on the wan router?
    Yes port forwarding is set up and I did confirm that Google Fiber does not block those ports.

    No I do want it accessible from the outside. That is the whole point. I want to be able to use it as a SMTP server externally. I am trying to set up email services to accompany my web server I have already set up.

  7. #7
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Postfix setup sending emails but cannot send emails with client

    By default Postfix is configured only to listen on the localhost interface for security reasons. You need to change the "inet_interfaces" directive in main.cf. Choose
    Code:
    inet_interfaces = all
    to have the server listen on all interfaces. Restart Postfix. Any better?

    If you do this, you'll need to make sure you're not creating an "open relay." Read this at least twice: http://www.postfix.org/SMTPD_ACCESS_README.html. When you think you have everything set up correctly, test the server's configuration with https://mxtoolbox.com/diagnostic.aspx.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  8. #8
    Join Date
    Jul 2020
    Beans
    6

    Re: Postfix setup sending emails but cannot send emails with client

    Quote Originally Posted by SeijiSensei View Post
    By default Postfix is configured only to listen on the localhost interface for security reasons. You need to change the "inet_interfaces" directive in main.cf. Choose
    Code:
    inet_interfaces = all
    to have the server listen on all interfaces. Restart Postfix. Any better?
    Unfortunately that is already set as all :-/ but I will read through what you sent and just see if I can figure it out. I might have missed something when I was setting up? I'll let you know after that if I still can't figure it out.

  9. #9
    Join Date
    May 2010
    Beans
    3,247

    Re: Postfix setup sending emails but cannot send emails with client

    Did you configure the firewall on the email server? If so did you allow the port to be accessible from your client?

  10. #10
    Join Date
    Jul 2020
    Beans
    6

    Re: Postfix setup sending emails but cannot send emails with client

    Ok so good news I do have a successful configuration now. After reading the article you sent I realized I had never updated the domain in my main.cf. I am testing on an alternative domain before bringing it live to my main domain. I have never gotten this far so thank you!!
    But I am still having authentication problems I'm guessing? How do I set up an account? I tried using my admin email / password I set up for authentication but that is a different domain (since I am testing on the alternative domain which is just a forwarder domain). How do I set up an account with this alternative domain??

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •