without SMTP_SERVER send directly to destination
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 31 Aug 2010 18:05:08 +0000 (18:05 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 31 Aug 2010 18:05:08 +0000 (18:05 +0000)
scripts/mqr-smtp.pl

index 15eac84..6ba45ee 100755 (executable)
@@ -12,7 +12,7 @@ use MQR::Redis;
 
 my $host = $ENV{SMTP_HOST} || '0.0.0.0';
 my $port = $ENV{SMTP_PORT} || 2525;
 
 my $host = $ENV{SMTP_HOST} || '0.0.0.0';
 my $port = $ENV{SMTP_PORT} || 2525;
-my $server = $ENV{SMTP_SERVER} || '127.0.0.1:25';
+my $server = $ENV{SMTP_SERVER};
 
 MQR::Redis->redis->psubscribe( "SEND $host:$port smtp *", sub {
        my ( $message, $channel ) = @_;
 
 MQR::Redis->redis->psubscribe( "SEND $host:$port smtp *", sub {
        my ( $message, $channel ) = @_;
@@ -31,6 +31,7 @@ MQR::Redis->redis->psubscribe( "SEND $host:$port smtp *", sub {
                        my ($ok,$error) = @_;
                        warn "# sendmail ", $ok && "OK $ok" || "ERROR: $error", "\n";
                },
                        my ($ok,$error) = @_;
                        warn "# sendmail ", $ok && "OK $ok" || "ERROR: $error", "\n";
                },
+#              debug => 1, # XXX
                server => $server,
 });
 
                server => $server,
 });