wking / rss2email

open-source tool for Windows, Mac OS and UNIX for getting news from RSS feeds in email
http://pypi.python.org/pypi/rss2email/
GNU General Public License v2.0
270 stars 48 forks source link

Add support for Maildir #21

Closed ClearlyClaire closed 5 years ago

ClearlyClaire commented 11 years ago

Signed-off-by: Thibaut Girka thib@sitedethib.com

wking commented 11 years ago

On Mon, Sep 16, 2013 at 11:22:38AM -0700, ThibG wrote:

  • Add support for Maildir

This looks pretty good, although it's hard for me to imagine a system where a sendmail clone doesn't exist to handle local delivery. Can you add a few words to the commit message motivating this vs. the existing mail-sending protocols?

If you have good motivation, here are my comments on the patch itself:

I don't see the point of distinguishing between maildir-path and maildir-mailbox if you're just going to join the paths. Why not have a pre-joined maildir-mailbox? Is it for easier per-feed overrides? If so, a note in the commit message would be useful. I'd also prefer you used get_folder and friends 1 instead of os.path.join(). That's what they're there for after all. You'll probably also want to handle the NoSuchMailboxError case with a call to add_folder 2.

ClearlyClaire commented 11 years ago

Well, using sendmail would still imply doing some filtering magic to store the message in the appropriate place. Furthermore, you may want to use completely separate maildirs for some reason (eg: ~/News).

Yes, maildir-path and maildir-mailbox are here to provide easier per-feed overrides.

Good point about get_folder and add_folder, but they don't seem to follow the same conventions offlineimap and mutt use (mailbox.Maildir seems to require folders to start with a “.”)... I'll investigate that...

emillon commented 11 years ago

FYI, I use rss2email to deliver mails to a local Maildir. I use esmtp as my sendmail (it only delivers local mail), and it's a matter of only a few lines:

esmtprc

mda "/usr/bin/procmail -d %T"

procmailrc

:0
* ^User-Agent: rss2email
rss/

That's filtering magic, but a very small one :)

JNRowe commented 10 years ago

I'd also find this useful when I upgrade from 2.71, because I'm using a custom send function to deliver mails to a maildir with 2.71. I don't currently have any tool installed to deliver local mails, as I have no other use for one.

To be fair it wouldn't be all that much effort to write a little script to handle delivery for me if this isn't merged.

andresmrm commented 10 years ago

I would apreciate this merge too. I was almost reimplementing it myself when I saw this issue...

I use msmtp here and, AFAIK, it doesn't deliver local mail. Esmtp, pointed by Emilion, seems to be no loger maintained: http://esmtp.sourceforge.net/ I am not using procmail neither...

I will do the changes you suggested to ThibG's commit.

andresmrm commented 10 years ago

I don't know if I did it right, but submited two patches to ThibG... I don't know how to change 2 files in one pull request via Github interface. =P https://github.com/andresmrm/rss2email/commit/170ea39db153bcad771581d2e19af6a287ad96fb https://github.com/andresmrm/rss2email/commit/7cd70b2526fcecc0ef8aec4b5a0e196f2636f264

I thik he need to accept them, and re-pull request to you... Or you may acept his old pull and then copy my changes. Or I can resend the complete changes to you... =P

Ekleog commented 5 years ago

@ThibG This has been merged to https://github.com/rss2email/rss2email, new home of rss2email following maintainer changes ; care to close here? :)