Unable to send email..

Discussion in 'General' started by joey3002, Jun 5, 2012.

  1. joey3002

    joey3002 New Member

    I followed the guide for "the perfect server ubuntu 11.10"
    http://www.howtoforge.com/perfect-server-ubuntu-11.10-ispconfig-3

    The system runs great with 1 small issue.. and it could be a user issue :)

    I set up a user account to send/receive email. I then set up thunderbird to send/recv I am able to receive the email fine, but sending it gives error that it times out. So my question is... what port is this guide using and what type of authentication should I be using?

    thanks
     
  2. joey3002

    joey3002 New Member

    not sure if this helps..



    pwcheck_method: saslauthd
    mech_list: plain login
    allow_plaintext: true
    auxprop_plugin: mysql
    sql_hostnames: 127.0.0.1
    sql_user: ispconfig
    sql_passwd: [omitted]
    sql_database: dbispconfig
    sql_select: select password from mail_user where login = '%u'
     
  3. joey3002

    joey3002 New Member

    more info.

    running 'nmap -v localhost'

    resulted in

    25/tcp open smtp


    So I updated thunderbird to reflect port 25, none for connection security, and authentication method is set to password, transmitted insecurely.

    I then try to send an email and I get the mail server has timed out..

    any advice? or what should i look at next?
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Are there any errors in your mail log (in the /var/log/ directory)?
     
  5. joey3002

    joey3002 New Member

    no, nothing in the log file. Its almost as if its not hitting the server.
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Can you use the server's IP address in Thunderbird instead of a hostname? My guess is that the hostname is pointing to another server.
     
  7. joey3002

    joey3002 New Member

    no, thats not the issue. I have even made a new server following your v12 guide and same issue. Can you share with me the settings to send email using say thunderbird?

    thanks
     
  8. falko

    falko Super Moderator Howtoforge Staff

  9. joey3002

    joey3002 New Member

    thanks, followed the guide you just linked to perfectly but it still times out trying to send email. Receiving is fine, but outgoing times out. How can I verify that I should be using port 25 and that its open?
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Please post the outputs of
    Code:
    netstat -tap
    and
    Code:
    iptables -L
    
    Also check your mail log (in the /var/log/ directory) for errors.
     
  11. Kcooper

    Kcooper New Member

    Same issue

    Hi

    I have the same issue.
    I followed guide and got a working system but cannot connect an email client via smtp to send mail.

    Using Squirrelmain works perfectly but trying to connect to send fails.
    If there anything I can do to help diagnose issue to assist?
     
  12. falko

    falko Super Moderator Howtoforge Staff

    Please open a new thread.
     
  13. joey3002

    joey3002 New Member

    Nothing shows up in the log.. but here is the other info:

    PHP:
    root@primary:/home/ubuntu# iptables -L
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    fail2ban
    -courierpop3  tcp  --  anywhere             anywhere            multiport dports pop3
    fail2ban
    -courierpop3s  tcp  --  anywhere             anywhere            multiport dports pop3s
    fail2ban
    -courierimaps  tcp  --  anywhere             anywhere            multiport dports imaps
    fail2ban
    -courierimap  tcp  --  anywhere             anywhere            multiport dports imap2
    fail2ban
    -pureftpd  tcp  --  anywhere             anywhere            multiport dports ftp
    fail2ban
    -sasl  tcp  --  anywhere             anywhere            multiport dports smtp
    fail2ban
    -postfix  tcp  --  anywhere             anywhere            multiport dports smtp,ssmtp
    fail2ban
    -ssh-ddos  tcp  --  anywhere             anywhere            multiport dports ssh
    fail2ban
    -ssh  tcp  --  anywhere             anywhere            multiport dports ssh

    Chain FORWARD 
    (policy ACCEPT)
    target     prot opt source               destination

    Chain OUTPUT 
    (policy ACCEPT)
    target     prot opt source               destination

    Chain fail2ban
    -courierimap (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere

    Chain fail2ban
    -courierimaps (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere

    Chain fail2ban
    -courierpop3 (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere

    Chain fail2ban
    -courierpop3s (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere

    Chain fail2ban
    -postfix (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere

    Chain fail2ban
    -pureftpd (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere

    Chain fail2ban
    -sasl (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere

    Chain fail2ban
    -ssh (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere

    Chain fail2ban
    -ssh-ddos (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere

    PHP:

    Proto Recv
    -Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 
    *:mysql                 *:*                     LISTEN      -
    tcp        0      0 *:http-alt              *:*                     LISTEN      -
    tcp        0      0 *:www                   *:*                     LISTEN      -
    tcp        0      0 *:tproxy                *:*                     LISTEN      -
    tcp        0      0 *:ftp                   *:*                     LISTEN      -
    tcp        0      0 ip-10-28-183-33.:domain *:*                     LISTEN      -
    tcp        0      0 localhost:domain        *:*                     LISTEN      -
    tcp        0      0 *:ssh                   *:*                     LISTEN      -
    tcp        0      0 *:smtp                  *:*                     LISTEN      -
    tcp        0      0 localhost:953           *:*                     LISTEN      -
    tcp        0      0 *:https                 *:*                     LISTEN      -
    tcp        0      0 localhost:10023         *:*                     LISTEN      -
    tcp        0      0 localhost:10024         *:*                     LISTEN      -
    tcp        0      0 localhost:10025         *:*                     LISTEN      -
    tcp        0      0 localhost:mysql         localhost:54475         ESTABLISHED -
    tcp        0      0 localhost:mysql         localhost:54476         ESTABLISHED -
    tcp        0      0 localhost:54476         localhost:mysql         ESTABLISHED -
    tcp        0      0 ip-10-28-183-33.ec2:www setcronjob.com:60752    ESTABLISHED -
    tcp   103755      0 ip-10-28-183-33.e:45516 ec2-107-20-146-71:pop3s ESTABLISHED -
    tcp        0      0 ip-10-28-183-33.ec:smtp mail.eazybusiness:41050 TIME_WAIT   -
    tcp        0      0 ip-10-28-183-33.ec2:www 64-121-12-30.c3-0:62263 TIME_WAIT   -
    tcp        0      0 localhost:www           localhost:53319         TIME_WAIT   -
    tcp        0      0 localhost:54477         localhost:mysql         ESTABLISHED -
    tcp        0      0 localhost:54475         localhost:mysql         ESTABLISHED -
    tcp        0      0 localhost:mysql         localhost:54477         ESTABLISHED -
    tcp6       0      0 [::]:pop3               [::]:*                  LISTEN      -
    tcp6       0      0 [::]:imap2              [::]:*                  LISTEN      -
    tcp6       0      0 [::]:ftp                [::]:*                  LISTEN      -
    tcp6       0      0 [::]:domain             [::]:*                  LISTEN      -
    tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      -
    tcp6       0      0 ip6-localhost:953       [::]:*                  LISTEN      -
    tcp6       0      0 [::]:imaps              [::]:*                  LISTEN      -
    tcp6       0      0 [::]:pop3s              [::]:*                  LISTEN      -
    tcp6       0  96773 ip-10-28-183-33.e:pop3s ec2-107-20-146-71:45516 ESTABLISHED -
     
  14. falko

    falko Super Moderator Howtoforge Staff

    Hm, looks ok. Although the iptables output looks ok, have you tried turning off fail2ban?

    Also, does
    Code:
    telnet localhost 25
    work on the server?
     
  15. joey3002

    joey3002 New Member

    root@primary:/home/ubuntu# telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 myhost.server.com ESMTP Postfix (Ubuntu)

    I am going to try disabling fail2ban now as well
     
  16. falko

    falko Super Moderator Howtoforge Staff

    The telnet output looks ok...
     

Share This Page