postfix ignores domain name

Discussion in 'Installation/Configuration' started by berny, May 9, 2008.

  1. berny

    berny New Member

    I have a problem with ispconfig and postfix. Postfix accepts mail for any existing username at any existing domain.

    Let's say domain1.com has a user called web1_user1. Postfix now not only accepts mail to [email protected] whicht it should but also to [email protected], [email protected] and so on. The wrongly accepted mail is all store in the account of web1_user1.

    Postfix will also accept mails for all system accounts like [email protected] or [email protected].

    What can I do so that postfix only accepts mail if the username is configured for that specific domain?

    My /etc/postfix/main.cf
    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 = sub.domain.net
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    relayhost = 
    mynetworks = 127.0.0.0/8
    #mailbox_command =   # macht wohl ispconfig
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    inet_protocols = all
    smtpd_sasl_local_domain = 
    ## BERNY: --> vielleicht liegt es an SASL
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    # Hier die ganze Spamabwehr:
    smtpd_recipient_restrictions =
       permit_sasl_authenticated,
       reject_invalid_hostname,
    # Mit Vorsicht zu geniessen:
       reject_unknown_hostname,
       reject_non_fqdn_hostname,
       reject_non_fqdn_sender,
       reject_non_fqdn_recipient,
       reject_unknown_sender_domain,
       reject_unknown_recipient_domain,
       permit_mynetworks,
       reject_unauth_destination,
       reject_rbl_client zen.spamhaus.org,
       reject_rbl_client list.dsbl.org,
       reject_rhsbl_client rhsbl.sorbs.net,
       reject_rhsbl_sender rhsbl.sorbs.net
    
    body_checks = pcre:/etc/postfix/body_checks.pcre
    header_checks = pcre:/etc/postfix/header_checks.pcre
    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
    #home_mailbox = Maildir/ # macht wohl ISPConfig anders
    
    virtual_maps = hash:/etc/postfix/virtusertable
    
    mydestination = /etc/postfix/local-host-names
    
    
    
     
  2. falko

    falko Super Moderator Howtoforge Staff

    This is normal as you're using system user names before the @. Try to use aliases instead (they're defined in /etc/postfix/virtusertable).
     

Share This Page