Add tag such as [elena:00100] at Subject:.
no tag by default.
You can specify subject tag as sprintf form.
[/var/spool/ml/elena/config.cf]
article_subject_tag = [$ml_name:%05d]
Change digit of the number part of Subject: [elena:00100].
You can specify subject tag as sprintf form.
For example, %07 if 7 digits.
[/var/spool/ml/elena/config.cf]
article_subject_tag = [$ml_name:%07d]
no 0 padding in subject tag.
[/var/spool/ml/elena/config.cf]
article_subject_tag = [$ml_name:%d]
make subject tag uppercase.
article_subject_tag = [\U$ml_name\E:%05d]
make subject tag lowercase.
article_subject_tag = [\L$ml_name\E:%05d]
On unix, you must use lowercase by default.
So the ml_name must be in lower case.
You need not use this setting in almost cases.
add subject tag like [YYYYMMDD] string.
To add a subject tag like YYYYMMDD (20060101), date format,
you can use the following hook.
$distribute_verify_request_start_hook = q{
use POSIX;
my $yyyymmdd = strftime("[%Y%m%d]", localtime);
$config->set('article_subject_tag', $yyyymmdd);
};
You can use several format by editing strftime(3) part.
Enforece Reply-To: as address for post.
Append the following hook at the last of config.cf (after =cut line).
$article_header_rewrite_end_hook = q{
my $ml = $config->{ article_post_address };
$header->replace('Reply-To', $ml);
};
or you can obtain the same effect by setting
article_header_rewrite_rules += rewrite_reply_to_enforce_article_post_address
set Reply-To: as the sender.
Append the following hook at the last of config.cf (after =cut line).
$article_header_rewrite_end_hook = q{
my $cred = $curproc->credential();
my $sender = $cred->sender();
$header->replace('Reply-To', $sender);
};
set Reply-To: as the sender + ML.
Append the following hook at the last of config.cf (after =cut line).
$article_header_rewrite_end_hook = q{
my $ml = $config->{ article_post_address };
my $cred = $curproc->credential();
my $sender = $cred->sender();
$header->replace('Reply-To', "$ml, $sender");
};
If the posting is from a ML member,
set Reply-To: as the sender + ML itself.
Append the following hook at the last of config.cf (after =cut line).
$article_header_rewrite_end_hook = q{
my $ml = $config->{ article_post_address };
my $cred = $curproc->credential();
my $sender = $cred->sender();
if ($cred->is_member($sender)) {
$curproc->log("member");
$header->replace('Reply-To', "$ml, $sender");
}
};
set Reply-To: as fml8 managed addresses found in To: and Cc: field.
Append the following hook at the last of config.cf (after =cut line).
$article_header_rewrite_end_hook = q{
my $to = $header->get('to');
my $cc = $header->get('cc');
my $addr = "$to, $cc";
use Mail::Address;
my (@addrlist) = Mail::Address->parse($addr);
my $reply_to = '';
for my $a (@addrlist) {
my $_addr = $a->address;
if ($curproc->is_fml8_managed_address($_addr)) {
$reply_to .= $reply_to ? ", $_addr" : $_addr;
}
}
$header->replace('Reply-To', $reply_to) if $reply_to;
};
remove X-Face: header field.
unsafe_header_fields += x-face
copy Sender: field to X-Sender: field.
$article_header_rewrite_end_hook = q{
my $header = $curproc->article_message_header();
$header->add('X-Sender', $header->get('Sender'));
};
move Received: to X-Received: field.
Copy Received: to X-Received: field and delete Received: after that.
$article_header_rewrite_end_hook = q{
my $header = $curproc->article_message_header();
$header->add('X-Received', $header->get('Received'));
$header->delete('Received');
};
If the input mail has no Reply-To:, pass it without appending Reply-to: field.
In config.cf, add the following configuration.
article_header_rewrite_rules -= rewrite_reply_to
By default, &fml8; add "Reply-To: $article_post_address" to
the message without Reply-To: field.
This effect is done by rewrite_reply_to directive in
$article_header_rewrite_rules variable.
So, rewriting of Reply-To: is disabled if you remove the directive.
Pass To:, Cc: and Reply-To: through.
same as the previous recipe since To: and Cc: is pass through by default.
article_header_rewrite_rules -= rewrite_reply_to
Pass Message-ID through.
nothing todo. &fml8; passes Message-ID: field through by default.
rewrite Message-ID: to ML specific one.
[/var/spool/ml/elena/config.cf]
$article_header_rewrite_end_hook = q{
my $header = $curproc->article_message_header();
# generate specific Message-Id
my $ml_name = $config->{ ml_name };
my $ml_domain = $config->{ ml_domain };
my $new_id = sprintf("%s-%d\@%s", $ml_name, $$, $ml_domain);
# backup the original Message-Id at X-Message-Id field.
$header->add('X-Message-Id', $header->get('Message-Id'));
# replace Message-Id field.
$header->replace('Message-Id', $new_id);
};
Specify X-ML-Info: field.
Enforce mail header field.
$article_header_rewrite_end_hook = q{
my $header = $curproc->article_message_header();
$header->replace('X-ML-Info', "oresama id");
};
Specify Reply-To: in system message mail.
unimplemented.
In fact,
outgoing_mail_header_reply_to = ADDRESS
changes Reply-To: in system message mail but
it is derived from wrong &fml8; implementation.
Pass only specified header fields.
In the current &fml8; implementation,
you should use the following hook.
$article_header_rewrite_end_hook = q{
my $header = $curproc->article_message_header();
my (@tags) = $header->tags();
# define valid header fields to allow.
my (@valid_tags) = qw(to from reply-to subject date message-id);
for my $tag (@tags) {
my $valid = 0;
SCAN:
for my $v (@valid_tags) {
if ($tag =~ /^$v$/i) {
$valid = 1;
last SCAN;
}
}
unless ($valid) {
$header->delete($tag);
}
}
};
Enforce use of In-Reply-To: or References: header field.
There is a reply message to have no In-Reply-To: nor References: header field.
Firstly, It provides no thread relation.
Secondly, it may be a spam message since it is unusual today.
If Subject: field indicates reply message but no
In-Reply-To: nor References: header field,
you can reject this message by using this hook.
$article_post_verify_request_end_hook = q{
my $header = $curproc->incoming_message_header();
my $subject = $header->get('subject') || '';
my $in_reply_to = $header->get("In-Reply-To") || '';
my $references = $header->get("References") || '';
my $_subject = new Mail::Message::Subject $subject;
if ($_subject->has_reply_tag()) {
unless ($in_reply_to || $references) {
$curproc->log("reject invalid reply message");
$curproc->stop_this_process();
$curproc->policy_reject_this_message();
}
}
};
In this case error message is sent to the sender.
If you have only to ignore this message not reply,
replace
policy_reject_this_message()
to
policy_ignore_this_message()
method.
disable all article header rewriting function.
[/var/spool/ml/elena/config.cf]
use_article_header_rewrite = no