Publish::Gmailしてsmtp鯖でエラー
http://mion.jp/blog2/index.php?c=10-
Plagger::Plugin::Publish::Gmail [error] Error while sending emails: Could't set FROM: 421 4.7.0 Try again later, closing connection. (MAIL) v32smxxxxxxxwah.42 at /usr/home/plagger/lib/Plagger/Plugin/Publish/Gmail.pm line 245
From: noreply@googlegroups.com
Subject: Google グループ: アカウント自動返信機能お使いのアカウントは自動返信として設定されているため、メッセージは 田中さん
グループに投稿できませんでした。
自動返信、またはその他設定に問題のあるメール プログラムからGoogle グループ サ
ービスや 田中さん グループのメンバーの受信ボックスを保護するために、Google で
は、1 つのアカウントから短期間にできる投稿の数を制限しています。
このメッセージが表示されている場合、誤ってお使いのアカウントに問題があるとさ
れたか、あるいは過去に問題があった可能性があります。メッセージを投稿できるよう
にするには、次の URL のヘルプ センターで Google グループのカスタマー サポート
にお問い合わせください。
http://d.hatena.ne.jp/shrk/20060502/1146590845
Plagger::Plugin::Publish::Gmail [error] Error while sending emails: SMTP mail() command f ailed: 4.3.2 Connection rate lim it exceeded.
あらあら、某ISPの鯖はs.b.pop3対応しなくなってたAPOPも対応しなくなってた
Plagger::Plugin::Publish::Gmail [error] Error while sending emails: SMTP mail() command f ailed: 5.7.1 <....@gmail.com>... Authentication required.
SMTP-AUTH をしようかとおもつたが既にやってる人いたヽ(゜∀゜)ノ
http://www5d.biglobe.ne.jp/~y0ka/2006-04-16-3.html
GMail.pm っていう名前がアレでだれもGMail以外で使ってないんじゃないかと思ったw
Plagger::Plugin::Publish::Gmail [error] Error while sending emails: Undefined subroutine &MIME::Lite::extract_addrs called at /usr/home/plagger/lib/Plagger/Plugin/Publish/Gm ail.pm line 267.
ヽ(゜∀゜)ノ.....
結局やりますた..
> diff /usr/home/plagger/lib/Plagger/Plugin/Publish/Gmail.pm /usr/local/lib/perl5/site_perl/5.8.8/Plagger/Plugin/Publish/Gmail.pm 5c5 < our $VERSION = '0.11'; --- > our $VERSION = '0.10'; 111,114c111 < $msg->send_by_smtp_oreore($route, @{ $self->{tls_args} }); < } elsif ($route->{via} eq 'smtp_auth') { < my @args = $route->{host} ? ($route->{host}) : (); < $msg->send_by_smtp_oreore($route, @args); --- > $msg->send_by_smtp_tls(@{ $self->{tls_args} }); 215,216c212 < # hack MIME::Lite to support Authentication < *MIME::Lite::send_by_smtp_oreore = sub { --- > *MIME::Lite::send_by_smtp_tls = sub { 223,224d218 < my $route = shift @args; < 231c225 < defined($to) or Carp::croak "send_by_$route->{via}: missing 'To:' address\n"; --- > defined($to) or Carp::croak "send_by_smtp_tls: missing 'To:' address\n"; 242,243c236 < ### Create SMTP TLS or SMTP client: < require Net::SMTP; --- > ### Create SMTP TLS client: 245,258d237 < my $smtp; < < if( $route->{via} eq 'smtp_tls' ) < { < my $conn_key = join "|", @args; < unless ($smtp = $TLSConn{$conn_key}) { < $smtp = $TLSConn{$conn_key} = MIME::Lite::SMTP::TLS->new(@args) < or Carp::croak("Failed to connect to mail server: $!\n"); < } < } < elsif( $route->{via} eq 'smtp_auth' ) < { < $smtp = MIME::Lite::SMTP->new(@args) < or Carp::croak("Failed to connect to mail server: $!\n"); 260,261c239,243 < $smtp->auth($route->{username}, $route->{password}) < or Carp::croak("SMTP AUTH command failed: $!\n".$smtp->message."\n"); --- > my $conn_key = join "|", @args; > my $smtp; > unless ($smtp = $TLSConn{$conn_key}) { > $smtp = $TLSConn{$conn_key} = MIME::Lite::SMTP::TLS->new(@args) > or Carp::croak("Failed to connect to mail server: $!\n"); 316c298 < the value of I<via> would be either I<smtp>, I<smtp_tls>, I<smtp_auth> or I<sendmail>. --- > the value of I<via> would be either I<smtp>, I<smtp_tls> or I<sendmail>.
変更した関数
# $msg->send_by_smtp_oreore($route, @{ $self->{tls_args} }); # } elsif ($route->{via} eq 'smtp_auth') { # my @args = $route->{host} ? ($route->{host}) : (); # $msg->send_by_smtp_oreore($route, @args); # hack MIME::Lite to support TLS Authentication # hack MIME::Lite to support Authentication *MIME::Lite::send_by_smtp_oreore = sub { my($self, @args) = @_; my $extract_addrs_ref = defined &MIME::Lite::extract_addrs ? \&MIME::Lite::extract_addrs : \&MIME::Lite::extract_full_addrs; my $route = shift @args; ### We need the "From:" and "To:" headers to pass to the SMTP mailer: my $hdr = $self->fields(); my($from) = $extract_addrs_ref->( $self->get('From') ); my $to = $self->get('To'); ### Sanity check: defined($to) or Carp::croak "send_by_$route->{via}: missing 'To:' address\n"; ### Get the destinations as a simple array of addresses: my @to_all = $extract_addrs_ref->($to); if ($MIME::Lite::AUTO_CC) { foreach my $field (qw(Cc Bcc)) { my $value = $self->get($field); push @to_all, $extract_addrs_ref->($value) if defined($value); } } ### Create SMTP TLS or SMTP client: require Net::SMTP; require Net::SMTP::TLS; my $smtp; if( $route->{via} eq 'smtp_tls' ) { my $conn_key = join "|", @args; unless ($smtp = $TLSConn{$conn_key}) { $smtp = $TLSConn{$conn_key} = MIME::Lite::SMTP::TLS->new(@args) or Carp::croak("Failed to connect to mail server: $!\n"); } } elsif( $route->{via} eq 'smtp_auth' ) { $smtp = MIME::Lite::SMTP->new(@args) or Carp::croak("Failed to connect to mail server: $!\n"); $smtp->auth($route->{username}, $route->{password}) or Carp::croak("SMTP AUTH command failed: $!\n".$smtp->message."\n"); } $smtp->mail($from); $smtp->to(@to_all); $smtp->data(); ### MIME::Lite can print() to anything with a print() method: $self->print_for_smtp($smtp); $smtp->dataend(); 1; };
で、とりあえず5通目で、
Plagger::Plugin::Publish::Gmail [error] Error while sending emails: SMTP AUTH command failed: Command unknown: 'AUTH' at /usr/local/lib/perl5/site_perl/5.8.8/Plagger.pm line 266