Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-10-2006, 01:38 PM
|
#1
|
|
Senior Member
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-13.1
Posts: 1,010
Rep:
|
how to force sendmail to use a specific interface
Currently my sendmail sends mail using the default route.
i have multiple interfaces and want to force sendmail to use one that isn't the default route.
is there a way for me to force sendmail to use a different interface then the default route?
Thanks
|
|
|
|
05-11-2006, 06:49 PM
|
#2
|
|
Member
Registered: Sep 2003
Location: Central Coast, California
Posts: 179
Rep:
|
by route you mean interface e.g. IP address?
there is a section in your /etc/mail/sendmail.mc file that you can uncomment,edit then 'm4'
dnl # orig: DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
or edit your /etc/mail/sendmail.cf on this line
O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA
HTH
|
|
|
|
05-11-2006, 06:55 PM
|
#3
|
|
Senior Member
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-13.1
Posts: 1,010
Original Poster
Rep:
|
default route meaning if a program doesn't specify the NIC/interface/IP to use to send packets then it will default to a certain one.
I have already done the changes you mentioned above, they only apply to what IP sendmail will LISTEN to not SEND on
|
|
|
|
05-11-2006, 06:59 PM
|
#4
|
|
Member
Registered: Sep 2003
Location: Central Coast, California
Posts: 179
Rep:
|
you probably want to edit the default route in the routing table...
Read about the route command which can change your routing table. On boot I usually just set the default route w/ a script.
This prints your routing table.
#> route
|
|
|
|
05-13-2006, 05:28 AM
|
#5
|
|
Member
Registered: May 2006
Location: Los Angeles, CA USA
Distribution: RHAS3, RHAS4, RHEL4, RH6, RH7.2, FC2-7, Gentoo, DSL
Posts: 49
Rep:
|
As you have multiple NICs I assume that for some reason you want ONLY SMTP (outgoing mail) to use a route other than the default (other outgoing connections to services (ports) use the default) ??
If so, you obviously cannot change your route with as suggested by others. I never ran across this exact problem before so even dug out my sendmail book and looked there -- no configuration directive for sendmail.mc (at least that I could find). So, I would look at setting up iptables to route only outgoing port 25 (SMTP) out on a specific interface. That's the only thing I can think of right now that may solve what I think you say is your problem.
|
|
|
|
05-14-2006, 03:13 PM
|
#6
|
|
Senior Member
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-13.1
Posts: 1,010
Original Poster
Rep:
|
ok the IPtables is better than changing the default route, i will do that.
thank you all for responding
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:17 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|