John N. Alegre
3/10/2006 4:20:00 PM
Logan Capaldo wrote:
>
> On Mar 9, 2006, at 3:33 PM, gregarican wrote:
>
>>
>> Are you 100% sure there is no username/password combo stored in a
>> keychain or any other place on your Mac? If there is that's why the
>> Mac
>> is automatically referencing this. Much like how my Outlook/Exchange
>> environment stores my information. But if I want to access raw SMTP
>> using Ruby I need to manually authenticate. Just a wild guess...
>
> Are you sure you're not confusing SMTP with POP? You as a general
> rule don't have to authenticate with SMTP, although many SMTP
> servers do have some form of authentication (e.g.  require someone to
> log in with POP first, etc.)
Yes this is definately the case.  I obtained a Perl script that sends email
to the SMTP server I am trying to work with the Ruby code on and it works
fine after I change what I got to the hostname of the SMTP server.  Greg is
confusing POP with SMTP.
But back to the code.
Again I post my Ruby test code ...require('net/smtp')
########################################################
class Email
  def Email.send(date, body, server = 'localhost', port = 25)
    Net::SMTP.start(server, port) { |mailer|
      text =Â
      "From: info\n" <<Â
      "To: usr@domain\n"       <<
      "Date: #{date}\n"          <<
      "Subject: New entry in Database\n"        <<
      "Importance: High\n"           <<
      "MIME-Version: 1.0\n"          <<
      "Sender: #{self.class.name}\n" <<
      "\n\n\n"                       <<
      body
      mailer.send_message(text, "info", "usr@domain")
      }
  end
Email.send("#{Time.now}", "New entry in database at #{ Time.now}\n")
puts "end of code"
########################################################
This works to send mail to a user on the SMTP server machine.  This machine
has 30 users and I can send mail to any of those users, routed correctly.
Any email address outside the LAN disappers.
Here is the entry in the mail log:
endMar 10 09:21:31 libros postfix/smtp[24290]: 0F60E13FB0: host
mailfoundry-2.iphouse.net[216.250.188.211] said: 450 Domain in Reverse-Path
resolves to an invalid IP address (in reply to RCPT TO command)
Mar 10 09:21:33 libros postfix/smtp[24290]: 0F60E13FB0:
to=<jalegre@iphouse.com>, relay=mailfoundry-1.iphouse.net[216.250.188.210],
delay=4, status=deferred (host mailfoundry-1.iphouse.net[216.250.188.210]
said: 450 Domain in Reverse-Path resolves to an invalid IP address (in
reply to RCPT TO command))
so the domain, even though it is correct is somehow being munged by Ruby to
something that the downstream realy does NOT understand. (here
jalegre@iphouse.com is the valid email address I used in the code.
?????????????????????????
john