Can you specify multiple mailhost's in the /etc/hosts file?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Can you specify multiple mailhost's in the /etc/hosts file?
# 1  
Old 01-31-2012
Can you specify multiple mailhost's in the /etc/hosts file?

Hello,

This question has been posted by another member previously, but no reply/answer was posted to that thread and it has been closed. Searches do not seem to turn up a straight answer as to whether or not this is possible.

So I ask the same question:
We recently had our SMTP server go down and critical messages from our servers were not delivered. I would like to know if it's possible to configure the etc/hosts file to designate a "primary" and "backup" mailhost (i.e. if the connection to the "primary" fails, then try the "backup".

Thanks in advance for any input or guidance.
# 2  
Old 02-02-2012
Nothing to do with /etc/hosts.. So answer is no...
It is more a DNS concern.
# 3  
Old 02-02-2012
We know nothing about your Operating System or mail software.

With sendmail you would normally configure the "DS" line in sendmail.cf to point to a named mail host (not an IP address). If you are using /etc/hosts not DNS, you can manually edit /etc/hosts to point to the standby server in case of emergency.
I don't know a way to configure a standby server with sendmail itself.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to copy a tar file on a series of remote hosts and untar it on those hosts?

Am trying to copy a tar file onto a series of remote hosts and untar it at the destination. Need to do this without having to do multiple ssh. Actions to perform within a single ssh session via shell script - copy a file - untar at destination (remote host) OS : Linux RHEL6 (3 Replies)
Discussion started by: sankasu
3 Replies

2. Shell Programming and Scripting

Ssh to multiple hosts and then run multiple for loops under remote session

Hello, I am trying to login to multiple servers and i have to run multiple loops to gather some details..Could you please help me out. I am specifically facing issues while running for loops. I have to run multiple for loops in else condition. but the below code is giving errors in for... (2 Replies)
Discussion started by: mohit_vardhani
2 Replies

3. Shell Programming and Scripting

Run a command on multiple hosts

I created a script to check for tsm backup status on linux hosts. Script uses a source file to connect to each host and run a dsmc command on each host and write the output back to a output file located on the parent server where the script is running. The script works fine for the first 2 hosts... (4 Replies)
Discussion started by: svajhala
4 Replies

4. UNIX for Dummies Questions & Answers

How to search using ssh on multiple hosts?

Hi guys - I am having a hard time trying to figure how to search for a certain string on config files hosted on multiple hosts. This is an example: Hostnames: myhost1.mycompany.com|myhost2.mycompany.com|myhost3.mycompany.com String to search for: myipaddress.somehost.com Directory... (9 Replies)
Discussion started by: DallasT
9 Replies

5. UNIX for Dummies Questions & Answers

Can you have multiple mailhost's in the /etc/hosts file?

We recently had an smtp server go down and didn't have a backup. Now that the backup server is up and running, I'd like to set up sendmail on our Solaris 10 servers to failover to the backup mail (smtp) server if the primary refuses connections. I've googled "mailhost" and haven't found... (0 Replies)
Discussion started by: the.gooch
0 Replies

6. Shell Programming and Scripting

script to reboot multiple hosts

Hi Expert, How to create a script to reboot multiple hosts in linux? Thank you. (5 Replies)
Discussion started by: regmaster
5 Replies

7. UNIX for Dummies Questions & Answers

Deleting Multiple Lines in Hosts File

Hello all, I'm using the Bash shell on Solaris 8. Please can someone tell me how I can delete multiple lines in the hosts file? I have a list of hosts that I want to quickly delete in the hosts file, but I'm looking for a quicker way than using VI to delete the lines one by one. Regards,... (4 Replies)
Discussion started by: wthomas
4 Replies

8. Shell Programming and Scripting

automate ftpget to multiple hosts

Hi Folks, I have scanned the threads all day and have not found anything close enugh to what I need. I'm probably more confused now than before. Here's what I'm trying to do: 1. automate for running in the early am. (I think I can handle the cron part) 2. get the newest file from a... (5 Replies)
Discussion started by: huntfishtrap
5 Replies

9. Shell Programming and Scripting

script for df output from multiple hosts

I am trying get "df -k" output from multiple hosts along with their hostnames via ssh, my script is appending the "df -k" output from all the nodes to a single file but not getting the hostnames for those nodes, just wondering how to pass more than one command via ssh or may be someone could come... (6 Replies)
Discussion started by: barkath
6 Replies

10. UNIX for Advanced & Expert Users

Copy a file to multiple hosts

Hi, I need to copy a file ( say 1MB file ) to multiple hosts( no of machines is huge). What would be the most optimal way of doing it with minimal user intervention ? Thanks, Sumit (5 Replies)
Discussion started by: sumsriva
5 Replies
Login or Register to Ask a Question