MHonArc Resources: ADDRESSMODIFYCODE

[Prev: ADD] | [Resources][TOC] | [Next: AFS]

# ADDRESSMODIFYCODE

- Syntax
- Description
- Default Setting
- Resource Variables
- Examples
- Version
- See Also

## Syntax

Envariable

  `M2H_ADDRESSMODIFYCODE=Perl_expressions`

Element

  `<ADDRESSMODIFYCODE>`
  Perl expressions...
  `</ADDRESSMODIFYCODE>`

Command-line Option

  `-addressmodifycode` Perl_expressions

## Description

ADDRESSMODIFYCODE defines Perl expressions to apply to addresses in message headers and to addresses in text bodies of messages if the MODIFYBODYADDRESSES is active.

When defining the expressions, the mail address will be in the `$_` variable. The value of `$_` after all expressions are evaluated is the address MHonArc will print.

NOTE: | ADDRESSMODIFYCODE only affects the display text of the address. For message headers, when MAILTO is active, the URL of the link is NOT affected by ADDRESSMODIFYCODE. MAILTOURL can be used to modify the URL.

## Default Setting

Nil.

## Resource Variables

N/A

## Examples

ADDRESSMODIFYCODE main use is to obfuscate addresses, or hide them entirely, to prevent spam address harvesters from getting user addresses from MHonArc archives. Here is an example that performs a ROT13 to provide some simple obfuscation:

    <AddressModifyCode>
    tr/A-Za-z/N-ZA-Mn-za-m/;
    </AddressModifyCode>

However, this may not be enough since an intelligent harvester may try a ROT13. To completely hide the address, do something like this:

    <AddressModifyCode>
    $_ = 'address@hidden';
    </AddressModifyCode>

You cannot rely on ADDRESSMODIFYCODE alone to hide/obfuscate addresses (see NOTE above). Also look at the SPAMMODE if you are interested in fighting address harvesting.

## Version

2.4.0

## See Also

MAILTO, MAILTOURL, MODIFYBODYADDRESSES, SPAMMODE

[Prev: ADD] | [Resources][TOC] | [Next: AFS]