E-mail delivered to wrong account

Discussion in 'General' started by pjdevries, May 26, 2007.

  1. pjdevries

    pjdevries Member HowtoForge Supporter

    This is what I did:

    • Create a site www.domain.tld with DNS and DNS-MX checked. In this site created a user webXX_user1 with e-mail address user1@domain.tld and Administrator and catchAll-Email checked.
    • Create a site user2.domain.tld with DNS checked. In this site created a user webYY_user2 with e-mail address user2@domain.tld and Administrator and catchAll-Email checked.

    The problem is that e-mails addressed to user2 end up in the mailbox of user1. After I first discovered that, I also checked DNS-MX of site user2.domain.tld but that doesn't make a difference.

    Two observations:
    • When creating a sub domain in this manner, ISPConfig constructs a default e-mail address in the primary domain for users of the sub domain and it can not be changed.
    • Both the primary domain and the sub domain can have the catchAll-Email checked, while e-mail addresses for both domains "live" in the primary domain. I can imagine conflicts arising from that.

    Any idea what's going wrong here and how I can solve it?
     
  2. pjdevries

    pjdevries Member HowtoForge Supporter

    I figured it out. I'm still a Linux newbie so it took me some time before inspecting /etc/postfix/virtusertable. In there I discovered that the actual e-mail address created for the user of the subdomain is not user2@domain.tld, as ISPConfig shows on the ISP USer form, but user2@user2.domain.tld, just as one might expect. So the apparent problem turns out to be a small bug in ISPConfig.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    No thats not a bug, thats the intended behaviour. Email addresses where created for the main domain and all co-domains of a website if you do not set a domain to external mailserver.

    You just missed to create a co-domain with empty hostname for this website. This co-domain is created automatically when you did not set the domain limit too low.
     
  4. pjdevries

    pjdevries Member HowtoForge Supporter

    Thanx for the reply. Unfortunately I think I totally don't understand what you are trying to explain, which, by the way, is not your fault but probably my lack of knowledge and experience :eek:

    What I still don't understand is, why ISPConfig shows user@domain.tld as the (default) e-mail address of the user in the sub domain, while I would expect to see user@sub.domain.nl, which is also what I see in /etc/postfix/virtusertable. That's what's confusing me.

    By the way, I deliberately did not create a co-domain and followed one of your topics about creating a sub domain by creating a new site in the main domain. Why would I want to "create a co-domain with empty hostname"?
     
  5. falko

    falko Super Moderator ISPConfig Developer

    Because otherwise you have an email address like user@www.example.com, and not user@example.com.
     
  6. pjdevries

    pjdevries Member HowtoForge Supporter

    Aha, I didn't know that. In this particular case it's not a problem and maybe even preferable, but it's good to keep in mind for other situations.

    Thanks again.
     

Share This Page