Commits

Etienne Perot  committed 4f65bc7

Add stub .getmail directory to avoid the need for ~/.getmail to exist

  • Participants
  • Parent commits e3c1bd1

Comments (0)

Files changed (2)

File modules/pop3_maildir/manifests/init.pp

 	pop3_maildir::maildir {"$maildir/$sent_folder":
 		owner => $localuser
 	}
+	file {"$maildir/.getmail":
+		ensure => directory,
+		owner => $localuser,
+		mode => 0600
+	}
 	file {"$maildir/.sieve":
 		owner => $localuser,
 		mode => 0600,

File modules/pop3_maildir/templates/cron.sh.erb

 # Stupid lack of lookaheads
 cat '<%= @maildir %>/.sieve' | sed -r "s#fileinto \"([^m]|m[^a]|ma[^i]|mai[^l]|mail[^d]|maild[^i]|maildi[^r]|maildir[^:]|maildir:[^/]|maildir:/[^/])#fileinto \"maildir://$stubDir/.<%= @inbox_folder %>.directory/\\1#gi" > "$stubDir/.sieve"
 set +e
-<% if @torify %>torsocks <% end %>getmail --rcfile="$stubDir/.getmailrc.tmp"
+<% if @torify %>torsocks <% end %>getmail --getmaildir="$stubDir/.getmail" --rcfile="$stubDir/.getmailrc.tmp"
 exitCode="$?"
 set -e
 sudo /usr/bin/.restore-stub-dir "$stubDir"