LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   sendmail relay for local addresses (https://www.linuxquestions.org/questions/linux-server-73/sendmail-relay-for-local-addresses-927730/)

vahab 02-05-2012 07:41 AM

sendmail relay for local addresses
 
Hi,

I have some problems regarding sendmail relay configuration.

I have a redhat server named server1.mydomain.com
It this server, sendmail is installed with default configuration.
I only added the following line to my sendmail.mc :

define(`SMART_HOST', `smtp.mydomain.com')dnl


So when I use the following command :
echo "Test" | mail myemailaddress@yahoo.com

It works fine and sends email to my yahoo account.

The problem is when I am working as a normal user for example "john" and run the following command :

echo "Test" | mail john

It still tries to use smart relay for mail delivery , so an email to john@server1.mydomain.com will be stuck in our company mail server (smtp.mydomain.com)

What I need to know is to find a way to prevent my SendMail to send these email to SmartHost and just store them in local mailbox of user john.

Thanks in advance.

deep27ak 02-06-2012 04:47 AM

use this command to send mail and show me the output

Code:

#sendmail -v user1@server1.mydomain.com

and show me the message logs

Code:

#cat /var/log/messages


All times are GMT -5. The time now is 04:32 PM.