LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 01-04-2007, 09:43 AM   #1
link1305
Member
 
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 1.2.3.4, then it gets forwarded to 5.6.7.8?

Essentially, 5.6.7.8 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 1.2.3.4), 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 5.6.7.8 when it detects a client_addr of 1.2.3.4.

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

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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, 01:24 PM   #3
link1305
Member
 
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.
 
  


Reply



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 07:55 AM
Sendmail as SmartHost to route MS exchange 2003 Internal mail cksoo Linux - Enterprise 4 01-15-2007 10:34 AM
Howto configure sendmail SMARTHOST with authentication?? jfaberna Linux - Networking 3 02-22-2006 09:00 PM
sendmail: deliver every mail directly to the given smarthost TobyD Linux - Networking 3 02-18-2005 05:52 AM
Yet another Sendmail thread... SMARTHOST not working mychl Linux - Networking 1 03-15-2004 08:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:54 AM.

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