Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-04-2007, 10:43 AM   #1
Registered: Oct 2003
Location: Cleveland, Ohio
Distribution: Gentoo
Posts: 53

Rep: Reputation: 15
Sendmail configuration (conditional smarthost?)

Hi all,

I have a pretty simple question which I haven't been able to find an answer to, or even determine if it's possible.

With sendmail, can I add a rule or change the config in such a way that: If an email gets sent through my server from address, then it gets forwarded to

Essentially, is an email/virus scanning service for my company, and I would like to forward only emails that come from a certain internal server (which is, to the scanning service. I know I could forward all emails using the Smart host config line, but I don't want to do that.

Is there any possible way to do this with once instance of Sendmail? I suppose I could set up another instance on another port, and just have my one internal server connect to that, but I want to exhaust all my options with one instance first.

From the documentation, it looks like the ${client_addr} variable is what I could use to determine the connecting server, but I don't know how to tell sendmail to forward the message to when it detects a client_addr of

Any ideas?
Old 01-04-2007, 02:06 PM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,075
Blog Entries: 14

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
I think you can do it with smarttable setup. We did this for specific domains on emails rather than IPs but a quick Google search seems to indicate others have done it for IP addresses.

Just do a search for containing "sendmail" and "smarttable".
Old 01-08-2007, 02:24 PM   #3
Registered: Oct 2003
Location: Cleveland, Ohio
Distribution: Gentoo
Posts: 53

Original Poster
Rep: Reputation: 15
Thanks, I'm going to try that and hope it works with IP's instead of Domains/email addresses. I hadn't heard of that before.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail ignores my sendmail smarthost entry Paul_assheton Linux - General 1 03-17-2009 08:55 AM
Sendmail as SmartHost to route MS exchange 2003 Internal mail cksoo Linux - Enterprise 4 01-15-2007 11:34 AM
Howto configure sendmail SMARTHOST with authentication?? jfaberna Linux - Networking 3 02-22-2006 10:00 PM
sendmail: deliver every mail directly to the given smarthost TobyD Linux - Networking 3 02-18-2005 06:52 AM
Yet another Sendmail thread... SMARTHOST not working mychl Linux - Networking 1 03-15-2004 09:32 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:25 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration