Tatsuki SUGIURA
sugi****@users*****
2006年 7月 24日 (月) 17:46:51 JST
Index: slashjp/Slash/Custom/Bulkmail/Bulkmail.pm diff -u slashjp/Slash/Custom/Bulkmail/Bulkmail.pm:1.2 slashjp/Slash/Custom/Bulkmail/Bulkmail.pm:1.2.2.1 --- slashjp/Slash/Custom/Bulkmail/Bulkmail.pm:1.2 Fri Dec 31 21:35:44 2004 +++ slashjp/Slash/Custom/Bulkmail/Bulkmail.pm Mon Jul 24 17:46:50 2006 @@ -1208,7 +1208,22 @@ }; #Who's the message from? - print $bulk "MAIL FROM:<", $self->From, ">"; + my $sender = $self->From; + + if ($constants->{bounce_address_static}) { + # It will change bounce destination when $constants->{bounce_address_static} exists. + $sender = $constants->{bounce_address_static}; + } elsif ($constants->{bounce_address}) { + # It will change bounce destination when $constants->{bounce_address} exists. + # $constants->{bounce_address} would be as below: + # bounce+###ADDR###@example.com => bounce+user=examp****@examp***** + # ###ADDR###@bounce.example.com => user=examp****@bounc***** + $sender = $constants->{bounce_address}; + my $bounce_addr = $self->To; + $bounce_addr =~ s/@/=/; + $sender =~ s/###ADDR###/$bounce_addr/; + } + print $bulk "MAIL FROM:<", $sender, ">"; $response = <$bulk> || ""; return $self->error("Invalid Sender: $response <" . $self->From() . ">") if ! $response || $response =~ /^[45]/; if ($response =~ /^221/){