Parcourir la source

[add]ing conf for rss2email

petit il y a 7 ans
Parent
commit
a78c4ba0c8
2 fichiers modifiés avec 91 ajouts et 1 suppressions
  1. 80 0
      files/rss2mail/rss2email.cfg
  2. 11 1
      manifests/rss2mail.pp

+ 80 - 0
files/rss2mail/rss2email.cfg

@@ -0,0 +1,80 @@
+[DEFAULT]
+from = annonces@listes.ldn-fai.net
+use-8bit = False
+force-from = False
+use-publisher-email = False
+name-format = {feed-title}: {author}
+to = annonces@listes.ldn-fai.net
+proxy = 
+feed-timeout = 60
+active = True
+digest = False
+date-header = False
+date-header-order = modified, issued, created, expired
+bonus-header = 
+trust-guid = True
+trust-link = False
+encodings = US-ASCII, ISO-8859-1, UTF-8, BIG5, ISO-2022-JP
+post-process = 
+digest-post-process = 
+html-mail = False
+use-css = False
+css = h1 {
+	font: 18pt Georgia, "Times New Roman";
+	}
+	body {
+	font: 12pt Arial;
+	}
+	a:link {
+	font: 12pt Arial;
+	font-weight: bold;
+	color: #0000cc;
+	}
+	blockquote {
+	font-family: monospace;
+	}
+	.header {
+	background: #e0ecff;
+	border-bottom: solid 4px #c3d9ff;
+	padding: 5px;
+	margin-top: 0px;
+	color: red;
+	}
+	.header a {
+	font-size: 20px;
+	text-decoration: none;
+	}
+	.footer {
+	background: #c3d9ff;
+	border-top: solid 4px #c3d9ff;
+	padding: 5px;
+	margin-bottom: 0px;
+	}
+	border: solid 4px #c3d9ff;
+	}
+	margin-left: 5px;
+	margin-right: 5px;
+	}
+unicode-snob = False
+links-after-each-paragraph = False
+body-width = 0
+email-protocol = sendmail
+sendmail = /usr/sbin/sendmail
+smtp-auth = False
+smtp-username = username
+smtp-password = password
+smtp-server = smtp.yourisp.net:25
+smtp-ssl = False
+smtp-ssl-protocol = SSLv3
+imap-auth = False
+imap-username = username
+imap-password = password
+imap-server = imap.yourisp.net
+imap-port = 143
+imap-ssl = False
+imap-mailbox = INBOX
+verbose = warning
+
+[feed.Annonces]
+url = https://ldn-fai.net/feed/
+

+ 11 - 1
manifests/rss2mail.pp

@@ -7,7 +7,7 @@ class public::rss2mail($list, $feed)  {
   $user = 'rss2mail'
   $home_user = '/home/rss2mail'
 
-  # Valid for Debian 7
+  # Valid for Debian 7 8
   if ($::operatingsystem =~ /Debian/) and ($::operatingsystemrelease =~ /^8/) {
     # Install "rrr2email"
     package { ['rss2email']:
@@ -56,6 +56,16 @@ class public::rss2mail($list, $feed)  {
       require => User['user_rss2mail'],
     }
 
+     file {
+    '/home/rss2mail/.config/rss2email.cfg':
+      ensure => file,
+      source => 'puppet:///modules/public/rss2mail/rss2email.cfg',
+      owner  => $user,
+      group  => $user,
+      mode   => '0755';
+      require => File[$home_user],
+  }
+
   } else {
     notify {"[Error] OS not supported (${::osfamily} - ${::operatingsystemrealease})":}
   }