summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest/smtprelay.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/custodian/protocoltest/smtprelay.rb')
-rw-r--r--lib/custodian/protocoltest/smtprelay.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/custodian/protocoltest/smtprelay.rb b/lib/custodian/protocoltest/smtprelay.rb
index ef07f82..0a98a9d 100644
--- a/lib/custodian/protocoltest/smtprelay.rb
+++ b/lib/custodian/protocoltest/smtprelay.rb
@@ -24,9 +24,9 @@ module Custodian
#
# Save away state from the configuration line.
#
- def initialize( line )
+ def initialize(line)
@line = line
- @host = line.split( /\s+/)[0]
+ @host = line.split(/\s+/)[0]
#
# Save the port
@@ -63,8 +63,8 @@ module Custodian
def get_hostname
hostname = 'localhost.localdomain'
- if File.exist?( '/etc/hostname' )
- File.readlines('/etc/hostname' ).each do |line|
+ if File.exist?('/etc/hostname')
+ File.readlines('/etc/hostname').each do |line|
hostname = line if !line.nil?
hostname.chomp!
end
@@ -86,7 +86,7 @@ module Custodian
begin
- Net::SMTP.start(@host,@port, get_hostname ) do |smtp|
+ Net::SMTP.start(@host,@port, get_hostname) do |smtp|
sent = smtp.send_message message, 'noreply@bytemark.co.uk', 'noreply@bytemark.co.uk'
@status = sent.status.to_s