blackhole.data

Provides SMTP response codes and methods for returning the correct response code.

This module contains all usable SMTP response codes for returning through the socket. It also provides mechanisms for picking response codes that mean a mail message has been accepted, rejected or that the server is offline.

blackhole.data

blackhole.data.response(response)[source]

Return an SMTP response code and message. ‘response’ an string refering to the code you wish to return.

blackhole.data.get_response()[source]

Get our response from available responses based on configuration settings.

blackhole.data.random_choice(response_list)[source]

Pick a random choice for the configured choices dictionary.

‘response_list’ is a list of available response types from ‘blackhole.data’, this can be: - ACCEPT_RESPONSES - BOUCNE_RESPONSES - OFFLINE_RESPONSES - UNAVAILABLE_RESPONSES - RANDOM_RESPONSES

blackhole.data.response_message(response)[source]

Format our response in ESMTP format.

‘response’ is a string containing the reponse code you wish to return.

Table Of Contents

Previous topic

blackhole.connection

Next topic

blackhole.log

This Page