# Re: Can't get net/smtp to send outside of LAN?

**URL:** <https://www.ruby-forum.com/t/re-cant-get-net-smtp-to-send-outside-of-lan/79358>\
**Category:** Ruby\
**Created:** [March 10, 2006, 4:59am UTC](https://www.ruby-forum.com/t/re-cant-get-net-smtp-to-send-outside-of-lan/79358 "2006-03-10T04:59:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PeSSSSaS\_Botp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ecd19e/32.png) [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Post date:** [March 10, 2006, 4:59am UTC](https://www.ruby-forum.com/t/re-cant-get-net-smtp-to-send-outside-of-lan/79358/1 "2006-03-10T04:59:25Z")

</div>

John N. Alegre [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] :

#if usr@domain is outside the LAN the mail never gets sent  
#either if the code  
#is run on ‘localhost’ or on a machine on the LAN with  
#‘machine’ replaced by  
#the IP of the SMTP server. I know ‘machine’ will serve as a  
#SMTP host for  
#mailers such as evolution or Mac OX X mailer because I use it  
#for that all  
#the time.

by default, for security reasons, most smtp servers do not allow relays.  
Specify in your smtp server the host IPs or networks you want to relay.

kind regards -botp

---

<div class="post-metadata">

**Author:** ![PeSSSSaS\_Botp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ecd19e/32.png) [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Post date:** [March 10, 2006, 3:19pm UTC](https://www.ruby-forum.com/t/re-cant-get-net-smtp-to-send-outside-of-lan/79358/2 "2006-03-10T15:19:17Z")

</div>

botp wrote:

> by default, for security reasons, most smtp servers do not allow relays. Specify in your smtp server the host IPs or networks \> you want to relay.
> 
> kind regards -botp

Exactly. That was the point of my earlier post regarding trying to send  
SMTP messages through my company’s Exchange box. Rather than return the  
message undeliverable the box just discards the messages as disallowed  
proxy attempts. But if I authenticate with the SMTP server with my POP  
credentials the messages go out okay. This is something that happens  
daily as I have several Ruby processes sitting there monitoring servers  
and network hardware log files for critical errors. If they occur then  
I am sent a cellular text message. If I don’t authenticate my SMTP  
session the messages would never go out…

---

<div class="post-metadata">

**Author:** ![PeSSSSaS\_Botp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ecd19e/32.png) [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Post date:** [March 13, 2006, 2:19pm UTC](https://www.ruby-forum.com/t/re-cant-get-net-smtp-to-send-outside-of-lan/79358/3 "2006-03-13T14:19:04Z")

</div>

Please see the [SOLVED] to this thread. It really had nothing to do  
with  
any of what you are saying. It was an error on the part of my ISP.  
Code  
as writen. No login, no password will relay just fine to my postfix /  
smtp  
box on the same LAN.

john
