Operating System - HP-UX
1825759 Members
2286 Online
109687 Solutions
New Discussion

How to send mail thru an external SMTP server?

 
SOLVED
Go to solution
VARITRONIX
Occasional Advisor

How to send mail thru an external SMTP server?

My situation is like this: I have an UNIX server and it has SMTP enabled. However, I also have a FIREWALL that drops all in and out traffics from Internet. Therefore, now I have no way to send mail from UNIX server to outside.

Therefore, I want to setup an external SMTP server so that all mails from my UNIX server would be routed to this SMTP server first before distributed. Would any of you tell me how to set this up? Thousands thanks!!
Kwan Chris
2 REPLIES 2
Steven Sim Kok Leong
Honored Contributor
Solution

Re: How to send mail thru an external SMTP server?

Hi,

1) Enable the firewall to allow outgoing SMTP traffic from your host to your external SMTP server. If you only intend to send and not receive emails at your host, incoming SMTP traffic does not need to be allowed through your firewall.

2) If you only intend to send and not receive emails at your host, you do not need to run the sendmail daemon at the SMTP port at your host. Your external SMTP server need to run a mail daemon such as sendmail.

3) Your DNS needs to register your external SMTP server as a mail exchanger ie. there must be a MX record bind to your SMTP server.

4) Usually, your sendmail.cf by default on your host is sufficient as the DNS is relied for identifying the correct MX to send your email out. However, You will need to configure the configuration files (such as sendmail.cf) at your external SMTP server to allow your external SMTP server to run as a mail relay and any additional requirements such as anti-spamming rules.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Barry_2
Occasional Advisor

Re: How to send mail thru an external SMTP server?

In addition to what have been said before, once dns acces have been set, firewall policy too, you might use the DS macro in the '/etc/mail/sendmail.cf' to your smtp relay machine such as 'DS myrelay.foo.com'.
According to the fact that relaying has been enabled to your machine (and only !)
Grip the Unix Banner