aboutsummaryrefslogtreecommitdiff
path: root/config.yml.example
blob: 747ccc2379abcd35ff64ecc53b10f249933240e8 (plain)
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
# Example configuration. Each configuration option presented shows its default, so sensible.

## Target
target:
  # scheme: either imap or imaps; if omitted, it is deduced from the port
  scheme: imap
  # user
  user: test@example.com
  # password
  password: passw0rd
  # host, without the port
  host: mail.example.com
  # port; optional if scheme is given
  port: 143
  # root denotes the root of the hierarchy for all feeds. Probably should start with INBOX.
  # Allowed delimiters in PATH are '/' -- they will be replaced by the correct delimiter. If you know yours, you can
  # also use that.
  root: INBOX/Feeds
# Instead of the verbose target, specifiying a URI is also legitimate. Be sure to properly url-encode user and password.
# The example from above would read:
# target: imap://test%40example.com:passw0rd@mail.example.com:143/INBOX/Feeds

## Global Options
# Timeout in seconds for fetching feeds.
timeout: 30
# Maximum number of failures allowed before they are reported in normal mode.
# By default, failures are only visible in verbose mode. Most feeds tend to suffer from temporary failures.
max-failures:  10
# Parts to generate in the resulting emails.
# Valid parts are "text" and "html"
parts: ["text", "html"]
# Email-Address to use in 'From' and 'To' when not specified in feed.
# Default uses 'current user'@hostname
default-email: username@hostname
# Whether the target folder determination for each feed shall fallback on the feed's/group's name.
# When `true`, omitting a target is identical to specifying the name as the target.
# When `false`, omitting a target is identical to specifying `null` or `""` as the target.
auto-target: true

## Per-Feed Options
# Defaults for options per feed, overridable in each feed and group
# NB: For compatibility with old feed2imap, options existing in feed2imap can also be specified at the toplevel,
# i.e. not beneath 'options'. Triggers a warning though :)
options:
  # Frequency in hours for checking. 0 = on each run.
  min-frequency: 0
  # Include images referenced in the item per URL in the mail.
  # For instance, when a feed item includes <img src="https://some.example/foo.png">, this image is fetched
  # and included in the mail.
  include-images: true
  # By default, images are added as an additional part to the email and referred to in the HTML part.
  # If you, for some reason, prefer the images to be directly encoded in the HTML part, set this option to true.
  # Without function when `include-images` is false.
  embed-images: false
  # Specify what type of a feed item determines the message's body.
  # Values:
  #  - default: default heuristics
  #  - content: Use the 'content' tag
  #  - description: Use the 'description' tag
  #  - both: Use both
  body: default
  # Disable a feed. Beats commenting ;)
  disable: false
  # Disable certificate verification for HTTPS connections.
  # This is sometimes needed, when a site delivers broken certificate (chains).
  tls-no-verify: false
  # Some feeds change the content of their items all the time, so we detect that they have been updated at each run.
  # When this option is enabled, the content of an item is ignored when determining whether this item is already known.
  ignore-hash: false
  # We employ a clever algorithm to determine whether an item is new or has been updated. This does not always work
  # perfectly. When this flag is enabled, all items which don't match exactly any previously downloaded item are
  # considered as new items.
  always-new: false
  # If an item is updated, but has been deleted on the server already, it is re-uploaded when this option is true.
  # Else it is ignored.
  reupload-if-updated: false
  # Items of a feed may be filtered. In general there is no real use in specifying this globally.
  # For full information about this feature, visit https://github.com/Necoro/feed2imap-go/wiki/Detailed-Options.
  item-filter: 'Author.Name != "Weirdo"'

## Feeds
# Each feed must have a name, and a URL or Exec argument. The name must be unique.
# The name also determines the folder to use for that feed, which can be overwritten with an explicit target.
# This behavior can be changed by toggling the global option `auto-target` (see above).
# Groups can be used to build a hierarchy, with arbitrary nesting.
feeds:
  - name: XKCD
    url: http://xkcd.com/rss.xml
    # specify any per feed option to overwrite it for this feed
    min-frequency: 12
    # No target has been defined, so it falls back onto the feed's name.
    # Combined with the global `target`, the final folder will be:
    #   INBOX/Feeds/XKCD
    # Would the global option `auto-target` been set to `false`, this fallback would not occur,
    # and the final folder would be:
    #   INBOX/Feeds
  # Groups can be used for, well, grouping.
  - group: Linux
    # You can specify options on group level that are then used for all feeds contained
    min-frequency: 6
    feeds:
      - name: Arch Linux
        # Use `target` to specify the folder name.
        # Together with the group folder this now spells 'Linux/Arch'.
        # Considering the global `target` the final folder will be:
        #  INBOX/Feeds/Linux/Arch
        target: Arch
        # Use `exec` instead of `url` when fetching is not enough and script magic is needed.
        # See https://github.com/Necoro/feed2imap-go/wiki/Detailed-Options for details.
        exec: ["wget", "https://www.archlinux.org/feeds/news/", "-O", "-"]
        # Groups can be nested...
      - group: Gentoo
        # and also specify a target (which is superfluous here, because it is identical to the group name)
        target: Gentoo
        feeds:
            - name: Planet Gentoo
              # An empty target omits the creation of a folder for this feed and uses the one from the level above.
              # Thus "Planet Gentoo" and "Gentoo News" will finally reside in 'Linux/Gentoo'
              target:
              url: https://planet.gentoo.org/atom.xml
              min-frequency: 24
            - name: Gentoo News
              target:
              url: https://gentoo.org/feeds/news.xml
              min-frequency: 24
  - group: News
    feeds:
      - name: Heise
        url: http://www.heise.de/newsticker/heise-atom.xml
        ignore-hash: true
      - name: Spiegel
        url: http://www.spiegel.de/schlagzeilen/index.rss
      - group: Süddeutsche
        target: SZ
        feeds:
          - name: Bayern
            url: http://rssfeed.sueddeutsche.de/c/795/f/448243/index.rss
            target:
          - name: München
            url: http://rssfeed.sueddeutsche.de/c/795/f/448324/index.rss
            target:
      - group: ZEIT Online
        target: Zeit
        feeds:
          - name: Digital
            url: http://newsfeed.zeit.de/digital/index
            target:

# vim: ft=yaml:sts=2:expandtab
tions'>-16/+37 2014-04-17cp: typo as cvJason A. Donenfeld1-1/+1 2014-04-17bash: gpg_id is localJason A. Donenfeld1-0/+1 2014-04-17move/copy: always reencrypt passwords at destinationJason A. Donenfeld5-25/+56 2014-04-17makefile: allow platform files with gnu sedJason A. Donenfeld1-7/+8 2014-04-17mv: Add pass mv/rename supportJason A. Donenfeld5-3/+78 2014-04-17revelation2pass: add plain XML importJavali1-11/+15 2014-04-17platform: add cygwin supportJason A. Donenfeld2-1/+17