On Jan 21, 2024 at 4:27:39 AM CST, "Julien ÉLIE"
With suck you need to use the post filter function. From the man page:
"POST FILTER
if the -y post_filter option is specified on the command line in
conjunction with any of the batch modes, then suck will call the post
filter specified, after downloading the articles, and before
batching/posting the articles. The filter is passed the directory
where the articles are stored (the -dm option). The filter program is
responsible for parsing the contents of the directory. See
sample/
post_filter.pl for a sample post filter. This option was
designed to allow you to add your own host name to the Path: header,
but if you need to do anything else to the messages, you can."
The sample
post_filter.pl:
#!/usr/local/bin/perl
# sample program for editting/changing the downloaded articles.
# this program is passed the directory where the articles are
# stored
# it modifies the Path: header, so you can add your own unique
# host to it, so you can tell INN not to upload these articles
opendir (DIRP, $ARGV[0]) or die "Can't open $ARGV[0]";
# get list of files, skipping hidden files
@files = grep ( !/^\./, readdir(DIRP));
foreach $file ( @files) {
# read the file in
$path = "${ARGV[0]}/${file}";
open FIP, "<${path}" or die "Can't read ${path}\n";@file = <FIP>;
close FIP;
# find the line and change it
foreach $line ( @file) {
if ( $line =~ /^Path: /) {
$line =~ s/^Path: /Path: myhost\!/
}
}
# save it back out
open FIP, ">${path}" or die "Can't write to ${path}\n";
print FIP @file;
close FIP;
}