This file is indexed.

/usr/lib/python3/dist-packages/rss2email/config.py is in rss2email 1:3.9-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# Copyright (C) 2004-2014 Aaron Swartz
#                         Brian Lalor
#                         Dean Jackson
#                         Dmitry Bogatov <KAction@gnu.org>
#                         Erik Hetzner
#                         Etienne Millon <me@emillon.org>
#                         George Saunders <georgesaunders@gmail.com>
#                         Joey Hess
#                         Lindsey Smith <lindsey.smith@gmail.com>
#                         Marcel Ackermann
#                         Martin 'Joey' Schulze
#                         Matej Cepl
#                         Thiago Coutinho <root@thiagoc.net>
#                         W. Trevor King <wking@tremily.us>
#
# This file is part of rss2email.
#
# rss2email is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 2 of the License, or (at your option) version 3 of
# the License.
#
# rss2email is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# rss2email.  If not, see <http://www.gnu.org/licenses/>.

"""Per-user rss2email configuration
"""

import collections as _collections
import configparser as _configparser

import html2text as _html2text


class Config (_configparser.ConfigParser):
    def __init__(self, dict_type=_collections.OrderedDict,
                 interpolation=_configparser.ExtendedInterpolation(),
                 **kwargs):
        super(Config, self).__init__(
            dict_type=dict_type, interpolation=interpolation, **kwargs)

    def setup_html2text(self, section='DEFAULT'):
        """Setup html2text globals to match our configuration

        Html2text unfortunately uses globals (instead of keyword
        arguments) to configure its conversion.
        """
        if section not in self:
            section = 'DEFAULT'
        _html2text.UNICODE_SNOB = self.getboolean(
            section, 'unicode-snob')
        _html2text.LINKS_EACH_PARAGRAPH = self.getboolean(
            section, 'links-after-each-paragraph')
        _html2text.BODY_WIDTH = self.getint(section, 'body-width')


CONFIG = Config()

# setup defaults for feeds that don't customize
CONFIG['DEFAULT'] = _collections.OrderedDict((
        ### Addressing
        # The email address messages are from by default
        ('from', 'user@rss2email.invalid'),
        # Transfer-Encoding. For local mailing it is safe and
        # convient to use 8bit.
        ('use-8bit', str(False)),
        # True: Only use the 'from' address.
        # False: Use the email address specified by the feed, when possible.
        ('force-from', str(False)),
        # True: Use the publisher's email if you can't find the author's.
        # False: Just use the 'from' email instead.
        ('use-publisher-email', str(False)),
        # If empty, only use the feed email address rather than
        # friendly name plus email address.  Available attributes may
        # include 'feed', 'feed-title', 'author', and 'publisher', but
        # only 'feed' is guaranteed.
        ('name-format', '{feed-title}: {author}'),
        # Set this to default To email addresses.
        ('to', ''),

        ### Fetching
        # Set an HTTP proxy (e.g. 'http://your.proxy.here:8080/')
        ('proxy', ''),
        # Set the timeout (in seconds) for feed server response
        ('feed-timeout', str(60)),

        ### Processing
        # True: Fetch, process, and email feeds.
        # False: Don't fetch, process, or email feeds
        ('active', str(True)),
        # True: Send a single, multi-entry email per feed per rss2email run.
        # False: Send a single email per entry.
        ('digest', str(False)),
        # True: Generate Date header based on item's date, when possible.
        # False: Generate Date header based on time sent.
        ('date-header', str(False)),
        # A comma-delimited list of some combination of
        # ('issued', 'created', 'modified', 'expired')
        # expressing ordered list of preference in dates
        # to use for the Date header of the email.
        ('date-header-order', 'modified, issued, created, expired'),
        # Set this to add bonus headers to all emails
        # Example: bonus-header = 'Approved: joe@bob.org'
        ('bonus-header', ''),
        # True: Receive one email per post.
        # False: Receive an email every time a post changes.
        ('trust-guid', str(True)),
        # True: Receive one email per unique link url.
        # False: Defer to trust-guid preference.
        # Toggling this for existing feeds may result in duplicates,
        # because the old entries will not be recorded under their new
        # link-based ids.
        ('trust-link', str(False)),
        # To most correctly encode emails with international
        # characters, we iterate through the list below and use the
        # first character set that works.
        ('encodings', 'US-ASCII, ISO-8859-1, UTF-8, BIG5, ISO-2022-JP'),
        # User processing hooks.  Note the space after the module name.
        # Example: post-process = 'rss2email.post_process.downcase downcase_message'
        ('post-process', ''),
        # User processing hooks for digest messages.  If 'digest' is
        # enabled, the usual 'post-process' hook gets to massage the
        # per-entry messages, but this hook is called with the full
        # digest message before it is mailed.
        # Example: digest-post-process = 'rss2email.post_process.downcase downcase_message'
        ('digest-post-process', ''),
        ## HTML conversion
        # True: Send text/html messages when possible.
        # False: Convert HTML to plain text.
        ('html-mail', str(False)),
        # Optional CSS styling
        ('use-css', str(False)),
        ('css', (
                'h1 {\n'
                '  font: 18pt Georgia, "Times New Roman";\n'
                '}\n'
                'body {\n'
                '  font: 12pt Arial;\n'
                '}\n'
                'a:link {\n'
                '  font: 12pt Arial;\n'
                '  font-weight: bold;\n'
                '  color: #0000cc;\n'
                '}\n'
                'blockquote {\n'
                '  font-family: monospace;\n'
                '}\n'
                '.header {\n'
                '  background: #e0ecff;\n'
                '  border-bottom: solid 4px #c3d9ff;\n'
                '  padding: 5px;\n'
                '  margin-top: 0px;\n'
                '  color: red;\n'
                '}\n'
                '.header a {\n'
                '  font-size: 20px;\n'
                '  text-decoration: none;\n'
                '}\n'
                '.footer {\n'
                '  background: #c3d9ff;\n'
                '  border-top: solid 4px #c3d9ff;\n'
                '  padding: 5px;\n'
                '  margin-bottom: 0px;\n'
                '}\n'
                '#entry {\n'
                '  border: solid 4px #c3d9ff;\n'
                '}\n'
                '#body {\n'
                '  margin-left: 5px;\n'
                '  margin-right: 5px;\n'
                '}\n')),
        ## html2text options
        # Use Unicode characters instead of their ascii psuedo-replacements
        ('unicode-snob', str(False)),
        # Put the links after each paragraph instead of at the end.
        ('links-after-each-paragraph', str(False)),
        # Wrap long lines at position. 0 for no wrapping.
        ('body-width', str(0)),

        ### Mailing
        # Select protocol from: sendmail, smtp, imap
        ('email-protocol', 'sendmail'),
        # True: Use SMTP_SERVER to send mail.
        # Sendmail (or compatible) configuration
        ('sendmail', '/usr/sbin/sendmail'),  # Path to sendmail (or compatible)
        # SMTP configuration
        ('smtp-auth', str(False)),      # set to True to use SMTP AUTH
        ('smtp-username', 'username'),  # username for SMTP AUTH
        ('smtp-password', 'password'),  # password for SMTP AUTH
        ('smtp-server', 'smtp.yourisp.net:25'),
        ('smtp-ssl', str(False)),       # Connect to the SMTP server using SSL
        ('smtp-ssl-protocol', 'TLSv1'), # TLS/SSL version to use on STARTTLS when not using 'smtp-ssl'
        # IMAP configuration
        ('imap-auth', str(False)),      # set to True to use IMAP auth.
        ('imap-username', 'username'),  # username for IMAP authentication
        ('imap-password', 'password'),  # password for IMAP authentication
        ('imap-server', 'imap.yourisp.net'),
        ('imap-port', str(143)),
        ('imap-ssl', str(False)),       # connect to the IMAP server using SSL
        ('imap-mailbox', 'INBOX'),      # where we should store new messages

        ### Miscellaneous
        # Verbosity (one of 'error', 'warning', 'info', or 'debug').
        ('verbose', 'warning'),
        ))