Moved from ../
Showing
6 changed files
with
146 additions
and
0 deletions
examples/config/comsat.conf
0 → 100644
1 | # This is an example configuration file for GNU comsatd utility. | ||
2 | # To use, run comsatd -c <path>/comsat.conf | ||
3 | |||
4 | ## General settings | ||
5 | # Dump on screen at most 5 lines of the message body | ||
6 | max-lines 5 | ||
7 | # Honour per-user .biffrc files | ||
8 | allow-biffrc yes | ||
9 | |||
10 | ## Security settings | ||
11 | # Allow no more than 10 requests in 10 seconds, then register overflow. | ||
12 | max-requests 10 | ||
13 | request-control-interval 10 | ||
14 | # Sleep for 5 seconds when the first overflow occurs. | ||
15 | overflow-delay-time 5 | ||
16 | # If two overflows happen within a 15 seconds interval, double the | ||
17 | # sleep time. | ||
18 | overflow-control-interval 15 | ||
19 | ## Access Control Lists | ||
20 | acl allow 127.0.0.1 | ||
21 | acl deny any |
examples/config/dot.biffrc
0 → 100644
1 | # A sample per-user biff configuration file. It should be stored | ||
2 | # in user home directory and named .biffrc. It must be owned by | ||
3 | # the user and have permissions 0600 | ||
4 | # Each line specifies an action to be taken upon arrival of | ||
5 | # a message. A backslash can be used to escape the newlines. | ||
6 | # Actions could be: | ||
7 | # beep -- Produce audible signal | ||
8 | # echo STRING -- Output STRING to the user's tty | ||
9 | # exec PROG ARGS... -- Execute given program | ||
10 | # | ||
11 | |||
12 | # This is the default action | ||
13 | echo "Mail to \a$u@$h\a\n---\n\ | ||
14 | From: $H{from}\n\ | ||
15 | Subject: $H{Subject}\n\ | ||
16 | ---\n\ | ||
17 | $B(,5)\n\ | ||
18 | ---\n" | ||
19 | |||
20 | # For users of X windows system: produce a bell and open an xmessage window | ||
21 | beep | ||
22 | exec /usr/X11R6/bin/xmessage -display :0.0 -timeout 10 "Mail to $u@$h \n---\n\ | ||
23 | From: $H{from}\n\ | ||
24 | Subject: $H{Subject}\n\ | ||
25 | ---\n\ | ||
26 | $B(,5)\n\ | ||
27 | ---\n" |
examples/config/gnu-imap4d.pam
0 → 100644
examples/config/gnu-pop3d.pam
0 → 100644
examples/config/mailutils.rc
0 → 100644
1 | ## This is a sample mailutils configuration file | ||
2 | ## Upon startup, a mailutils program scans this file for a line that | ||
3 | ## begins either with a program name or with word `mailutils'. When | ||
4 | ## found, the rest of the line following the first word is split up | ||
5 | ## at whitespace characters and resulting words are added to the | ||
6 | ## program arguments _before_ the command line options. | ||
7 | :mailutils --maildir /var/spool/mail | ||
8 | :auth --sql-host sql.sample.net --sql-db Passwd \ | ||
9 | --sql-port 3306 --sql-user mailutils \ | ||
10 | --sql-passwd guessme \ | ||
11 | --sql-getpwnam 'select user_name,password,uid,10000,"/dev/null","/dev/null" from pass where user_name="%u" and service="EMAIL"' \ | ||
12 | --sql-getpwuid 'select user_name,password,uid,10000,"/dev/null","/dev/null" from pass where uid=%u and service="EMAIL"' | ||
13 | imap4d --daemon=20 --timeout=1800 | ||
14 | mail.local --source %h/.filter.scm |
examples/scheme/reply.scm
0 → 100644
1 | ;;;; GNU Mailutils -- a suite of utilities for electronic mail | ||
2 | ;;;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. | ||
3 | ;;;; | ||
4 | ;;;; GNU Mailutils is free software; you can redistribute it and/or modify | ||
5 | ;;;; it under the terms of the GNU General Public License as published by | ||
6 | ;;;; the Free Software Foundation; either version 2, or (at your option) | ||
7 | ;;;; any later version. | ||
8 | ;;;; | ||
9 | ;;;; GNU Mailutils is distributed in the hope that it will be useful, | ||
10 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | ;;;; GNU General Public License for more details. | ||
13 | ;;;; | ||
14 | ;;;; You should have received a copy of the GNU General Public License | ||
15 | ;;;; along with GNU Mailutils; if not, write to the Free Software | ||
16 | ;;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | |||
18 | ;;; This is a simple Guile program that generates automatic reply to | ||
19 | ;;; incoming mail messages. | ||
20 | ;;; | ||
21 | ;;; usage: to your /etc/aliases add: | ||
22 | ;;; | ||
23 | ;;; username: "|/usr/local/bin/guimb -f <path>/reply.scm" | ||
24 | ;;; | ||
25 | ;;; and adjust variables below to your liking. | ||
26 | ;;; Any message to the address username@your.host will be responded | ||
27 | ;;; and (optionally) saved in a mailbox. | ||
28 | |||
29 | (define indent-prefix "> ") | ||
30 | (define save-mailbox #f) | ||
31 | (define reply-text | ||
32 | "Sorry, I am not here to attend your message. I will do\n\ | ||
33 | it as soon as I come back.\n\n\ | ||
34 | Kind regards\n") | ||
35 | |||
36 | ;; Reply to the incoming message | ||
37 | (define (reply in-msg) | ||
38 | (let* ((out-msg (mu-message-create)) | ||
39 | (in-port (mu-message-get-port in-msg "r")) | ||
40 | (out-port (mu-message-get-port out-msg "w"))) | ||
41 | (mu-message-set-header out-msg "To" | ||
42 | (mu-message-get-header in-msg "From")) | ||
43 | (mu-message-set-header out-msg "Cc" | ||
44 | (mu-message-get-header in-msg "Cc")) | ||
45 | (mu-message-set-header out-msg "Subject" | ||
46 | (string-append | ||
47 | "Re: " | ||
48 | (mu-message-get-header in-msg "Subject"))) | ||
49 | |||
50 | (display reply-text out-port) | ||
51 | |||
52 | (display "\n\nOriginal message:\n" out-port) | ||
53 | (do ((hdr (mu-message-get-header-fields in-msg) (cdr hdr))) | ||
54 | ((null? hdr) #f) | ||
55 | (let ((s (car hdr))) | ||
56 | (display (string-append | ||
57 | indent-prefix | ||
58 | (car s) ": " (cdr s) "\n") out-port))) | ||
59 | (display (string-append indent-prefix "\n") out-port) | ||
60 | (do ((line (read-line in-port) (read-line in-port))) | ||
61 | ((eof-object? line) #f) | ||
62 | (display (string-append indent-prefix line "\n") out-port)) | ||
63 | |||
64 | (close-input-port in-port) | ||
65 | (close-output-port out-port) | ||
66 | |||
67 | (mu-message-send out-msg))) | ||
68 | |||
69 | ;;; Upon receiving a message, store it away in the save mailbox and | ||
70 | ;;; reply to the sender. | ||
71 | (let ((mbox (and save-mailbox (mu-mailbox-open save-mailbox "cw"))) | ||
72 | (msg (mu-mailbox-get-message current-mailbox 1))) | ||
73 | (cond | ||
74 | (mbox | ||
75 | (mu-mailbox-append-message mbox msg) | ||
76 | (mu-mailbox-close mbox))) | ||
77 | (reply msg)) | ||
78 | |||
79 | |||
80 | |||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or sign in to post a comment