diff options
author | Lucas Nussbaum <lucas@lucas-nussbaum.net> | 2009-12-26 01:51:37 +0100 |
---|---|---|
committer | Lucas Nussbaum <lucas@lucas-nussbaum.net> | 2009-12-26 01:51:37 +0100 |
commit | db52aeb97fcc73e3b9a3a2a6e2e9eb63fd4cb0f8 (patch) | |
tree | 7839546f11f95a37bd3016d1e2ad38c8f3d6e727 /lib/feed2imap/feed2imap.rb | |
parent | ec808b0f4bfd213b7b81996d8c46c1d98bbafa7c (diff) | |
download | feed2imap-db52aeb97fcc73e3b9a3a2a6e2e9eb63fd4cb0f8.tar.gz feed2imap-db52aeb97fcc73e3b9a3a2a6e2e9eb63fd4cb0f8.tar.bz2 feed2imap-db52aeb97fcc73e3b9a3a2a6e2e9eb63fd4cb0f8.zip |
Avoid using "acme.com"
Patch from Guido Berhoerster <guido@berhoerster.name>:
Hello,
here is a small patch that avoids using the valid(!) domain
"acme.com" for generating message ids and email addresses. It
adds a new global configuration option "default-email" which will
be used in case a feed does provide one, currently feed2imap
resorts to "feed2imap@acme.com". If this configuration option is
not given it will basically default to <logname>@<hostname> as
returned by Etc.getlogin and Socket.gethostname.
Yours,
Diffstat (limited to '')
-rw-r--r-- | lib/feed2imap/feed2imap.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/feed2imap/feed2imap.rb b/lib/feed2imap/feed2imap.rb index 68051c7..f23c0dc 100644 --- a/lib/feed2imap/feed2imap.rb +++ b/lib/feed2imap/feed2imap.rb @@ -244,15 +244,15 @@ class Feed2Imap if !cacherebuild fn = f.name.gsub(/[^0-9A-Za-z]/,'') updateditems.each do |i| - id = "<#{fn}-#{i.cacheditem.index}@acme.com>" - email = item_to_mail(i, id, true, f.name, f.include_images, f.wrapto) + id = "<#{fn}-#{i.cacheditem.index}@#{@config.hostname}>" + email = item_to_mail(@config, i, id, true, f.name, f.include_images, f.wrapto) f.imapaccount.updatemail(f.folder, email, id, i.date || Time::new) end # reverse is needed to upload older items first (fixes gna#8986) newitems.reverse.each do |i| - id = "<#{fn}-#{i.cacheditem.index}@acme.com>" - email = item_to_mail(i, id, false, f.name, f.include_images, f.wrapto) + id = "<#{fn}-#{i.cacheditem.index}@#{@config.hostname}>" + email = item_to_mail(@config, i, id, false, f.name, f.include_images, f.wrapto) f.imapaccount.putmail(f.folder, email, i.date || Time::new) end end |