#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    Maribor; Slovenia
    Posts
    21
    Rep Power
    0

    Configuring sendmail for different domains


    Hi,

    i am runing Sendmail v9 on FreeBSD 4.5 and for now hosting 5 different domains on sigle server and planing to add some more soon, with wich i will have problems soon too.
    Lets say i will have two users with same real name for example both John Doe, but for the first one i am hosting domain.com and for second one domain.net. Now both users would like to have same alias john.doe. I know i could solve this by adding records to virtusertable, but if i would have to set this for lots of users it would be very time consuming and unpractical.
    So my question is if it is posible to solve this any other way to set aliases separately for each domain.

    Thanx for answers in advance and if i have to post more detailed info please let me know.
  2. #2
  3. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    Now both users would like to have same alias john.doe. I know i could solve this by adding records to virtusertable, but if i would have to set this for lots of users it would be very time consuming and unpractical.
    The virtusertable is the way to go for this particular requirement. If you don't want to add names for every single domain, you can just forward all mail for that domain to one user, as follows:
    Code:
    @domain.net	joebloggs
    This will forward everything addressed to domain.net to joebloggs.
    Alex
    (http://www.alex-greg.com)
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    Maribor; Slovenia
    Posts
    21
    Rep Power
    0
    thanx for your answer alexgreg

    i guess i didn't put the question clear enough, so you missunderstood what i want to achive. so i will try to explain some more. if i wold do it in a way you suggested, tahn all mail from that domain would be forwarded to one user, but i would like to know if there are more users, lets say lots of them with same name (alias) in different domains, how would i do it than? is there a way to separate domains on a single server? i am just guessing, but is it possible to have more than one aliases file, one for each domain?

    maybe i should add this in my first post, the way in wich i am solving this now. so lets say i have two users with same name (alias) but in different domains.

    user 1
    name: john doe
    domain: domain.com
    username: jdoe
    alias: john.doe

    user 2
    name: john doe
    domain: domain.net
    username: doej
    alias: joh.doe

    so than i put records to virtusertable in taht way:

    john.doe@doamin.com jdoe
    john.doe@domain.net doej

    and that solves the problem for now, but in future as i said, there will more user with same name and there will be more and more chance to make a mistake and the mails will be delivered to wrong user, so i would like to solve this before it heppends.
    Last edited by kotolenko; January 28th, 2004 at 04:23 PM.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    Sendmail FAQ:
    Top 5 - the most frequently asked questions about sendmail

    1. Local config error: see 4.5
    2. Relaying denied: see 3.27
    3. Directory permissions: see 3.33
    4. Virtual hosting: see 3.7 & 3.28
    5. POP / IMAP: see 4.19

    [...]

    Q3.7 -- How do I manage several (virtual) domains?
    This question is answered in detail at the Virtual Hosting page.
    hth,
    M.

IMN logo majestic logo threadwatch logo seochat tools logo