<commit_before>module Harbor
  module MailServers
    class Sendmail < Abstract

      attr_accessor :filter

      def initialize(config = {})
        @sendmail = config[:sendmail] || `which sendmail`.chomp
        @filter = config[:delivery_address_filter]
      end

      def deliver(message_or_messages)
        messages = Array === message_or_messages ? message_or_messages : [message_or_messages]

        messages.each do |message|
          filter.apply(message) if filter
          sendmail = ::IO.popen("#{@sendmail} -i -t", "w+")
          sendmail.write(message.to_s)
          sendmail.close_write
          sendmail.close_read
        end<commit_msg>Adding -fbounce option to Sendmail<commit_after>module Harbor
  module MailServers
    class Sendmail < Abstract

      attr_accessor :filter

      def initialize(config = {})
        @sendmail = config[:sendmail] || `which sendmail`.chomp
        @filter = config[:delivery_address_filter]
        @sender = config[:sender] || "bounce"
      end

      def deliver(message_or_messages)
        messages = Array === message_or_messages ? message_or_messages : [message_or_messages]

        messages.each do |message|
          filter.apply(message) if filter
          sendmail = ::IO.popen("#{@sendmail} -i -t -f#{@sender}", "w+")
          sendmail.write(message.to_s)
          sendmail.close_write
          sendmail.close_read
        end
{'fraction_non_alphanumeric': 0.10283687943262411, 'fraction_numerical': 0.0, 'mean_word_length': 2.627249357326478, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6627991', 'n_tokens_mistral': 410, 'n_tokens_neox': 403, 'n_words': 87}