Once again, mail problem

Discussion in 'General' started by momo, Feb 22, 2006.

  1. momo

    momo New Member

    Hello,
    I still have a problem with mail. The Problem is:
    user1@domain1.tld cant receive mail on user1@domain2.tld ... user1@domainN.tld. The same is with user2@domain2.tld can receive mail on user2@domain1.tld @domain3.tld on all domains.

    $mydomain and $myhostname is not used on virtual site

    #################################################
    my main.cf config:

    smtpd_banner = $myhostname ESMTP $mail_name (Debian Sarge)
    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
    #mydomain = post.domain.tld
    myhostname = post.domain.tld

    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    #mydestination = localhost, domain.tld
    #mydestination = localhost.$mydomain, localhost

    virtual_alias_maps = hash:/etc/postfix/virtusertable
    mydestination = /etc/postfix/local-host-names

    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/



    Thanks for your help!
    MoMo
     
  2. till

    till Super Moderator

    Are these domains separate websites or co-domains?
     
  3. momo

    momo New Member

    They are seperate domains.. About 50 domains.
     
  4. till

    till Super Moderator

    Please have a look in the file /etc/postfix/virtusertable if the relations between email address => username where correct and if not, post some examples here.
     
  5. falko

    falko Super Moderator

  6. momo

    momo New Member

    Falko no:(

    My mail system is working like(www.postfix.org documentation):
    ,,As simple as can be: shared domains, UNIX system accounts"

    It should be:
    ,,Postfix virtual ALIAS example: separate domains, UNIX system accounts"
     
  7. momo

    momo New Member

    Examples:
    vidas2@www.****roup.** vidas2
    vidas@***roup.** vidas2
    vidas2@***roup.** vidas2
    buhalterija@www.***roup.** buhalterija2
    buhalterija2@www.***roup.** buhalterija2
    buhalterija@***roup.** buhalterija2
    buhalterija2@***roup.** buhalterija2
    ofisas@www.***ika.** ofisas
    ofisas@***ika.** ofisas
    jolanta@www.***ika.** jolanta5
    jolanta5@www.***ika.** jolanta5

    Thanks for help, shared domains is a little bit annoying thing:(
     
  8. falko

    falko Super Moderator

    Can you explain in more detail which email goes to which user, and where you wanted it to go?
     
  9. momo

    momo New Member

    Ok, I will try to explain:

    I have 100 users in ISPconfig ( unix accounts ), some users belongs to domain1.tld, some to domain2.tld etc. But it doesn't matter which domain will be used, the existing user will get email from all domains.

    Expl.
    User1: web1_tom
    can receive email from web1_tom@domain1.tld
    can receive email too from web1_tom@domain2.tld ( doesn't not belong to that domain )
    can receive emails on all domains...

    The other users can receive emails from all domains too.

    Then the users gets email(it's does'nt matter which domain used) in header is showing user_name@domain1.tld. All headers shows the same domain1.tld, not domain2 or domain3 that was really used.

    Don't know that to do with this:/
     
  10. till

    till Super Moderator

    And you are really sure that domain2 is not a co-domain of domain1 or vice versa? And domain1. Is not the "main" domain of your server, that is e.g. used in your postfix configuration or in /etc/hostname?
     
  11. falko

    falko Super Moderator

    Ok, now I understand. You're using the username instead of an alias before the @ sign, e.g. web1_tom@domain1.tld. Now what happens is this: an email for web1_tom@domain1.tld arrives on the server; Postfix checks /etc/postfix/virtusertable for the recipient address. Because it cannot find web1_tom@domain1.tld in that file (it lists only email aliases, not real users), it checks if there's a system user web1_tom. The same goes for web1_tom@domain2.tld. That's why web1_tom receives all those emails.
    If you create an email alias like tom@domain1.tld, this email alias is listed in /etc/postfix/virtusertable (e.g.
    Code:
    tom@domain1.tld  web1_tom
    ).
    Now if you send an email to tom@domain1.tld, the email arrives in web1_tom's mailbox. If you send an email to tom@domain2.tld, Postfix cannot find it in /etc/postfix/virtusertable, and as there's no system user tom, the email gets bounced.
     
  12. momo

    momo New Member

    Oh no, now I understand the situation too... It's totally bad:(
    I disabled the prefix in ISPconfig, so all email usernames are the same as email part before@, except them the username is taken, when I used username2 instead. That you suggest to do to me? I have too many users to change the usernames, can I do something apart this? The best idea would be to user webXX prefix... but how to reverse time back now?:)

    Thanks,
    MoMo
     
  13. falko

    falko Super Moderator

    The only way is to remove all users and recreate them with a prefix...
     

Share This Page