Problem with email (postfix)

Discussion in 'Installation/Configuration' started by Captain, Dec 14, 2010.

  1. Captain

    Captain Member

    Hello!

    I do not know why?, but sometime have problem with emails.
    In logs all ok. Problem with receiving emails. With send all ok.
    May be you can check my postfix config file.
    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname
    
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    readme_directory = no
    
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    
    myhostname = mail.domain.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = mail.domain.com, localhost.domain.com, localhost.localdomain, localhost
    relayhost = 
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.249 81.81.81.81
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    mailbox_command = procmail -a "$EXTENSION"
    inet_protocols = all
    smtpd_sasl_local_domain = 
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    
    virtual_maps = hash:/etc/postfix/virtusertable
    
    #
    #manual
    smtp_host_lookup = native,dns
    sender_bcc_maps = hash:/etc/postfix/sender_bcc
    mydestination = /etc/postfix/local-host-names
    
    
    I have Ubuntu 10.04 and ISPConfig 2.2.37.

    If need another config files plz write in thread.

    Big thnks for help. I can understand where is problem.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Any errors in your mail log?

    Please make sure that the MX record of your domain points to the correct server. You can check that by running
    Code:
    dig mx yourdomain.com
     
  3. Captain

    Captain Member

    Thank you Falko.

    Code:
    root@srv:~# dig mx domain.com
    
    ; <<>> DiG 9.7.0-P1 <<>> mx domain.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8671
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3
    
    ;; QUESTION SECTION:
    ;domain.com.             IN      MX
    
    ;; ANSWER SECTION:
    domain.com.      86400   IN      MX      10 mail.domain.com.
    
    ;; AUTHORITY SECTION:
    domain.com.      50474   IN      NS      ns2.domain.com.
    domain.com.      50474   IN      NS      ns.domain.com.
    
    ;; ADDITIONAL SECTION:
    mail.domain.com. 50474   IN      A       81.81.81.81
    ns.domain.com.   54802   IN      A       81.81.81.81
    ns2.domain.com.  50474   IN      A       81.81.81.81
    
    ;; Query time: 25 msec
    ;; SERVER: 192.168.1.254#53(192.168.1.254)
    ;; WHEN: Wed Dec 15 19:23:25 2010
    ;; MSG SIZE  rcvd: 139
    
    
    It is output.
    Seems ok. But SERVER: 192.168.1.254#53(192.168.1.254)
    My server have local IP 192.168.1.249
    I have my ISP provider router, but I can not configure it (provider block)
    This router have DHCP and locate my server with MAC address to 192.168.1.249

    Where can be problem?
     
  4. falko

    falko Super Moderator Howtoforge Staff

    This is your DNS server (probably your router). That has nothing to say.

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

    Captain Member

    In mail.err all clear.
    in mail.warm

    Code:
    Dec 15 14:40:49 srv postfix/smtp[32122]: warning: network_biopair_interop: error reading 5 bytes from the network: Connection reset by peer
    Dec 15 14:46:48 srv postfix/smtpd[32693]: warning: 83.111.237.43: address not listed for hostname smtp-srv01.darveshgroup.ae
    Dec 15 16:40:02 srv postfix/smtp[4056]: warning: network_biopair_interop: error writing 37 bytes to the network: Broken pipe
    Dec 15 19:17:39 srv postfix/smtpd[8154]: warning: 205.234.222.29: address not listed for hostname server.hostingoffice.us
    Dec 15 19:17:40 srv postfix/smtpd[8154]: warning: 205.234.222.29: address not listed for hostname server.hostingoffice.us
    Dec 15 19:17:43 srv postfix/smtpd[8154]: warning: unknown[205.234.222.29]: SASL LOGIN authentication failed: authentication failure
    Dec 15 19:17:43 srv postfix/smtpd[8154]: warning: 205.234.222.29: address not listed for hostname server.hostingoffice.us
    Dec 15 19:17:46 srv postfix/smtpd[8154]: warning: unknown[205.234.222.29]: SASL LOGIN authentication failed: authentication failure
    Dec 15 19:17:47 srv postfix/smtpd[8154]: warning: 205.234.222.29: address not listed for hostname server.hostingoffice.us
    Dec 16 11:04:45 srv postfix/smtpd[24405]: warning: 747DE2800AF: queue file size limit exceeded
    Dec 16 11:13:22 srv postfix/smtpd[24667]: warning: 83.111.237.43: address not listed for hostname smtp-srv01.darveshgroup.ae
    Dec 16 11:18:50 srv postfix/smtpd[24405]: warning: 81.81.81.81: address not listed for hostname speedtouch.lan
    Dec 16 11:21:57 srv postfix/smtpd[24923]: warning: 83.111.237.43: address not listed for hostname smtp-srv01.darveshgroup.ae
    Dec 16 11:25:41 srv postfix/smtpd[24964]: warning: 540252804BC: queue file size limit exceeded
    Dec 16 11:40:52 srv postfix/smtpd[25395]: warning: 81.81.81.81: address not listed for hostname speedtouch.lan
    Dec 16 11:48:03 srv postfix/smtpd[25564]: warning: 81.81.81.81: address not listed for hostname speedtouch.lan
    Dec 16 11:48:15 srv postfix/smtpd[25564]: warning: 81.81.81.81: address not listed for hostname speedtouch.lan
    
    Where is 81.81.81.81 my static IP and speedtouch.lan it is my router.
    Only this notification I have in my logs.

    Thnks.
     
    Last edited: Dec 16, 2010
  6. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/mailname?
     
  7. Captain

    Captain Member

    in /etc/mailname
    Code:
    mail.domain.com
    
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Is this a real hostname (i.e., does it exist in DNS), or is it maybe speedtouch.lan?
     
  9. Captain

    Captain Member

    Yes sure. this domain have DNS record in my bind9.
     
  10. Captain

    Captain Member

    And today try to make test account in Outlook but have error
    and in server log have:
    Code:
    Dec 18 19:36:18 srv postfix/smtpd[26689]: connect from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:18 srv postfix/smtpd[26730]: connect from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:18 srv postfix/smtpd[26689]: lost connection after UNKNOWN from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:18 srv postfix/smtpd[26689]: disconnect from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:18 srv postfix/smtpd[26730]: lost connection after UNKNOWN from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:18 srv postfix/smtpd[26730]: disconnect from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:18 srv postfix/smtpd[26689]: connect from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:18 srv postfix/smtpd[26730]: connect from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:18 srv postfix/smtpd[26689]: setting up TLS connection from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:18 srv postfix/smtpd[26730]: setting up TLS connection from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:18 srv postfix/smtpd[26689]: Anonymous TLS connection established from ip.home.domain.pl[12.12.12.12]: TLSv1 with cipher AES128-SHA (128/128 bits)
    Dec 18 19:36:18 srv postfix/smtpd[26730]: Anonymous TLS connection established from ip.home.domain.pl[12.12.12.12]: TLSv1 with cipher AES128-SHA (128/128 bits)
    Dec 18 19:36:18 srv postfix/smtpd[26689]: lost connection after STARTTLS from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:18 srv postfix/smtpd[26689]: disconnect from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:18 srv postfix/smtpd[26730]: lost connection after STARTTLS from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:18 srv postfix/smtpd[26730]: disconnect from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:18 srv postfix/smtpd[26689]: connect from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:19 srv postfix/smtpd[26730]: connect from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:19 srv postfix/smtpd[26689]: lost connection after EHLO from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:19 srv postfix/smtpd[26689]: disconnect from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:19 srv postfix/smtpd[26730]: lost connection after EHLO from ip.home.domain.pl[12.12.12.12]
    Dec 18 19:36:19 srv postfix/smtpd[26730]: disconnect from ip.home.domain.pl[12.12.12.12]
    
    
    What does it mean?

    P.S. I can send/receive mails, but when i try test account have error.
     
  11. falko

    falko Super Moderator Howtoforge Staff

    Do you use TLs in your email client? If so, try to disable it.
     
  12. Captain

    Captain Member

    No I did not use it. I have default MS Outlook 2007 settings.
    I try this test account from another country. I do not know if it means something.
     
    Last edited: Dec 19, 2010

Share This Page