<commit_before>import shelve
import logging

from slimta.edge.smtp import SmtpEdge
from slimta.queue import Queue
from slimta.queue.dict import DictStorage
from slimta.relay.smtp.mx import MxSmtpRelay
from slimta.policy.headers import *
from slimta.policy.split import RecipientDomainSplit

logging.basicConfig(level=logging.DEBUG)

# Set up outbound delivery by MX lookup.
relay = MxSmtpRelay()

# Set up local queue storage to berkeley database files.
env_db = shelve.open('envelope.db')
meta_db = shelve.open('meta.db')
queue_storage = DictStorage(env_db, meta_db)
queue = Queue(queue_storage, relay)
queue.start()

# Ensure necessary headers are added.<commit_msg>Remove shelve from example<commit_after>import logging

from slimta.edge.smtp import SmtpEdge
from slimta.queue import Queue
from slimta.queue.dict import DictStorage
from slimta.relay.smtp.mx import MxSmtpRelay
from slimta.policy.headers import *
from slimta.policy.split import RecipientDomainSplit

logging.basicConfig(level=logging.DEBUG)

# Set up outbound delivery by MX lookup.
relay = MxSmtpRelay()

# Set up local queue storage to in-memory dictionaries.
queue_storage = DictStorage({}, {})
queue = Queue(queue_storage, relay)
queue.start()

# Ensure necessary headers are added.
{'fraction_non_alphanumeric': 0.0804140127388535, 'fraction_numerical': 0.0, 'mean_word_length': 5.758064516129032, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2246236', 'n_tokens_mistral': 407, 'n_tokens_neox': 400, 'n_words': 118}