New install cant send emails

Discussion in 'Installation/Configuration' started by Alex Tovey, Feb 26, 2019.

  1. Alex Tovey

    Alex Tovey New Member

    Hi,

    I followed the ubuntu 18.04 setup for apache it is a clean server on Hypver-v but for some reason i cannot send email it says sent in the webmail and smtp says sent but its not going out. any ideas why or how can i check?

    Thank you

    Alex
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Where is the vm located? In a data center or at home or in the office? Many dsl and cable providers block port 25 to prevent spam, which means you can't run a mail server over their internet connection.
     
  3. Alex Tovey

    Alex Tovey New Member

    In a datacentre 1gb up and down. i've had an email server running fine using postfix and dovecot running port 587 fine so not sure why its blocking unless the port 587 outgoing to being blocked how can i view outgoing mail store?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    A mail server is not using port 587 to send emails out, it is using port 25 to communicate with other servers. Port 587 is used only by email clients to communicate with a mail server. Contact the data center and ask them if they block port 25 and if they do so, request that they unblock port 25.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Command:

    postqueue -p
     
  6. Alex Tovey

    Alex Tovey New Member

    Is there a way to change it to 587 outgoing? as im getting connection refused
    E090C32234B 647 Tue Feb 26 01:42:27 EMAILHERE
    (connect to 127.0.0.1[127.0.0.1]:10026: Connection refused)
    EMAILHERE
     
  7. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    No, smtp servers communicate on port 25.

    This shows an internal problem, amavis is not listening on port 10026. See if just restarting amavis fixes it, and if not, check the mail log for errors.
     
  8. Alex Tovey

    Alex Tovey New Member

    tried service amavis restart
    service not there nor is clamd

    Have i missed a step for this?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

  10. Alex Tovey

    Alex Tovey New Member

    think it was my hostname after finding amavisd did not start. changed hostname to FQDN and it sent.
     
    till likes this.
  11. Alex Tovey

    Alex Tovey New Member

    So i changed the name in ubuntu to hostnamectl set-hostname fqdn.web.com then did post postqueue -f to fix the issue
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    The hostname does not has to be an FQDN when you configured /etc/hosts correctly, what matters is that 'hostname -f' command returns the fqdn. But it's ok to set the hostname to the FQDN too.
     

Share This Page