LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Force sendmail to send mail on an ip address (https://www.linuxquestions.org/questions/linux-software-2/force-sendmail-to-send-mail-on-an-ip-address-385745/)

sdave1284 11-23-2005 03:19 AM

Force sendmail to send mail on a certain ip address
 
I have been using sendmail for our mail server for quite some time. When the server sends email, it sends it from the base ip address for eth1. I want the mail server to send on a virtual interface ip address. How do I configure sendmail to do this?

Finlay 11-23-2005 12:11 PM

what distro you using?

Finlay 11-23-2005 12:17 PM

you will need to find the sendmail.mc file that was used to configure sendmail to begin with.
then you edit it to have:
DAEMON_OPTIONS(`Port=smtp,Addr=xxx.xxx.xxx.xxx, Name=MTA')
DAEMON_OPTIONS(`Port=smtps,Addr=xxx.xxx.xxx.xxx, Name=MSA-SSL, M=E')

the smtps is if you are using sasl or some other kind of secure connection
after it is edited then you need to create the sendmail.cf file, copy it over the current one, for slackware that is in /etc/mail

then restart sendmail
make sure you have the virtual IPs set to be created in a script that runs before sendmail starts, otherwise sendmail will fail because the IP doesn't exist

sdave1284 11-23-2005 02:03 PM

I added that to the configuration. Now it only allows mail clients to use that ip address for their outgoing mail server, but header information in emails I send still show up as coming from eth1's main ip address and not the virtual ip address I put in the daemon options. Any other ideas to force it to send the emails via eth1:0 instead?

BTW, i'm using Sendmail 8.13.1/8.13.1 and Slackware 10.0

Finlay 11-23-2005 02:32 PM

good question, i just noticed my server is doing the same thing.
i will have to research this, and if anyone has the answer...

i tried adding:
define(`confDOMAIN_NAME', `mail.mydomain.tld')dnl
and recompiling the sendmail.cf but no change

sdave1284 11-23-2005 02:44 PM

Yeah I did the same. No change too. Its very frustrating. There are no answer to this online. I guess the only solution is to make the IP address of the mail server the main ip for eth1 and make the other address the virtual address. I just didnt want to do this because our T3 provider wants our server (router) to have that main address setup on eth1. Ahh frustrating.

Finlay 11-23-2005 05:17 PM

i'm going to post this issue in the networking section, maybe someone has a fix

Finlay 11-23-2005 05:27 PM

Here is what i posted:
http://www.linuxquestions.org/questi...hreadid=385941

sdave1284 11-23-2005 11:26 PM

Wow your post has so much more info than mine. Thanks for helping.


All times are GMT -5. The time now is 11:09 AM.