Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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 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 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.



  2. #2
    mention the relay for different in file so as server
    can accept and send the outgoing messages to those domains
    configured in file.

  3. #3
    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?


  4. $spacer_open
  5. #4
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Nottingham, England
    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:
    define(`confDOMAIN_NAME', `<main_domain>')dnl
    in my /etc/mail/relay_domains file, I have:
    in my /etc/mail/domaintable file I have:

    <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:

    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

Posting Permissions

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