How do I configure my server to send email for all hosted domains?

Discussion in 'Installation/Configuration' started by qqwong, Sep 1, 2007.

  1. qqwong

    qqwong New Member

    My server's main domain is domainA.tld. One of my hosted site has domain domainB.tld. Using mail client, say Thunderbird, a user userB1 on domainB connects from a remote PC to the server. She receives her mails without problem.

    The problem happens when she sends mail to any destination except the domains hosted in the server. No mail can be sent to any where.
    The mail log is below:

    My question is how do I configure postfix to accept (authenticated) users of my hosted domains to send email via my server?

    I've followed the perfect setup howto to install my server. I'm using SuSE 10.2.


    Thanks in advance,
    Wai
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You must enable smtp autentication in thunderbird when sending emails.
     
  3. qqwong

    qqwong New Member

    Thanks, Till.
    I've enabled authentication in Thunderbird. I still can't send mail.

    I found in my mail.err log file the following message:

    Should ISPConfig create the password_maps file and set the postfix config parameter? or where can I find this file? or how do I create it?

    Wai
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Password maps is not used by ISPConfig.

    Please reconfigure your mail system, especially SASL, as described in the perfect setup howto. All authentication is done against /etc/passwd.
     
  5. qqwong

    qqwong New Member

    I have followed the perfect setup. I still get the fatal error shown above.

    Here is my main.cf. Can you see anything wrong?

     
  6. falko

    falko Super Moderator Howtoforge Staff

    Please try this:
    Code:
    postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd'
    Restart Postfix afterwards.
     
  7. qqwong

    qqwong New Member

    Thank you, Falko.

    I tried what you suggested. Restarted postfix and saslauthd.

    No more fatal error message in my mail.err log file. But postfix still does not accept connection from a remote PC and not send mail to external destination.
    I still get the message

    554 Recipient address rejected: Relay access denied;

    Can anyone help please?

    Wai
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Please enable smtp authentication in your email client.
     
  9. qqwong

    qqwong New Member

    I've checked the "Use name and password" box in Thunderbird. Does this enable smtp authentication?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, this enables the smtp authentication.
     
  11. qqwong

    qqwong New Member

    Thanks, Till.

    But My server still does not relay mail for remote connection.

    I tried to find out the cause. I connect to the mail server using telnet.
    I got the following:

    It seems that the mail server doesn't know it needs to authenticate the user. How can I tell mail.domainA.tld to authenticate the user?

    Looking at the main.cf,

    smtp_sasl_auth_enable = yes
    smtpd_sasl_auth_enable = yes

    sasl authentication has been enabled. I have restarted saslauthd and I can see the process is running.

    Any ideas about what I've done wrong?

    Wai
     
  12. falko

    falko Super Moderator Howtoforge Staff

    Are you sure you enabled SMTP-AUTH in your email client?

    What's the output of
    Code:
    telnet localhost 25
    and then
    Code:
    ehlo localhost
    ?
     
  13. qqwong

    qqwong New Member

    Thanks, Falko.

    Here is the output
    Can you see anything wrong?

    Wai
     
  14. falko

    falko Super Moderator Howtoforge Staff

    Looks good.

    Are you sure you use the correct options in your email client?
     
  15. qqwong

    qqwong New Member

    Falko,

    I looked closer at the output above. The only difference between mine and the example given in the perfect setup is the two AUTH lines

    LOGIN is before PLAIN in the perfect setup. Does this affect how smtpd ask for authentication? How can I swap these?

    Thanks,

    Wai
     
  16. falko

    falko Super Moderator Howtoforge Staff

    I don't think the order is a problem...
     

Share This Page