Skip Menu |

This queue is for tickets about the TheSchwartz-Worker-SendEmail CPAN distribution.

Report information
The Basics
Id: 106826
Status: new
Priority: 0/
Queue: TheSchwartz-Worker-SendEmail

People
Owner: Nobody in particular
Requestors: steve.dickinson [...] cello.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: send-email bug
Date: Wed, 2 Sep 2015 13:10:06 -0400
To: bug-TheSchwartz-Worker-SendEmail [...] rt.cpan.org
From: Steve Dickinson <steve.dickinson [...] cello.com>
TheSchwartz::Worker::SendEmail module appears to be taking the email addresses passed into it (i.e. steve@cello.com) and uses that email's domain to attempt to connect to the email server .. which fails causing the module to die here: # all rcpts on same server, proceed... (my($host), $rcpts) = %dom_rcpts; # (there's only one key) $0 = "send-email [$host]"; my @mailhosts = mx(resolver(), $host); my @ex = map { $_->exchange } @mailhosts; # seen in wild: no MX records, but port 25 of domain is an SMTP server. think it's in SMTP spec too? @ex = ($host) unless @ex; my $smtp = Net::SMTP::BetterConnecting->new( \@ex, Hello => $hello_domain, PeerPort => 25, ConnectTimeout => 4, ); ** *die "Connection failed to domain '$host', MXes: [@ex]\n" unless $smtp;* * *So in the db error we will see errors like: *Connection failed to domain 'cello.com', MXes: [cello.com]+ * When this process dies it is leaving around the *send-email [$host]* processes it creates to send out the emails. So if these processes are left behind it continuely tries to send out the emails even though we stop our schwartz runners that are supposed to be controlling the whole process.**To fix this whole thing, I hard coded our mail server hostname in the Net::SMTP::BettterConnecting call, then killed off all the send-email processes, then restarted our schwartz runner and it all worked. It would not recognize my hard coded changes until I killed all the send-email processes.* *Thanks, Steve* *