Operating System - Tru64 Unix
1753428 Members
4731 Online
108793 Solutions
New Discussion юеВ

Re: Repoint the sendmail relay-host to <new host>

 
terrytapp
Advisor

Repoint the sendmail relay-host to <new host>

I have to repoint the sendmail relay host to a new server. Please let me know how to do it on the tru64. Please give me the steps.

Thanks

Terry
9 REPLIES 9
terrytapp
Advisor

Re: Repoint the sendmail relay-host to <new host>

Also i see the sendmail.cf under /var/adm/sendmail/sendmail.cf. Is this where i am suppose to add the new hostname? Please help.

Thanks

Terry
terrytapp
Advisor

Re: Repoint the sendmail relay-host to <new host>

I did some further digging and i find the current relay servers are set up in hostname.m4 file. How do i get the new relay host information in that file? Please help as i have worked only on HP-UX and not TRU64.

Thanks

Terry

Rob Leadbeater
Honored Contributor

Re: Repoint the sendmail relay-host to <new host>

Hi Terry,

You'll probably be best just using the "mailsetup" command to configure the new relay. This should generate the sendmail.cf for you...

Cheers,

Rob
Ivan Ferreira
Honored Contributor

Re: Repoint the sendmail relay-host to <new host>

You should use mailsetup, but if you want to change your mail host, you should search and replace using vi the /var/adm/sendmail/sendmail.cf file.

You will see lines like this:

R$*<@$*$N>$* $#smtpl $@mail.domain.com.py $:$1<@$2$N>$3 our domain; gw

# Parent domain
#
R$*<@$*$P>$* $#smtp $@mail.domain.com.py $:$1<@$2$P>$3 our domain; gw

# Nonlocal mail
#
R$*<@$+>$* $#smtp $@mail.domain.com.py $:$1<@$2>$3 use gateway


What you should do is to run in vi

1,$ s/mail\.domain\.com//newmail\.domain\.com/g

Dots should be scaped with backslash as they are regular expression symbols.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
terrytapp
Advisor

Re: Repoint the sendmail relay-host to <new host>

Ivan:

Thanks. Let me check the config and try this and post the results soon.

Thanks

Terry
terrytapp
Advisor

Re: Repoint the sendmail relay-host to <new host>

Here is what i have from my /var/adm/sendmail directory.

# cd /var/adm/sendmail
# ls -l
total 275
-rwxr-xr-x 1 bin bin 2435 Apr 12 1999 #.mrg..aliases
-rwxr-xr-x 1 bin bin 9495 Apr 12 1999 #.mrg..sendmail.cf
-rw-r--r-- 1 root bin 876 Apr 12 1999 .new..aliases
-rw-r--r-- 1 root bin 21503 Apr 12 1999 .new..sendmail.cf
-rw-r--r-- 1 root bin 0 Apr 12 1999 .new..sendmail.st
-rw-r--r-- 1 root bin 876 Apr 12 1999 .proto..aliases
-rw-r--r-- 1 root bin 21503 Apr 12 1999 .proto..sendmail.cf
-rw-r--r-- 1 root bin 0 Apr 12 1999 .proto..sendmail.st
-rw-r--r-- 1 root bin 876 Apr 12 1999 aliases
-rw-r--r-- 1 root system 4096 Sep 7 2002 aliases.dir
-rw-r--r-- 1 root system 1024 Sep 7 2002 aliases.pag
-rw-r--r-- 1 root system 26717 Nov 15 2006 vista1.cf
-rw-r--r-- 1 root system 26717 Aug 5 08:47 vista1.cf.OLD
-rw-r--r-- 1 root system 3919 Dec 10 2002 vista1.m4
-rw-r--r-- 1 root system 3919 Aug 5 08:48 vista1.m4.OLD
-rw-r--r-- 1 root bin 1026 Apr 12 1999 local.users
-rw-r--r-- 1 root system 26683 Aug 12 2003 peridot.cf
-rw-r--r-- 1 root system 3911 Dec 10 2002 peridot.m4
lrwxrwxrwx 1 root system 32 Jun 25 12:39 sendmail.cf -> /var/adm/sendmail/vista1.cf
-rw-r--r-- 1 root system 26717 Aug 5 08:16 sendmail.cf.OLD
-rw-r--r-- 1 root bin 21503 Apr 12 1999 sendmail.cf.old
-rw-r--r-- 1 bin bin 41073 Apr 12 1999 sendmail.cf.pd
-rw-r--r-- 1 root system 26687 Nov 15 2006 sendmail.cf_sec
-rw-r--r-- 1 root bin 808 Aug 11 13:34 sendmail.st

The current mail servers seems to defined in vista1.m4 file (as i cat for the mailservername in that file it shows up). in this case should i change the hostname.m4 file? (vista1.m4)

Thanks

Terry



terrytapp
Advisor

Re: Repoint the sendmail relay-host to <new host>

Ivan/All

I have checked the sendmail.cf file and the mail.doamin.com defined is our dns server as in

Parent domain
#
R$*<@$*$P>$* $#smtp $@mail.domain.com.py $:$1<@$2$P>$3 our domain; gw

when i grep for the current relay host in vista1.m4 file (vista1 is the hostname) i get the current mail relay hostname. so it looks like i should change the vista1.m4 file. how do i change this file? is this generated by mailsetup?

Thanks

Terry
terrytapp
Advisor

Re: Repoint the sendmail relay-host to <new host>

Ivan:

I have repointed the new mail relay host a you suggested (modifying sendmail.cf). How do i know if this works? How do i test it?

Thanks

Terry
Steven Schweda
Honored Contributor

Re: Repoint the sendmail relay-host to <new host>

> [...] How do i test it?

Send some e-mail, and see if it arrives?

If it does, look at the headers to see if it
passed through the expected systems.

man mailx