Catch all email catches mail for existing adress?

Discussion in 'General' started by Xtracted, Sep 29, 2007.

  1. Xtracted

    Xtracted New Member

    I just noticed that mail sent to an email adress on one of my sites get caught by my main server sites catch all email adress. The adress exists and should work without any problem.. Any suggestions of where I start looking?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. Xtracted

    Xtracted New Member

    I dont even have the variable $mydomain in that file..
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the content of your main.cf file, comments stripped.
     
  5. Xtracted

    Xtracted New Member

    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no

    append_dot_mydomain = no

    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

    myhostname = www.mydomain.se
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    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_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
     
  6. falko

    falko Super Moderator Howtoforge Staff

    The best solution is to get a "technical" domain that you don't use for web sites and email, but for naming your servers only.
    You'd then give your server a hostname in that domain and use that hostname for myhostname and mydomain in /etc/postfix/main.cf.
     
  7. Xtracted

    Xtracted New Member

    And a subdomain would not work for this?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    A subdomain is fine too as technical domain.
     
  9. Xtracted

    Xtracted New Member

    I created a subdomain, host.mydomain.se and modified main.cf so it looks like this:

    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no

    append_dot_mydomain = no

    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

    myhostname = host.mydomain.se
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = host.mydomain.se, localhost.mydomain.se, , 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_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


    My catch all on the domain I used to have before I changed it to host.mydomain.se still catches all emails outside that domain.. inside that domain it works fine..
     
  10. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/mailname?
     
  11. Xtracted

    Xtracted New Member

    A-ha! That seems to have done it.. exellent, thank you!

    Do I need to change the server hostname in other files as well or will this do it?
     
  12. falko

    falko Super Moderator Howtoforge Staff

    No, you don't. :)
     

Share This Page