Operating System - HP-UX
1751894 Members
5269 Online
108783 Solutions
New Discussion юеВ

Re: Forwarding Email Via Another Server

 
SOLVED
Go to solution
Siddhartha S Sinha
Occasional Advisor

Forwarding Email Via Another Server

I have a specific situation. I have one Server (RX2600) connected to internet. I can send email from that Server with mailx command. And .forward also working fine from this Server. This box has two lan card. One is going to Internet and another to Intranet. And only way I can access the Intranet HP boxes is that I have to ssh the RX2600 box and from there I can either ssh or telnet to other boxes. Now is there a way I can get all the EMS messages from my Intranet Servers. I mean if my Ignite Server (Intranet) got any hardware error how I can get it to my email i.e. it has to send the mail to rx2600 and then rx2600 will forward to appropriate users.
Any idea which files I need to change. I did change the /etc/ec.config.d/mailservs. And the entries are in Ignite Server is as follows

export SENDMAIL_SERVER=1
export SENDMAIL_SERVERNAME=rx2600

and some other entries

and the same file in rx2600 is

SENDMAIL_SERVER=1
SENDMAIL_SERVERNAME=

Thanks in advance for your help.
5 REPLIES 5
Steven E. Protter
Exalted Contributor
Solution

Re: Forwarding Email Via Another Server

Shalom,

What you have done thus far is set the sendmail daemon to start when the machine does and RECEIVE mail. You have also given it a name.

vi your sendmail.cf file

Change

DS

DSrx2600

or

DS
[192.168.0.20]

Where rx2600 or 192.168.0.20 is the ip address of the mail server you wish to relay mail through.

Save the file and then restart sendmail.

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

Lately sendmail's newere releases have required sendmail to run to deliver mail, though that can be defeated.

Lastly, the server you are relaying to must explicitly be set up to accept mail or it will all be bounced back.

diagnostics:

sendmail -v -d8.99 -d38.99 email@your.net

type some text

.


You will get verbose diagnostics that will help you deal with problems.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Siddhartha Sinha
Occasional Advisor

Re: Forwarding Email Via Another Server

Hi SEP,

Thanks a lot for your reply. I tried that but it seems that I have to setup firewall rule for each of the interface. Because I don't want anyone to see smtp port open when they see it from lan0 (connected to Internet) but everybody from lan1 (intranet) should be able to see it. Now I setup some IPFilter rules and looks like Firewall rull is correct now. I have total 42 ports open(LSOF shows that). But from from outside world only SSH port is visible. So it might be good. I will try to configure SMTP to run in demon mode now and see if it can accept mails from other intranet servers. I will try that sometimes soon.
Siddhartha S Sinha
Occasional Advisor

Re: Forwarding Email Via Another Server

I change some setting in the firewalla and I can forward mails from my Ignite server. But Can't send from any other server in the same sebnet ex. N4000. Any clue. I checked all the setting of sendmail.cf, senmail.cw. and mailservs. I checked the firewall rull also and can telnet to smpt port from Intranet Servers and it is not available from Internet. I changed lot of files and fotgot which is the exact file to change. When I am sening mail from Ignite Server it relays properly. But when I am doing from n4000b it connects and then said relay denied. Any idea ?
mwagiru
Frequent Advisor

Re: Forwarding Email Via Another Server

Hi,
I tried but I keep getting this:


;; Querying server (# 1) address = 172.29.200.99
;; Querying server (# 2) address = 172.29.200.134
;; Querying server (# 3) address = 172.29.200.199
;; Querying server (# 1) address = 172.29.200.99
;; Querying server (# 2) address = 172.29.200.134
;; Querying server (# 3) address = 172.29.200.199
;; Querying server (# 1) address = 172.29.200.99
;; Querying server (# 2) address = 172.29.200.134
;; Querying server (# 3) address = 172.29.200.199
;; Querying server (# 1) address = 172.29.200.99
;; Querying server (# 2) address = 172.29.200.134
Siddhartha S Sinha
Occasional Advisor

Re: Forwarding Email Via Another Server

I changed the firewall settings and it worked. Sorry for late update.