Postfix using old hostname?

Discussion in 'Server Operation' started by sph33r, Aug 30, 2006.

  1. sph33r

    sph33r New Member

    I followed the perfect setup for Debian Sarge and installed bind, postfix, etc.. using server1.xceednetwork.com. Then I decided I wanted my server to be named something else and changed it using

    echo server1.example.com > /etc/hostname
    /bin/hostname -F /etc/hostname

    Now when I send an email from an external account, it bounces saying server1.domain.tld name or service is not known. Then to test the other route, I sent an email from squirrelmail and it shows up as brad@example.com which is something I've never used??

    Anyway... lets get some info.

    Hostname:
    Code:
    srv01:/etc/postfix# hostname
    srv01.xceednetwork.com
    Main.cf
    Code:
    srv01:/etc/postfix# cat main.cf
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    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
    
    myhostname = mail.xceednetwork.com
    mydomain = xceednetwork.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = mail.xceednetwork.com, srv01.xceednetwork.com, localhost, localhost.xceednetwork.com
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_command =
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtpd_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    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
    home_mailbox = Maildir/
    
    virtual_maps = hash:/etc/postfix/virtusertable
    
    mydestination = /etc/postfix/local-host-names
    
    local-host-names
    Code:
    srv01:/etc/postfix# cat local-host-names
    ###################################
    #
    # ISPConfig local-host-names Configuration File
    #         Version 1.0
    #
    ###################################
    localhost
    srv01.xceednetwork.com
    localhost.srv01.xceednetwork.com
    localhost.xceednetwork.com
    localhost.localdomain
    www.xceedspeed.com
    xceedspeed.com
    #### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
    mail.xceednetwork.com
    
    error in mail.log
    Code:
    Aug 30 15:50:30 srv01 postfix/smtp[4025]: 4DF776C802E: to=<brad@server1.xceednet                                              work.com>, orig_to=<brad@xceedspeed.com>, relay=none, delay=0, status=bounced ([                                              server1.xceednetwork.com]: Name or service not known)
    
    It obviously can recieve and send mail, just not properly. Im stumped? I've looked everywhere for a reference to server1.xceednetwork.com but I can't find it.
     
  2. sph33r

    sph33r New Member

    I found the problem. The old server name existed in /etc/mailname. I changed that and it went through fine.
     

Share This Page