Find the answer to your Linux question:
Results 1 to 4 of 4
I have 5 or more domains/websites that I run and I need to be able to configure sendmail to send emails using Auth:LOGIN PLAIN with the correct details. For example ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    6

    Sendmail with multiple domains


    I have 5 or more domains/websites that I run and I need to be able to configure sendmail to send emails using Auth:LOGIN PLAIN with the correct details.

    For example when user1 sends email from the local network to the local mailserver the mailserver accepts the email and then sends it to the SmartHost Domain1.com and i can get this to send with the login information from a client-info.db file, upto here is working ok

    But then when user2 wants to send an email from domain2 i need sendmail to send it using a different set of credentials, ie using the mail.domain2.com mail server not domain1`s settings.

    I guess i probably need to set different environments for each domain so i can have multiple configurations of sendmail running for each of my domains but I`m not sure how to do this.

    Thanks

    Simon

  2. #2
    Just Joined!
    Join Date
    Nov 2006
    Posts
    13
    mention the relay for different in sendmail.cf file so as server
    can accept and send the outgoing messages to those domains
    configured in sendmail.cf file.

  3. #3
    Just Joined!
    Join Date
    Oct 2006
    Posts
    6
    How does send mail know what relay to use for what email senders?

    Do you mean add more RELAY_HOST() directives to the sendmail configuration?

    Simon

  4. #4
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,813
    This is what works for me (I run two domains through my mail server), and I have no RELAY_HOST(...) declarations in my M4 file:

    In my M4 file, I have:
    Code:
    define(`confDOMAIN_NAME', `<main_domain>')dnl
    ...
    MASQUERADE_AS(`<second_domain>')dnl
    MASQUERADE_DOMAIN(`<second_domain>')dnl
    ...
    in my /etc/mail/relay_domains file, I have:
    Code:
    <main_domain>
    <second_domain>
    in my /etc/mail/domaintable file I have:

    Code:
    <main_domain> = <second_domain>
    and in file /etc/mail/local-host-names I have all the possible aliases for my mailgate machine, including just the domains:

    Code:
    mail.<main_domain>
    mail.<second_domain>
    <main_domain>
    <second_domain>
    woody.<main_domain>
    woody.<second_domain>
    my mailserver's name is 'woody', and my DNS server reports 'mail' as a CNAME for it.

    Dont forget that you may need to set up /etc/mail/access and /etc/mail/virtusertable too (check the sendmail online docs for these). And you may need to run 'newaliases' before you restart your mailserver with the new config.
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •