You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

I have a web server and am trying to relay a mail from my web server www.example.com running sendmail through my mail server mail.example.com running qmail-ldap.

I have enabled the SMART_HOST option, but i dont know, due to some misconfiguration in sendmail.mc or the sendmail auth file (/etc/mail/authinfo), I am unable to relay mails through my mail server to domains other than example.com.

Can anyone guide me in how I can send mails to the domain example.com as well as outside domains through qmail using sendmail. any help will be appreciated.

Your setup looks to be that of www.example.com, and usually the problem you describe indicates that there is a configuration issue on the server (mail.example.com). What I have found happening is that (in your case) mail.example.com accepts the mail to example.com because that is it's local domain; ie the mail is being accepted because of the recipient, not the sender.

Check the logs on both sides; the logs on www.example.com should indicate why the relay attempt is failing.

I would confirm that you can send email to a third domain through mail.example.com using a user mail client that is configured to use these credentials; once that works, try the sendmail on www.example.com again.

The only two differences I have with your configuration for www.example.com are:

- I would declare the authinfo as
FEATURE(authinfo)dnl;

- sometimes you have to put the IP address in your authinfo file in order for sendmail to find it ie

Thanx mackdav for those suggestions. I tried them out, but still no success. It seems smtp-authentication is not working when sendmail tries to connect to the qmail-ldap running on the mail server. I have the correct user ID and password combination in the authinfo file. I tried both the default way and also ur way, but its not working.

Unless smtp-authentication succeeds, my mail server will not allow anyone to relay mails through it. So, i think the only thing that we can try is to make smtp-auth work. Any ideas on how to resolve this ?

Do you have control over mail.example.com? What appears in the logs on mail.example.com when an attempt fails?

What bounce message do you get when you try to relay messages out? What appears in the logs on www.example.com?

Of course it still might not be that simple -- I have seen situations where smtp-auth sessions are still not permitted to relay from arbitrary domains (ie my ISP requires smpt-auth, but I cannot relay messages to the internet from my private domain through them).

Another thing you might check is to see if www.example.com is expecting you to connect on port 587 instead of port 25. Our mail servers require relaying-out users to use port 587 and inbound mail for "example.com" comes in on port 25. This would be consistent with the errors you are describing.