Connection

Metadata is available for each client, this module lets you query those metadatas.

fn client_address()

Get the address of the client.

Effective smtp stage

All of them.

Return

  • string - the client’s address with the ip:port format.

Example

#{
    connect: [
       action "log info" || log("info", `${client_address()}`),
    ]
}


fn client_ip()

Get the ip address of the client.

Effective smtp stage

All of them.

Return

  • string - the client’s ip address.

Example

#{
    connect: [
       action "log info" || log("info", `${client_ip()}`),
    ]
}


fn client_port()

Get the ip port of the client.

Effective smtp stage

All of them.

Return

  • int - the client’s port.

Example

#{
    connect: [
       action "log info" || log("info", `${client_port()}`),
    ]
}


fn connection_timestamp()

Get a the timestamp of the client's connection time.

Effective smtp stage

All of them.

Return

  • timestamp - the connexion timestamp of the client.

Example

#{
    connect: [
       action "log info" || log("info", `${connection_timestamp()}`),
    ]
}


fn server_address()

Get the full server address.

Effective smtp stage

All of them.

Return

  • string - the server’s address with the ip:port format.

Example

#{
    connect: [
       action "log info" || log("info", `${server_address()}`),
    ]
}


fn server_ip()

Get the server's ip.

Effective smtp stage

All of them.

Return

  • string - the server’s ip.

Example

#{
    connect: [
       action "log info" || log("info", `${server_ip()}`),
    ]
}


fn server_name()

Get the name of the server.

Effective smtp stage

All of them.

Return

  • string - the name of the server.

Example

#{
    connect: [
       action "log info" || log("info", `${server_name()}`),
    ]
}


fn server_port()

Get the server's port.

Effective smtp stage

All of them.

Return

  • string - the server’s port.

Example

#{
    connect: [
       action "log info" || log("info", `${server_port()}`),
    ]
}