intelmq.bots.outputs.smtp_batch package¶
Submodules¶
intelmq.bots.outputs.smtp_batch.output module¶
- intelmq.bots.outputs.smtp_batch.output.BOT¶
alias of
SMTPBatchOutputBot
- class intelmq.bots.outputs.smtp_batch.output.Mail(key: str, to: str, path: str, count: int)¶
Bases:
object
- count: int¶
- key: str¶
- path: str¶
- to: str¶
- class intelmq.bots.outputs.smtp_batch.output.SMTPBatchOutputBot(bot_id: str, start: bool = False, sighup_event=None, disable_multithreading: bool = None, settings: dict | None = None, source_queue: str | None = None, standalone: bool = False)¶
Bases:
Bot
- allowed_fieldnames: list = ['time.source', 'source.ip', 'classification.taxonomy', 'classification.type', 'time.observation', 'source.geolocation.cc', 'source.asn', 'event_description.text', 'malware.name', 'feed.name', 'feed.url', 'raw']¶
- alternative_mail: dict = {}¶
- alternative_mails: str | None = None¶
- attachment_name: str = 'intelmq_%Y-%m-%d'¶
- bcc: list | None = None¶
- build_mail(mail, send=False, override_to=None)¶
creates a MIME message :param mail: Mail object :param send: True to send through SMTP, False for just printing the information :param override_to: Use this e-mail instead of the one specified in the Mail object :return: True if successfully sent.
- cli: bool = False¶
- cli_run()¶
- email_from: str = ''¶
- fieldnames_translation: dict = {'classification.taxonomy': 'class', 'classification.type': 'type', 'event_description.text': 'description', 'feed.name': 'feed_name', 'feed.url': 'feed_url', 'malware.name': 'malware', 'raw': 'raw', 'source.asn': 'asn', 'source.geolocation.cc': 'country_code', 'source.ip': 'ip', 'time.observation': 'time_delivered', 'time.source': 'time_detected'}¶
- gpg_key: str | None = None¶
- gpg_pass: str | None = None¶
- ignore_older_than_days: int | None = None¶
- init()¶
- key: str¶
- limit_results: int | None = None¶
- mail_contents: str¶
- mail_template: str = ''¶
- prepare_mails()¶
Generates Mail objects
- process()¶
- redis_cache_db: int = 15¶
- redis_cache_host: str = ''¶
- redis_cache_port: int = 0¶
- redis_cache_ttl: int = 1728000¶
- classmethod run(parsed_args=None)¶
- send: bool = False¶
- send_mails_to_tester(mails)¶
These mails are going to tester’s address. Then prints out their count.
- Parameters:
mails – list
- set_cache()¶
- set_tester(force=True)¶
- smtp_server: Any = 'localhost'¶
- subject: str = 'IntelMQ warning (%Y-%m-%d)'¶
- testing_to: str | None = None¶
- timeout: list¶