Mail routing problem

Discussion in 'Installation/Configuration' started by StevenD, Sep 12, 2009.

  1. StevenD

    StevenD Member

    Hi All,

    I have 3 domains setup on my server, since I setup the 3rd I no longer receive email. The new domain is listed in local_host_names and virtusertable.

    This is the reply I get if i sent from yahoo to my acoounts.

    This is the contents of the mail.log
    The dig MX returns my IP address for all the domains.

    I have also tried sending email between the domains, this does not work either. Not sure what I ave done wrong..

    Any help gratefully received.

    Steve
     
  2. StevenD

    StevenD Member

    Ok, I have found something that maybe wrong.

    Here is a record from my mail.log.ispconfigsave from when my mail was correctly routed.

    Now here is the same part from mail.log today.

    As you can see it seems to be routing my mail back to the external email relay I use instead of local.

    Not sure how to correct this.

    Thanks

    Steve
     
  3. falko

    falko Super Moderator

    Is server.home2 the domain of the email address? That's no official domain and therefore it's not routeable.
     
  4. StevenD

    StevenD Member

    Hi Falko,

    Thanks for your reply.

    Looking at the server.home2, it was the same when I was receiving email before.

    All that seems to have changed is that relay=local to relay=smtp.blueyonder.co.uk

    Thanks

    Steve
     
  5. StevenD

    StevenD Member

    Hi,

    I'm still struggling with this one. What makes it server.home2? where can this be changed, everything seemed fine till I added another domain on to ISPConfig.

    Thanks

    Steve
     
  6. falko

    falko Super Moderator

    What's in /etc/postfix/main.cf?
     
  7. StevenD

    StevenD Member

    Hi Falko,

    Thank you for your reply.

    main.cf contains
    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 (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
    
    # 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:${queue_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${queue_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 = server.home2
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = server.home2, localhost.home2, , localhost
    relayhost = smtp.blueyonder.co.uk
    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_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
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options = 
    
    local-host-names contains
    Code:
    ###################################
    #
    # ISPConfig local-host-names Configuration File
    #         Version 1.0
    #
    ###################################
    localhost
    server
    localhost.server
    localhost.localdomain
    www.my1stdomain.co.uk
    www.my2nddomain.co.uk
    www.my3rddomain.co.uk
    my1stdomain.co.uk
    my2nddomain.co.uk
    my3rddomain.co.uk
    #### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
    Thanks

    Steve
     
  8. falko

    falko Super Moderator

    What's in /etc/mailname?
     
  9. StevenD

    StevenD Member

    Hi Falko,

    Thanks again for your reply.

    mailname contains.
    Code:
    server.home2
    Thanks

    Steve
     
  10. falko

    falko Super Moderator

    Ok, change the myhostname setting in /etc/postfix/main.cf and the hostname in /etc/mailname and restart Postfix.
     
  11. StevenD

    StevenD Member

    Hi falko,

    Not sure what I should change it to, I have 3 domains hosted on ISPconfig.

    Thanks

    Steve
     
  12. falko

    falko Super Moderator

    I'd buy a "technical" domain that you use only for naming your servers, but not for web sites, email, etc. You could then use server1.technicaldomain.com, server2.technicaldomain.com, etc.
     
  13. StevenD

    StevenD Member

    Hi Falko,

    Once again Thank You for all your help.

    In the end I just needed to add server.home2 to the local-host-names file.

    All seems to be working correctly now.

    Thanks

    Steve
     

Share This Page