diff options
| author | fukachan <fukachan> | 2001-01-21 14:22:38 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-01-21 14:22:38 +0000 |
| commit | 7c8b24957dcdb3e0470f224326930c1ecb5866a2 (patch) | |
| tree | 4d91254892d2b81f5788b117db3836e0f9622329 /fml/lib/FML/Process | |
| parent | 3a42673e95a8ad8f1713ab81103ac001db20e9fb (diff) | |
| download | fml8-7c8b24957dcdb3e0470f224326930c1ecb5866a2.tar.gz fml8-7c8b24957dcdb3e0470f224326930c1ecb5866a2.tar.bz2 fml8-7c8b24957dcdb3e0470f224326930c1ecb5866a2.zip | |
enable add_fml_article_id add_x_sequence
Diffstat (limited to 'fml/lib/FML/Process')
| -rw-r--r-- | fml/lib/FML/Process/Distribute.pm | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm index 767b1a33..e6f3fc9a 100644 --- a/fml/lib/FML/Process/Distribute.pm +++ b/fml/lib/FML/Process/Distribute.pm @@ -79,12 +79,14 @@ sub _distribute # XXX $curproc->{ article } is prepared as a side effect. my $ah = $curproc->_prepare_article($args); + # get sequence number + my $id = $ah->increment_id; + # header operations # XXX we need $curproc->{ article }, which is prepared above. - $curproc->_header_rewrite($args); + $curproc->_header_rewrite({ id => $id }); # spool in the article before delivery - my $id = $ah->increment_id; $ah->spool_in($id); # delivery starts ! @@ -111,12 +113,27 @@ sub _header_rewrite my $config = $curproc->{ config }; my $header = $curproc->{ article }->{ header }; my $rules = $curproc->{ config }->{ header_rewrite_rules }; + my $id = $args->{ id }; for my $rule (split(/\s+/, $rules)) { Log("_header_rewrite( $rule )"); + + if ($rule eq 'add_fml_article_id') { + $header->add_fml_article_id($config, { id => $id } ); + } + + if ($rule eq 'add_x_sequence') { + $header->add_x_sequence($config, { + name => $config->{ address_for_post }, + id => $id, + }); + } + if ($rule eq 'add_rfc2369') { - $header->_add_rfc2369_to_header($config, - { mode => 'distribute' }); + $header->add_rfc2369($config, { + id => $id, + mode => 'distribute', + }); } } } |
