Skip to content

halon-extras/srs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SRS - Sender Rewrite Scheme

This example provides a Mail::SRS compatible sender rewrite scheme implementation, our documentation shows how to implement it properly.

Installation

Follow the instructions in our manual to add our package repository and then run the below command.

Ubuntu

apt-get install halon-extras-srs

RHEL

yum install halon-extras-srs

Exported functions

These functions needs to be imported from the extras://srs module path.

srs_forward(localpart, domain, opts)

Apply the SRS forward scheme to an address

Params

  • localpart string - The email address localpart
  • domain string - The email address domain
  • opts array - options array

Returns: A string containing an email address localpart with SRS applied

The following options are available in the opts array.

  • secret string - A secret. The default is an empty secret.
  • hashlen number - Number of charaters to include from the secret hash. The default is 4.
  • time number - The current time. The default is now.

srs_reverse(localpart, opts)

Apply the SRS forward scheme to an local part

Params

  • localpart string - The email localpart
  • opts array - options array

Returns: An array containg the localpart and the domain of the SRS reversed address. On error none is returned.

The following options are available in the opts array.

  • secret string - A secret. The default is an empty secret.
  • hashlen number - Number of charaters to include from the secret hash. The default is 4.
  • time number - The current time. The default is now.
  • maxage number - Number of days the SRS address should be valid. The default is 21 days.

About

Sender Rewrite Scheme

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors