Giter Site home page Giter Site logo

feed2imap-go's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar heiderich avatar necoro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

feed2imap-go's Issues

panic: send on closed channel

Every two days or so I get a email from cron with

panic: send on closed channel

goroutine 213 [running]:
github.com/Necoro/feed2imap-go/internal/imap.(*Client).connect(0x400040a090, {{0x40001912b0, 0x5}, {0x40000c2738, 0x18}, {0x40001912d8, 0x8}, {0x4000191310, 0x10}, {0x5e228a, ...}, ...})
	github.com/Necoro/feed2imap-go/internal/imap/client.go:72 +0x324
github.com/Necoro/feed2imap-go/internal/imap.Connect.func2(0x400034a540?)
	github.com/Necoro/feed2imap-go/internal/imap/imap.go:46 +0x60
created by github.com/Necoro/feed2imap-go/internal/imap.Connect
	github.com/Necoro/feed2imap-go/internal/imap/imap.go:45 +0x4ac

Not sure what to do about it, though. I guess the error could be caught and reported more prettily “E.g. saying which server failed during which operation”.

An error should probably be reported so that I know if it keeps failing.

However, a spurious error like this isn’t much to worry about; maybe feed2imap-go could retry once or twice before bugging the user?

Maildir support

Currently, only IMAP support is planned; add Maildir support if needed / spare time at hand

`reupload-if-updated` needs enhancement?

The Arch RSS puts new items into the mailbox, even though they are so old they are automatically removed again.
In theory this should be handled by reupload-if-updated, but perhaps this is broken. Investigate.

Unify items in folder

I have separate feeds of a newspaper that quite often share articles. This leads to having the same item thrice in the same folder.
Offer a way to merge items / have them only once.

Empty root is not allowed

As reported by @X41:
2021/10/17 03:34:33 ERROR: creating folder '': Invalid mailbox name: Name is empty (0.001 + 0.000 secs).

Up to now, feed2imap-go has (implicitly) required to use INBOX or something alike as a top folder. But this was never the intention: Storing feeds directly under the root must also be possible.

(@X41: As I'm already working on it, I took the liberty of creating the issue myself :)).

Question: how do I specify that I want all items to land in the same folder (from different sources)

Maybe clarify the documentation, or is this an enhancement request... I want all items to land in the same IMAP folder - I tried to leave out target (that creates a new folder for each source) and when I leave the target blank I get:
2020/08/15 05:00:33 INFO: Checking for folder 'Jobs/' 2020/08/15 05:00:33 ERROR: Creating folder of feed TNG: creating folder 'Jobs/': Mailbox already exists (0.001 + 0.000 secs).
...and it seems like no items are created.

tls-no-verify option for feeds

Some feeds can return invalid certificates when talked to via HTTPS (wrong servername, self signed, missing cert chain). feed2imap used to circumvent this by always setting tls no verify -- but now we want this to be done only on a per feed basis (plus the possible global option).

Until this is implemented, feeds with broken HTTPS are inaccessible

Text Part of Mails

Currently, only the html rendering is implemented. The HTML-to-Text part is missing.

New option `auto-target`

As per #25, it would be nice to have a new option auto-target with the default yes - which then can be set to no and which will disable setting a target for each feed/group, thus sparing you all the null-targets

Checklist:

  • Implement
  • Update example config
  • Wiki-Entry not needed after all

Deliverability Issues

Using fastmail and the example config for XKCD, there are several issues.

The first I ran into was Message contains bare newlines. The fix was something like:

re := regexp.MustCompile(`\s.*\r`)
contents := re.ReplaceAllString(msg.Contents, "\r\n")

Once that is resolved, I then receive the error Message contains invalid header. See attached file for truncated log of the run.
log.txt

Feature Request: Modify template

Is there an option to disable the grey boxed meta data?

image

Otherwise, great work. I was maintaining my own fork of "feeds2imap-go" for the past years but it stopped working and the IMAP functionality was very spotty. Is it related in any way? I added readability support for non-full feeds, which would be nice in your work too.

Support missing options

The following options should be supported:

  • max-failures
  • include-images (per feed)
  • reupload-if-updated (per feed)
  • disable-ssl-verification (reinterpret as tls-no-verify, cf. #3)
  • timeout
  • disable (per feed)
  • always-new (per feed)
  • ignore-hash (per feed)

The following options should be marked as unsupported:

  • dumpdir
  • debug-updated (use -d instead)
  • execurl
  • filter

build cache only option

When changing from feed2imap to ~-go, one needs to build up the cache once in the beginning. For this, an option has to be created.

panic: runtime error: index out of range [0] with length 0

Thanks for providing a maintained version of feed2imap, I am a log-time user!

Trying to migrate I run into this panic:

~ $ feed2imap-go -f ~/.feed2imaprc
2023/03/23 10:52:14  WARN: Unknown global option 'include-images'. Ignored!
panic: runtime error: index out of range [0] with length 0

goroutine 6 [running]:
github.com/Necoro/feed2imap-go/pkg/config.(*Url).RootPath(0xc000836a68?)
	github.com/Necoro/feed2imap-go/pkg/config/url.go:177 +0x79
github.com/Necoro/feed2imap-go/internal/imap.Connect({{0xc00003e480, 0x5}, {0xc00002a9a8, 0x18}, {0xc00003e4a3, 0x8}, {0xc00003e4ac, 0x10}, {0xa4d362, 0x3}, ...})
	github.com/Necoro/feed2imap-go/internal/imap/imap.go:33 +0x2dd
main.run.func1()
	github.com/Necoro/feed2imap-go/main.go:137 +0x98
created by main.run
	github.com/Necoro/feed2imap-go/main.go:135 +0x430

Maybe due to my old-style

    target: imaps://YYYYY:[email protected]/XFeeds/Meine%20Bilder

entry?

Split connection string into multiple fields

Currently, in feed2imap, the connection string is given as
imap://account:pwd@host:port/Folder.
This is ugly, especially as one has to take care to encode special chars (e.g. '@' accordingly).

--> Allow an alternative structure, f.ex.

connect:
   protocol: imap # optional
   host: foo.example
   port: 993
   user: account@foo

Empty target not usable

In feed2imap, target: marked a feed to go into the top-level folder. Due to the way the Go-yaml-parser works, target: cannot be distinguished from a missing target. Atm, one has to use target: "".

Goal: Make target: work again.

Identical target per feed/group

target is a field that is defined globally, per feed, and per group.
In my world they were used to define the folder structure.

Turns out: In feed2imap, it was always possible to specify full URIs there, thus actually sending different feeds to different mailboxes.

I'm not sure if this is still needed -- normally you'd probably have multiple configs then.

As shown below, in feed2imap it was not uncommon to repeat the server target for each feed. This shall be supported. Different servers will remain unsupported.

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

go: github.com/Necoro/[email protected]: invalid version: unknown revision d9090592eb44

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.