Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send even local mail through to external SMTP server.

Status
Not open for further replies.

jai2001

Programmer
Jun 3, 2002
9
AU
Hi,

I'm pretty new to linux and have been trying to figure out how to configure sendmail for the past couple of days with no success.

I want to send all mail through an external SMTP server.
I have used sendmail.mc to specify the SMART_HOST and I can send mail to my external hotmail account. The problem is when I try to send to a username on the Domain (a local user), the email justs gets delivered to /var/spool/mail/user and doesn't go through the SMART_HOST.

How can I force all mail to go through my smart host?

Thanks,

Jai

I'm using Fedora. Does anyone know
 
Remove the domain from the w class, usually that's the /etc/mail/local-host-names file. Restart sendmail.
 
I checked the /etc/mail/local-host-names file and there are no domains listed.

could it be anything else?
 
I found the solution and will show the .mc file I used for anyone else wanting a solution.

I created myConfig.mc and added the following lines.


dnl # configure all mail to go external
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
OSTYPE(`linux')dnl
FEATURE(nullclient, mail.mydomain.com.au)dnl

After this i used m4 to create the sendmail.cf file like this:

# m4 myconfig.mc > sendmail.cf

I was in the /etc/mail directory when I issed the command.

After this I stoped sendmail and started it like this:

# /usr/lib/sendmail -q15m

Now all my mail goes through to mail.mydomain.com.au




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top