tCreating examples and making the install procedure stronger. - rohrpost - A commandline mail client to change the world as we see it.
 (HTM) git clone git://r-36.net/rohrpost
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit b0ac2d0ce204637d2ce5c8845ea6f8a86d64dc3d
 (DIR) parent 9c46de0faaa605f288be000519a7a2a35556e523
 (HTM) 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(-)
       ---
 (DIR) diff --git a/Makefile b/Makefile
       t@@ -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}
       t@@ -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; \
 (DIR) diff --git a/examples/sieve.example b/examples/sieve.example
       t@@ -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;
       +}
       +
 (DIR) diff --git a/proto/sieve.example b/proto/sieve.example
       t@@ -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;
       -}
       -