How to change IP adress of mailserver in Solaris?


 
Thread Tools Search this Thread
Operating Systems Solaris How to change IP adress of mailserver in Solaris?
# 1  
Old 12-27-2012
How to change IP adress of mailserver in Solaris?

Hi all,

Our IT changes mailserver's IP address and I am trying to change it but with no success.
I am running Solaris 10.
I changed IP address of mail server in /etc/hosts file, performed make sendmail.cf but server still sends mais using old IP.

Quote:
-bash-3.00# more /etc/hosts
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
10.15.208.88 analizator analizator.com loghost
10.10.1.86 mail.azerfon.az mailhost
10.75.58.83 sms.narmobile.az
-bash-3.00#

Can anyone let me know which actions have to be done to change IP address of mail server please?

Thanks in advance,
Roman
# 2  
Old 12-27-2012
Do you have a smarthost defined in your sendmail configuration? If so, change it there and restart sendmail.

If you use the *.mc macro files, look for a line like
Code:
define(`SMART_HOST', mail.example.com)dnl

After changing sendmail.mc, don't forget to run make

Otherwise look into the sendmail.cf file and find a line like
Code:
DSmail.example.com

and change accordingly.
# 3  
Old 12-27-2012
Hi Hergp,

Thanks for the answer.
We've changed only IP address of mail server, its name still same.
Here it is what i have in sendmail.cf file:

Quote:
# "Smart" relay host (may be null)
DSmail.azerfon.az
DSsms.narmobile.az
and my hosts file:

Quote:
-bash-3.00# more /etc/hosts
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
10.15.208.88 analizator analizator.com loghost
10.10.1.86 mail.azerfon.az mailhost
10.75.58.83 sms.narmobile.az
-bash-3.00#
after changing IP in hosts file I restarted mail server with commands:

Quote:
399 svcadm disable svc:/network/smtp:sendmail
400 svcadm enable svc:/network/smtp:sendmail
And even restarted server, but issue still remain...
# 4  
Old 12-27-2012
First, does
Code:
getent hosts mail.azerfon.az
getent hosts sms.narmobile.az

print the correct IP addresses?

Further, I don't think, repeating the DS macro is the correct way to define multiple smarthosts. Afaik it should be
Code:
DSmail.azerfon.az:sms.narmobile.az

# 5  
Old 12-27-2012
I changed as u said:

Code:
DSmail.azerfon.az:sms.narmobile.az

Then run command:

Code:
-bash-3.00# /usr/ccs/bin/make sendmail.cf
`sendmail.cf' is up to date.

and:

Code:
-bash-3.00# getent hosts mail.azerfon.az
10.10.1.86      mail.azerfon.az mailhost
-bash-3.00# getent hosts sms.narmobile.az
10.75.58.83     sms.narmobile.az
-bash-3.00#

When I am trying to send test mail using

Code:
echo "swdfsdf "  | /usr/bin/mailx -s "MSS04 Clear Code 1 > 95" rrosliy@azerfon.az

and doing snoop in other window for 10.10.1.86 I can see that nothing happens:

Code:
-bash-3.00# snoop -r 10.10.1.86
Using device /dev/ce (promiscuous mode)

But if I am doing snoop to old mailserver's IP, I can see:

Code:
-bash-3.00# snoop -r 10.13.44.16
Using device /dev/ce (promiscuous mode)
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 220 ***************\r
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 EHLO analizator.com\r
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 250-mail.azerfon.az\r
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 MAIL From:<root@anal
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 250 2.1.0 Ok\r\n
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 RCPT To:<root@analiz
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 554 5.7.1 <root@anal
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 RSET\r\n
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 250 2.0.0 Ok\r\n
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 RSET\r\n
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 250 2.0.0 Ok\r\n
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 MAIL From:<> SIZE=12
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 250 2.1.0 Ok\r\n
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 RCPT To:<root@analiz
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 554 5.7.1 <root@anal
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 RSET\r\n
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 250 2.0.0 Ok\r\n
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 RSET\r\n
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 250 2.0.0 Ok\r\n
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 MAIL From:<> SIZE=23
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 250 2.1.0 Ok\r\n
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 RCPT To:<postmaster@
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 554 5.7.1 <postmaste
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 RSET\r\n
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 250 2.0.0 Ok\r\n
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 QUIT\r\n
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 221 2.0.0 Bye\r\n
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 
10.15.208.88 -> 10.13.44.16  SMTP C port=32955 
 10.13.44.16 -> 10.15.208.88 SMTP R port=32955 
10.15.208.88 -> 10.13.44.16  SMTP C port=32956 
 10.13.44.16 -> 10.15.208.88 SMTP R port=32956 
10.15.208.88 -> 10.13.44.16  SMTP C port=32956 
 10.13.44.16 -> 10.15.208.88 SMTP R port=32956 220 ***************\r
10.15.208.88 -> 10.13.44.16  SMTP C port=32956 
10.15.208.88 -> 10.13.44.16  SMTP C port=32956 EHLO analizator.com\r
 10.13.44.16 -> 10.15.208.88 SMTP R port=32956 250-mail.azerfon.az\r
10.15.208.88 -> 10.13.44.16  SMTP C port=32956 
10.15.208.88 -> 10.13.44.16  SMTP C port=32956 MAIL From:<rrosliy@a
 10.13.44.16 -> 10.15.208.88 SMTP R port=32956 250 2.1.0 Ok\r\n
10.15.208.88 -> 10.13.44.16  SMTP C port=32956 RCPT To:<rrosliy@aze
 10.13.44.16 -> 10.15.208.88 SMTP R port=32956 250 2.1.5 Ok\r\n354 En
10.15.208.88 -> 10.13.44.16  SMTP C port=32956 Received: (from root
 10.13.44.16 -> 10.15.208.88 SMTP R port=32956 
10.15.208.88 -> 10.13.44.16  SMTP C port=32956 
 10.13.44.16 -> 10.15.208.88 SMTP R port=32956 250 2.0.0 Ok: queued
10.15.208.88 -> 10.13.44.16  SMTP C port=32956 QUIT\r\n
 10.13.44.16 -> 10.15.208.88 SMTP R port=32956 221 2.0.0 Bye\r\n
 10.13.44.16 -> 10.15.208.88 SMTP R port=32956 
10.15.208.88 -> 10.13.44.16  SMTP C port=32956 
10.15.208.88 -> 10.13.44.16  SMTP C port=32956 
 10.13.44.16 -> 10.15.208.88 SMTP R port=32956

So it means that mailx using old IP...
Any idea?

Thanks.
# 6  
Old 12-27-2012
Check, if any other files in /etc/mail contain the old IP address (10.13.44.16). /etc/mail/mailertable would be a candidate for this.

---------- Post updated at 11:41 ---------- Previous update was at 11:40 ----------

And BTW: you don't have to run make, when you edit sendmail.cf directly. It is only used to compile the sendmail.cf file from sendmail.mc.
# 7  
Old 12-27-2012
Code:
-bash-3.00# pwd
/etc/mail
-bash-3.00# grep 10.13.44.16 *
-bash-3.00# 
-bash-3.00# 
-bash-3.00# find . | xargs grep '10.13.44.16'
-bash-3.00# 
-bash-3.00# 
-bash-3.00# 
-bash-3.00# grep 10.10.1.86 *
-bash-3.00# find . | xargs grep '10.10.1.86'
-bash-3.00#

I think that IP address specified in some other place, not in /etc/mail.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Postfix - If To: address is $x. Change From: adress to $y

Hello, hopefully somebody can give me a clue on how to do this. Right now I have emails coming from company1-alert@company1.com to distribution@ourcompany.com. I want to set up something in Postfix so that if the email is going to distribution@ourcompany.com, the From: address is... (2 Replies)
Discussion started by: TayKimchi
2 Replies

2. Linux

configure mailserver

Hi , I am using windows xp as my web server and domain hosting with godaddy.com My issue is , i want to create mailserver in linux for my website is it possible? (1 Reply)
Discussion started by: harishindn
1 Replies

3. Solaris

How to configure mailserver

Hi All, Can you please help me in configuring mail server on Solaris 10? Will appreciate if I can get some link which can explain the steps Thanks (3 Replies)
Discussion started by: kumarmani
3 Replies

4. Cybersecurity

found exploit mailserver through mailq?

First of all an appeal on all specialists to be understandfull with me, newbie. I have a RaQ 550 that I have to admin bymyself. I have executed mailq and found out that there are mails in the queu that I did not sent. Is someone exploiting my server? Here is an example of the report: ... (1 Reply)
Discussion started by: rolandk
1 Replies

5. HP-UX

Change IP Adress

I want change my IP address and hostname in my machine by use the console. Can any one tell me how can I execute that by command ? Thanks & Regards (1 Reply)
Discussion started by: magasem
1 Replies

6. UNIX for Dummies Questions & Answers

How to change the MAC adress in ethernet adapter for SUN

I have installed in the server a quad ethernet adapter, I'm using two interfaces with two different IP networks, both interfaces are connected to a switch, the switch report that is receiving the same MAC address in both ports so must of the times I have connectivity problems. Any idea to change... (1 Reply)
Discussion started by: mono673
1 Replies

7. Linux

mailserver

I have a mail server that I have just finished setting up and now the problem is telneting to it from a window desktop which is on the same network. Ive edited etc/mail/sendmail.mc by removing the loopback address with my desktop IP. then I restarted my service mail: shutting down sendmail: ... (1 Reply)
Discussion started by: keliy1
1 Replies

8. UNIX for Dummies Questions & Answers

Mailserver problems.

I seem to be having some troubles with my mailserver. Sendmail is working properly as far as I can tell, and so is IMAP and POP3, but whenever I try to log in via IMAP or POP3 I get an incorrect password error even though Iam using the proper password. Ive even tried telnet which yields this: $... (2 Replies)
Discussion started by: djtrippin
2 Replies

9. IP Networking

mailserver

hi I want to setup pop3 server, so i can accept incoming mail with my own domainname for example stormpie@my-domain.org the unix server is in a windows2000 network, behind a win2000 router not in domain, how can i do this?? plz help me greetz (1 Reply)
Discussion started by: Stormpie
1 Replies

10. UNIX for Dummies Questions & Answers

Mailserver Requirements

Hello, I want to setup a mailserver for an company having 25 users presentlly. Basically i am setting up first time. I want to know what are the minimum requirement for a mail server ie 1. Whether we require a domain name ( we can have our own domain name?) 2. whether we require a legal IP... (1 Reply)
Discussion started by: bache_gowda
1 Replies
Login or Register to Ask a Question