On 12/29/2015 7:18 AM, Kevin Golding wrote:
On Mon, 28 Dec 2015 18:21:35 -0000, Kevin A. McGrail <kmcgr...@pccc.com> wrote:

On 12/24/2015 10:04 AM, Kevin Golding wrote:
I know I'm a bit weird but I like stuffing headers with all kinds of data like I'm stuffing a turkey for Christmas, but I've never been able to get anything showing up for TxRep (it is referenced in _TESTSSCORES_ but none of the TxRep specific ones seem to convert). I feel I can't be the only person trying to use these tags so I thought I'd see if anyone had any hints.

I actually just use global storage for TxRep and assign a generic username for everything but I've tried it with both G and Y modifiers. I've added these lines for testing:

add_header all TxRep-Global _TXREP_EMAIL_G_ _TXREP_EMAIL_IP_G_ _TXREP_IP_G_ _TXREP_DOMAIN_G_ _TXREP_HELO_G_ add_header all TxRep-User _TXREP_EMAIL_U_ _TXREP_EMAIL_IP_U_ _TXREP_IP_U_ _TXREP_DOMAIN_U_ _TXREP_HELO_U_

But all mails show is:

X-Spam-TxRep-Global: _TXREP_EMAIL_G_ _TXREP_EMAIL_IP_G_ _TXREP_IP_G_ _TXREP_DOMAIN_G_ _TXREP_HELO_G_ X-Spam-TxRep-User: _TXREP_EMAIL_U_ _TXREP_EMAIL_IP_U_ _TXREP_IP_U_ _TXREP_DOMAIN_U_ _TXREP_HELO_U_

I've tried skipping both U and G since I'm not using dual storage but no joy there either. I've tried it with the various sub-tags like COUNT and MEAN etc. but again, no conversions.

I've scratched my head over this one before and got nowhere and today's attempts don't seem to have got me any closer so hopefully someone can spot where my mistake is.

Cheers
Sorry, I think you might be unique. These aren't listed in the Mail::SpamAssassin::Conf TAGS section and grepping trunk shows nothing.

Whilst not in Mail::SpamAssassin::Conf they are in Mail::SpamAssassin::Plugin::TxRep

https://spamassassin.apache.org/full/3.4.x/doc/Mail_SpamAssassin_Plugin_TxRep.html#template_tags

The tags don't show up well in grepping the code because the tags are defined dynamically as they iterate over the same basic code changing just one argument.

Having done a bit more poking I can try to fill in more data because I'm still a little puzzled.

The big thing I've confirmed is the _Y part of the tag is redundant for me, since I see the following in debug:

dbg: check: tagrun - tag TXREP_EMAIL_IP is now ready, value: 0.0

Since tagrun debug output strips the fore and aft _ I've been running with:

add_header TxRep-Email-IP: _TXREP_EMAIL_IP_

I had found the confusion about needing either _U or _G -r neither unclear so it was nice to confirm that neither was the best choice for me. The problem is I still get:

X-Spam-TxRep-Email-IP: _TXREP_EMAIL_IP_

I've tried this with every TXREP_FOO option that I can find and nothing gets translated. All my other template tags work as expected though so I feel there's something awry.

I'm happy to fix the small documentation bugs I've already worked out and I'm happy to submit patches to move it to Mail::SpamAssassin::Conf if desired (although the number of these tags and variations is likely why originally left in the plugin documentation and may still be preferred) but I'm reluctant to be too gung-ho when I can't get the things working myself.
Agreed. I see the code now at 1485. Can anyone else replicate the issue at which point this becomes a bug?

We always need help with the code and docs so don't be afraid to try. You'd open a bug on our bugzilla instance and attach patches there.

My PERSONAL input is that I wouldn't move the tags to the main conf as presumably other plugins have tags but they aren't there. Adding something that says plugins may add additional tags might be good though because I've worked with SA a long time didn't know the tags could be used!

Regards,
KAM

Reply via email to