1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
|
--- rancid-2.3.8/bin/Makefile.am
+++ rancid-2.3.8/bin/Makefile.am
@@ -96,8 +96,6 @@
-e 's,@PERLV\@,$(PERLV),g' \
-e 's,@PERLV_PATH\@,$(PERLV_PATH),g' \
-e 's,@LG_PING_CMD\@,$(LG_PING_CMD),g' \
- -e 's,@ADMINMAILPLUS\@,$(ADMINMAILPLUS),g' \
- -e 's,@MAILPLUS\@,$(MAILPLUS),g' \
-e 's,@PACKAGE\@,$(PACKAGE),g' \
-e 's,@SVN_FSTYPE\@,$(SVN_FSTYPE),g' \
-e 's,@VERSION\@,$(VERSION),g' \
--- rancid-2.3.8/bin/control_rancid.in
+++ rancid-2.3.8/bin/control_rancid.in
@@ -118,8 +118,8 @@
fi
# the receipient(s) of diffs & mail options
-mailrcpt=${mailrcpt:-"@MAILPLUS@${GROUP}${MAILDOMAIN}"}; export mailrcpt
-adminmailrcpt=${adminmailrcpt:-"@ADMINMAILPLUS@${GROUP}${MAILDOMAIN}"};
+mailrcpt=${mailrcpt:-"${MAILPREFIX}${GROUP}${MAILDOMAIN}"}; export mailrcpt
+adminmailrcpt=${adminmailrcpt:-"${ADMINMAILPREFIX}${GROUP}${MAILDOMAIN}"};
export adminmailrcpt
set | grep MAILHEADERS= > /dev/null 2>&1
if [ $? -ne 0 ] ; then
--- rancid-2.3.8/bin/rancid-run.in
+++ rancid-2.3.8/bin/rancid-run.in
@@ -147,7 +147,7 @@
if [ -s $TMPDIR/.$GROUP.old ]
then
(
- echo "To: @ADMINMAILPLUS@${GROUP}${MAILDOMAIN}"
+ echo "To: ${ADMINMAILPREFIX}${GROUP}${MAILDOMAIN}"
echo "Subject: rancid hung - $GROUP"
echo "Precedence: bulk"
echo ""
--- rancid-2.3.8/configure.in
+++ rancid-2.3.8/configure.in
@@ -163,46 +163,6 @@
AC_SUBST(SVN_FSTYPE)
rd_cv_RCSSYS=$RCSSYS
-# Check for a preference for using mail addresses like rancid+group
-# instead of the standard rancid-group
-AC_MSG_CHECKING([whether mail addresses should be in the rancid+ form])
-AC_ARG_ENABLE(mail-plus,
- AS_HELP_STRING([--enable-mail-plus], [enable mail to rancid+ addresses, instead of rancid-]),
-[if test "$enable_mail_plus" = yes; then
- AC_MSG_RESULT(yes)
- MAILPLUS="rancid+"
- AC_SUBST(MAILPLUS)
-else
- AC_MSG_RESULT(no)
- MAILPLUS="rancid-"
- AC_SUBST(MAILPLUS)
-fi],
-[AC_MSG_RESULT(no)
- MAILPLUS="rancid-"
- AC_SUBST(MAILPLUS)
-])
-rd_cv_MAILPLUS=$MAILPLUS
-
-# Check for a preference for using mail addresses like rancid+admin-group
-# instead of the standard rancid-admin-group
-AC_MSG_CHECKING([whether admin mail addresses should be in the rancid-admin+ form])
-AC_ARG_ENABLE(adminmail-plus,
- AS_HELP_STRING([--enable-adminmail-plus], [enable mail to rancid-admin+ addresses, instead of rancid-admin-]),
-[if test "$enable_adminmail_plus" = yes; then
- AC_MSG_RESULT([rancid-admin+])
- ADMINMAILPLUS="rancid-admin+"
- AC_SUBST(ADMINMAILPLUS)
-else
- AC_MSG_RESULT([${MAILPLUS}admin-])
- ADMINMAILPLUS="${MAILPLUS}admin-"
- AC_SUBST(ADMINMAILPLUS)
-fi],
-[AC_MSG_RESULT([${MAILPLUS}admin-])
- ADMINMAILPLUS="${MAILPLUS}admin-"
- AC_SUBST(ADMINMAILPLUS)
-])
-rd_cv_ADMINMAILPLUS=$ADMINMAILPLUS
-
AC_PATH_PROG(DIRNAME,dirname,no)
# locate GNU diff (one supporting the -u option)
--- rancid-2.3.8/etc/rancid.conf.sample.in
+++ rancid-2.3.8/etc/rancid.conf.sample.in
@@ -71,6 +71,21 @@
# The number of devices to collect simultaneously.
#PAR_COUNT=5; export PAR_COUNT
#
+# Define the prefixes for regular and administrative email groups
+# configuration diffs will be emailed to {MAILPREFIX}{GROUPNAME}
+# eg. rancid-routers
+# problems/errors will be emailed to {ADMINMAILPREFIX}{GROUPNAME}
+# eg. rancid-admin-routers
+#
+MAILPREFIX="rancid-"; export MAILPREFIX
+ADMINMAILPREFIX="rancid-admin-"; export ADMINMAILPREFIX
+#
+# To use a delimiter-based system instead of email aliases,
+# comment the above 2 lines and uncomment the following two lines:
+#MAILPREFIX="rancid+"; export MAILPREFIX
+#ADMINMAILPREFIX="rancid-admin+"; export ADMINMAILPREFIX
+#
+#
# list of rancid groups
#LIST_OF_GROUPS="sl joebobisp"
# more groups...
--- rancid-2.3.8/man/Makefile.am
+++ rancid-2.3.8/man/Makefile.am
@@ -79,9 +79,7 @@
-e 's,@bindir\@,$(bindir),g' \
-e 's,@localstatedir\@,$(localstatedir),g' \
-e 's,@sysconfdir\@,$(sysconfdir),g' \
- -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
- -e 's,@ADMINMAILPLUS\@,$(ADMINMAILPLUS),g' \
- -e 's,@MAILPLUS\@,$(MAILPLUS),g'
+ -e 's,@pkgdatadir\@,$(pkgdatadir),g'
lg.conf.5: Makefile $(srcdir)/lg.conf.5.in
rm -f lg.conf.5 lg.conf.5.tmp; \
--- rancid-2.3.8/man/rancid.conf.5.in
+++ rancid-2.3.8/man/rancid.conf.5.in
@@ -81,6 +81,19 @@
are always filtered (e.g.: Alteon passwords).
.\"
.TP
+.B MAILPREFIX
+Sets the mail prefix that is used to generate group emails. Configuration
+diffs are emailed to an address of the form {MAILPREFIX}{GROUPNAME}
+eg. rancid-routers
+.sp
+Default: rancid-
+.B ADMINMAILPREFIX
+Sets the mail prefix that is used to generate admin group emails.
+problems/errors are emailed to an address of the form
+{ADMINMAILPREFIX}{GROUPNAME}
+eg. rancid-admin-routers
+.sp
+Default: rancid-admin-
.B LIST_OF_GROUPS
Defines a list of group names of routers separated by white-space. These
names become the directory names in $BASEDIR which contain the data
@@ -104,10 +117,10 @@
.sp
.in +1i
.nf
-@MAILPLUS@uofo: frank
-@ADMINMAILPLUS@uofo: joe,bob
-@MAILPLUS@usfs: frank
-@ADMINMAILPLUS@usfs: joe,bob
+rancid-uofo: frank
+rancid-admin-uofo: joe,bob
+randid-usfs: frank
+rancid-admin-usfs: joe,bob
.fi
.sp
.in -1i
@@ -129,7 +142,7 @@
.B MAILDOMAIN
Define the domain part of addresses for administrative and diff e-mail.
The value of this variable is simply appended to the normal mail addresses.
-For example @MAILPLUS@usfs@example.com, if
+For example rancid-usfs@example.com, if
.B MAILDOMAIN
had been set to "@example.com".
.\"
--- rancid-2.3.8/share/downreport.in
+++ rancid-2.3.8/share/downreport.in
@@ -73,7 +73,7 @@
for GROUP in $LIST_OF_GROUPS; do
(
- echo "To: @MAILPLUS@admin-$GROUP"
+ echo "To: ${ADMINMAILPREFIX}$GROUP"
echo "Subject: Down router report - $GROUP"
echo "$MAILHEADERS" | awk '{gsub(/\\n/,"\n");print;}'
echo ""
|