rohrpost

A commandline mail client to change the world as we see it.
git clone git://r-36.net/rohrpost
Log | Files | Refs | LICENSE

commit b0ac2d0ce204637d2ce5c8845ea6f8a86d64dc3d
parent 9c46de0faaa605f288be000519a7a2a35556e523
Author: Christoph Lohmann <20h@r-36.net>
Date:   Sun, 23 Dec 2012 09:41:56 +0100

Creating examples and making the install procedure stronger.

Diffstat:
Makefile | 7++++++-
examples/sieve.example | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
proto/sieve.example | 51---------------------------------------------------
3 files changed, 57 insertions(+), 52 deletions(-)

diff --git a/Makefile b/Makefile @@ -39,7 +39,7 @@ dist: clean @echo creating dist tarball @mkdir -p ${NAME}-${VERSION} @cp -R LICENSE Makefile README.md config.mk \ - ${SRC} *.h tmpl ${NAME}-${VERSION} + ${SRC} *.h tmpl bin rfc examples ${NAME}-${VERSION} @tar -cf ${NAME}-${VERSION}.tar ${NAME}-${VERSION} @gzip ${NAME}-${VERSION}.tar @rm -rf ${NAME}-${VERSION} @@ -67,6 +67,11 @@ install: all bin chmod 755 ${DESTDIR}${PREFIX}/bin/${NAME}; \ for i in `ls -1`; \ do \ + if [ -e ${DESTDIR}${PREFIX}/bin/$$i ]; + then \ + rm -f ${DESTDIR}${PREFIX}/bin/$$i \ + fi \ + \ if [ ! -L $$i ]; \ then \ cp $$i ${DESTDIR}${PREFIX}/bin; \ diff --git a/examples/sieve.example b/examples/sieve.example @@ -0,0 +1,51 @@ +# +# See [0] for more info. +# +# [0] http://wiki.dovecot.org/LDA/Sieve +# + +require "fileinto"; + +# +# Spam +# +if anyof ( + header :contains "X-Spam-Flag" "YES", + header :contains "Subject" "*****SPAM*****" +) { + discard; + stop; +} + +# +# Important e-mails. +# +if anyof ( + header :contains "List-Id" "example.list.university.com", + header :contains "Return-Path" "crappy.list@example.com", + header :contains ["To", "Cc", "Bcc"] "@university.com", + address :all :contains ["To", "Cc", "Bcc"] "me@students.university.com" +) { + fileinto "studies"; + stop; +} + +# +# A mailinglist. +# +if header :contains "List-Id" "more.important.example.com" { + fileinto "important-mailinglist"; + stop; +} + +# +# Main filter +# +if anyof ( + address :all :is ["To", "Cc", "Bcc"] "me@me.com", + address :all :contains ["To", "Cc", "Bcc"] "no-spam@me.com" +) { + fileinto "me-com"; + stop; +} + diff --git a/proto/sieve.example b/proto/sieve.example @@ -1,51 +0,0 @@ -# -# See [0] for more info. -# -# [0] http://wiki.dovecot.org/LDA/Sieve -# - -require "fileinto"; - -# -# Spam -# -if anyof ( - header :contains "X-Spam-Flag" "YES", - header :contains "Subject" "*****SPAM*****" -) { - discard; - stop; -} - -# -# Important e-mails. -# -if anyof ( - header :contains "List-Id" "example.list.university.com", - header :contains "Return-Path" "crappy.list@example.com", - header :contains ["To", "Cc", "Bcc"] "@university.com", - address :all :contains ["To", "Cc", "Bcc"] "me@students.university.com" -) { - fileinto "studies"; - stop; -} - -# -# A mailinglist. -# -if header :contains "List-Id" "more.important.example.com" { - fileinto "important-mailinglist"; - stop; -} - -# -# Main filter -# -if anyof ( - address :all :is ["To", "Cc", "Bcc"] "me@me.com", - address :all :contains ["To", "Cc", "Bcc"] "no-spam@me.com" -) { - fileinto "me-com"; - stop; -} -