The Perfect Server - Ubuntu Jaunty Jackalope (Ubuntu 9.04) [ISPConfig 2]

Discussion in 'HOWTO-Related Questions' started by AsDsL, May 7, 2009.

  1. AsDsL

    AsDsL New Member

    Mail loops back to myself

    2.10.2 Mail
    "You got the error-message "Mail loops back to myself"? You forgot to add your domain to "/etc/postfix/local-host-names". Afterwards you have to restart postfix (/etc/init.d/postfix restart)."
    I double checked my "/etc/postfix/local-host-names: and my domaim is included.

    Thnaks
    tony
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What's the exact error message, and what's in /etc/postfix/local-host-names?
     
  3. AsDsL

    AsDsL New Member

    Reporting-MTA: dns; ns1.domain.com
    X-Postfix-Queue-ID: A44239DC14F
    X-Postfix-Sender: rfc822; [email protected]
    Arrival-Date: Fri, 8 May 2009 22:09:32 -0400 (EDT)

    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.4.6
    Diagnostic-Code: X-Postfix; mail for domain.net loops back to myself
    =================

    root@ns1:~# cat /etc/postfix/local-host-names
    ###################################
    #
    # ISPConfig local-host-names Configuration File
    # Version 1.0
    #
    ###################################
    localhost
    ns1.domain.net
    localhost.ns1.domain.net
    localhost.domain.net
    localhost.localdomain
    www.domain.net
    domain.net
    #### MAKE MANUAL ENTRIES BELOW THIS LINE! ####root@ns1:~#
    root@ns1:~#

    I'm using Ubuntu amd64,

    falko, Thanks in advance,
    Tony
     
  4. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/postfix/main.cf?
     
  5. AsDsL

    AsDsL New Member

    # 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 = ns1.domain.net
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = ns1.domain.net, localhost.domain.net, localhost.localdomain, localhost
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    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

    mydestination = /etc/postfix/local-host-names
    root@ns1:~#

    Thanks,
    Tony
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Looks ok. Not sure what is wrong...
     

Share This Page