]>
Commit | Line | Data |
---|---|---|
01bb224d | 1 | diff -urN sendmail-8.12.3/Makefile sendmail-8.12.3.patched/Makefile |
2 | --- sendmail-8.12.3/Makefile Thu Aug 23 22:44:39 2001 | |
3 | +++ sendmail-8.12.3.patched/Makefile Fri Apr 26 17:10:37 2002 | |
4 | @@ -2,7 +2,7 @@ | |
5 | ||
6 | SHELL= /bin/sh | |
7 | SUBDIRS= libsm libsmutil libsmdb sendmail editmap mail.local \ | |
8 | - mailstats makemap praliases rmail smrsh vacation | |
9 | + mailstats rmail smrsh vacation | |
10 | # libmilter: requires pthread | |
11 | BUILD= ./Build | |
12 | OPTIONS= $(CONFIG) $(FLAGS) | |
13 | diff -urN sendmail-8.12.3/bluelabs.mc sendmail-8.12.3.patched/bluelabs.mc | |
14 | --- sendmail-8.12.3/bluelabs.mc Thu Jan 1 01:00:00 1970 | |
15 | +++ sendmail-8.12.3.patched/bluelabs.mc Fri Apr 26 17:10:37 2002 | |
16 | @@ -0,0 +1,243 @@ | |
17 | +###################################################################### | |
18 | +# This is the Blue Labs m4 file. | |
19 | +# | |
20 | +# A work-in-progress website for building sendmail with this patch is | |
21 | +# at http://blue-labs.org/clue/sendmail.php | |
22 | +# | |
23 | +# !!! EDIT THE CONFIGURATION SETTINGS TO MATCH YOUR DESIRES !!! | |
24 | +# | |
25 | +# NOTE: THIS IS A SPECIALISED .cf FOR THE POSTGRESQL PATCH ONLY | |
26 | +# | |
27 | +VERSIONID(`(#) Blue Labs bluelabs.mc v 9.1 (Blue Labs) 10/13/2001') | |
28 | +###################################################################### | |
29 | + | |
30 | +## | |
31 | +# See http://blue-labs.org/clue/sendmail.php for detailed instructions | |
32 | +# | |
33 | +# TODO: replace 'newaliases' and 'makemap' targets with "don't run this" | |
34 | +# replace man pages also | |
35 | +## | |
36 | + | |
37 | +# compile options | |
38 | +divert(-1)dnl | |
39 | +OSTYPE(linux)dnl | |
40 | +define(`confBLDVARIANT',`OPTIMIZED') # optimize the binary | |
41 | +# note, there will be two -O flags as it compiles. According to the gcc | |
42 | +# man page, the last one on the line is used in the compile | |
43 | +define(`confCCOPTS',`-O3 -pipe -mcpu=i686 -march=i686')dnl | |
44 | +APPENDDEF(`confENVDEF', `-DSM_CONF_SHM -DDNSMAP -DMILTER -DMAP_REGEX')dnl | |
45 | + | |
46 | +##################################################################################### | |
47 | +# | |
48 | +# BIG BOLD WARNING. link -lcrypt BEFORE -lcrypto or your md5 salted | |
49 | +# passwords will handled as DES passwords and FAIL TO WORK. Thank OpenSSL for | |
50 | +# this | |
51 | +# | |
52 | +##################################################################################### | |
53 | + | |
54 | +## | |
55 | +# SASL, be sure to link -lcrypt FIRST so it overrides the built-in crypt() | |
56 | +# in openssl, !@#$!@% that is so frustrating | |
57 | +## | |
58 | +APPENDDEF(`confENVDEF', `-DSASL')dnl | |
59 | +APPENDDEF(`confINCDIRS', `-I/usr/local/include -I/usr/local/include/sasl')dnl | |
60 | +APPENDDEF(`confLIBS', `-lsasl -lcrypt')dnl | |
61 | +APPENDDEF(`confLIBDIRS', `-L/usr/local/lib/sasl')dnl | |
62 | +define(`confDEF_AUTH_INFO', `/etc/mail/auth/auth-info')dnl | |
63 | +define(`confAUTH_MECHANISMS', `DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl | |
64 | +TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl | |
65 | + | |
66 | +## | |
67 | +# postgres items | |
68 | +## | |
69 | +APPENDDEF(`confMAPDEF',`-DPGSQLMAP')dnl | |
70 | +APPENDDEF(`confINCDIRS',`-I/usr/local/pgsql/include')dnl | |
71 | +APPENDDEF(`confLIBDIRS',`-L/usr/local/pgsql/lib')dnl | |
72 | +# if you have compiled/installed BIND, you need to add -lresolv | |
73 | +APPENDDEF(`confLIBS',`-lpq -lresolv')dnl | |
74 | + | |
75 | +## | |
76 | +# TLS (ssl) items | |
77 | +# | |
78 | +# Compile with -D_FFR_SASL_OPTS and set 'p' in AuthOptions. (p not done) | |
79 | +# | |
80 | +## | |
81 | +APPENDDEF(`confENVDEF',`-DSTARTTLS -D_FFR_SASL_OPTS')dnl | |
82 | +APPENDDEF(`confLIBS',`-lssl -lcrypto')dnl | |
83 | +define(`SSL_DIR', `/usr/ssl')dnl | |
84 | +define(`confCACERT_PATH', `SSL_DIR/certs')dnl | |
85 | +define(`confCACERT', `SSL_DIR/certs/cacert.pem')dnl | |
86 | +define(`confSERVER_CERT', `SSL_DIR/certs/mailcert.pem')dnl | |
87 | +define(`confSERVER_KEY', `SSL_DIR/private/mailkey.pem')dnl | |
88 | +define(`confCLIENT_CERT', `SSL_DIR/certs/mailcert.pem')dnl | |
89 | +define(`confCLIENT_KEY', `SSL_DIR/private/mailkey.pem')dnl | |
90 | +define(`confAUTH_OPTIONS',`p') | |
91 | + | |
92 | +FEclass-E-expose | |
93 | +FLclass-L-localusers | |
94 | + | |
95 | +## | |
96 | +# example line: | |
97 | +# pgsql [-h <pgsql server>] -c <connection string> -s <query string> | |
98 | +## | |
99 | + | |
100 | +APPENDDEF(`DATABASE_MAP_TYPE', `pgsql')dnl | |
101 | +define(`PG_WHERE', where s_in='%s') | |
102 | +define(`PG_CONNSTR', "dbname=sendmail user=sendmail") | |
103 | +define(`PG_SOUT', "select distinct s_out from) | |
104 | +FEATURE(`pg_aliases', pgsql -c `PG_CONNSTR' -s `PG_SOUT' aliases `PG_WHERE'")dnl | |
105 | +FEATURE(`pg_virtualusers', pgsql -c `PG_CONNSTR' -s `PG_SOUT' virtualusers `PG_WHERE'")dnl | |
106 | +FEATURE(`pg_usersdb', pgsql -c `PG_CONNSTR' -s `PG_SOUT' userrewrite `PG_WHERE'")dnl | |
107 | +FEATURE(`pg_accessdb', pgsql -c `PG_CONNSTR' -s `PG_SOUT' access `PG_WHERE'")dnl | |
108 | +FEATURE(`pg_domaintable', pgsql -c `PG_CONNSTR' -s `PG_SOUT' domaintable `PG_WHERE'")dnl | |
109 | +FEATURE(`pg_generics', pgsql -c `PG_CONNSTR' -s `PG_SOUT' genericstable `PG_WHERE'")dnl | |
110 | +FEATURE(`pg_mailer', pgsql -c `PG_CONNSTR' -s `PG_SOUT' mailertable `PG_WHERE'")dnl | |
111 | + | |
112 | +define(`confPROCESS_TITLE_PREFIX', `[Blue-PgSQL]')dnl | |
113 | +define(`confMAX_MESSAGE_SIZE', `52428800')dnl # 50 Megs | |
114 | +define(`confFORWARD_PATH', `$z/.forward:/etc/mail/forward-files/$u')dnl | |
115 | +define(`confHOST_STATUS_DIRECTORY', `/etc/mail/host-status/')dnl | |
116 | +define(`confDEF_USER_ID', `mail')dnl | |
117 | +define(`confMAX_DAEMON_CHILDREN', `40')dnl | |
118 | +define(`confCONNECTION_RATE_THROTTLE', `20')dnl | |
119 | +define(`confSINGLE_LINE_FROM_HEADER', `True')dnl | |
120 | +define(`confSMTP_LOGIN_MSG', `$j Sendmail $v/$Z; $b\ | |
121 | + \ | |
122 | + Spam is prohibited here and any detected spam may be used in prosecution\ | |
123 | + against the spammer. This sendmail setup uses PgSQL (postgres) for most of\ | |
124 | + it''`s tables, for information on this, see\ | |
125 | + http://blue-labs.org/clue/sendmail.php\ | |
126 | + \ | |
127 | +')dnl | |
128 | +define(`confDONT_PROBE_INTERFACES', `True')dnl | |
129 | +define(`confREJECT_MSG', `550 Your mail is rejected.\ | |
130 | + Contact <admin@$m> to have this matter resolved.\ | |
131 | + ')dnl | |
132 | +define(`confTO_INITIAL', `1m')dnl | |
133 | +define(`confTO_CONNECT', `15s')dnl | |
134 | +define(`confTO_HELO', `4m')dnl | |
135 | +define(`confTO_HOSTSTATUS', `1m')dnl | |
136 | +define(`confTO_DATAINIT', `2m')dnl | |
137 | +define(`confTO_DATABLOCK', `5m')dnl | |
138 | +define(`confTO_DATAFINAL', `5m')dnl | |
139 | +define(`confCONNECTION_RATE_THROTTLE', `40')dnl | |
140 | +define(`confDIAL_DELAY', `15s')dnl | |
141 | +define(`confNO_RCPT_ACTION', `add-apparently-to')dnl | |
142 | +define(`confALIAS_WAIT', `0')dnl | |
143 | +define(`confMAX_HOP', `35')dnl | |
144 | +define(`confQUEUE_LA', `5')dnl | |
145 | +define(`confREFUSE_LA', `12')dnl | |
146 | +define(`confSEPARATE_PROC', `False')dnl | |
147 | + | |
148 | +define(`confCON_EXPENSIVE', `true')dnl | |
149 | +define(`confWORK_RECIPIENT_FACTOR', `1000')dnl | |
150 | +define(`confWORK_TIME_FACTOR', `3000')dnl | |
151 | +define(`confQUEUE_SORT_ORDER', `Time')dnl | |
152 | + | |
153 | +define(`confDEAD_LETTER_DROP', `/var/tmp/dead.letter')dnl | |
154 | +define(`confRRT_IMPLIES_DSN', `True')dnl | |
155 | +define(`confCONTROL_SOCKET_NAME', `/var/spool/mqueue/.control')dnl | |
156 | +define(`confMAX_HEADERS_LENGTH', `16384')dnl | |
157 | +define(`confMAX_ALIAS_RECURSION', `10')dnl | |
158 | +define(`confMAX_RCPTS_PER_MESSAGE', `50')dnl | |
159 | +define(`confSHAREDMEMORYKEY', `42')dnl | |
160 | +define(`confMCI_CACHE_SIZE', `4')dnl | |
161 | +define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl | |
162 | +define(`STATUS_FILE', `/etc/mail/sendmail-status')dnl | |
163 | + | |
164 | +## | |
165 | +# queue groups | |
166 | +## | |
167 | +FEATURE(`queuegroup')dnl | |
168 | +define(`QUEUE_DIR', `/var/spool/mqueue')dnl | |
169 | +define(`LOCAL_PROG_QGRP', `local')dnl | |
170 | +define(`LOCAL_MAILER_QGRP', `local')dnl | |
171 | +define(`ESMTP_MAILER_QGRP', `smtp')dnl | |
172 | +define(`SMTP8_MAILER_QGRP', `smtp')dnl | |
173 | +define(`DSMTP_MAILER_QGRP', `smtp')dnl | |
174 | +define(`RELAY_MAILER_QGRP', `smtp')dnl | |
175 | +dnl QUEUE_GROUP(`mqueue', `P=/var/spool/mqueue, r=5, F=f, R=2')dnl | |
176 | + | |
177 | +dnl Nice is the nice(2) increment for queue groups | |
178 | +dnl Interval is the tiem between two queue runs | |
179 | +dnl Path.. | |
180 | +dnl Runners is the number of parallel queue runners | |
181 | +dnl Jobs is the max number of messages delivered per queue run | |
182 | +dnl recipients is the max number of recipients per envelope | |
183 | + | |
184 | +QUEUE_GROUP(`local', `P=/var/spool/mqueue/local, N=0, I=30s, R=5, J=500, r=100, F=f')dnl | |
185 | +QUEUE_GROUP(`smtp', `P=/var/spool/mqueue/smtp, N=5, I=30s, R=10, J=500, r=100, F=f')dnl | |
186 | +QUEUE_GROUP(`relay', `P=/var/spool/mqueue/relay, N=10, I=1m, R=2, r=100, F=f')dnl | |
187 | +QUEUE_GROUP(`lmtp', `P=/var/spool/mqueue/lmtp, N=0, I=30s, R=2, r=100, F=f')dnl | |
188 | +QUEUE_GROUP(`expensive', `P=/var/spool/mqueue/expensive, F=e, N=19 I=5m R=1 r=200')dnl | |
189 | + | |
190 | +# HoldExpensive [c] If an outgoing mailer is marked as being expensive, don't connect | |
191 | +# immediately. This requires that queueing be compiled in, since it will depend on a queue | |
192 | +# run process to actually send the mail. | |
193 | + | |
194 | +## | |
195 | +# distinguish case on names, Blu3 is different from blu3 | |
196 | +## | |
197 | +MODIFY_MAILER_FLAGS(`LOCAL', `+u')dnl | |
198 | + | |
199 | +FEATURE(`always_add_domain')dnl | |
200 | +FEATURE(`blacklist_recipients')dnl | |
201 | +dnl FEATURE(`dnsbl',`rbl.maps.vix.com',` Mail from $&{client_addr} rejected; see http://mail-abuse.org/rbl/')dnl | |
202 | +dnl FEATURE(`dnsbl',`dul.maps.vix.com')dnl | |
203 | + | |
204 | +FEATURE(`dnsbl',`blackholes.mail-abuse.org', `Mail from $&{client_addr} rejected; see http://mail-abuse.org/rbl/')dnl | |
205 | +FEATURE(`dnsbl',`dialups.mail-abuse.org', `Mail from $&{client_addr} rejected; see http://mail-abuse.org/rbl/')dnl | |
206 | +FEATURE(`dnsbl',`relays.mail-abuse.org', `Mail from $&{client_addr} rejected; see http://mail-abuse.org/rbl/')dnl | |
207 | + | |
208 | +FEATURE(`rhsbl',`dsn.rfc-ignorant.org', `550 You do not accept bounces violating RFC 821/2505/2821 - see http://www.rfc-ignorant.org/', `h')dnl | |
209 | +FEATURE(`rhsbl',`postmaster.rfc-ignorant.org', `550 Mail rejected as your domain does not have a working postmaster address - see http://www.rfc-ignorant.org/', `h')dnl | |
210 | +FEATURE(`rhsbl',`abuse.rfc-ignorant.org', `550 Mail rejected as your domain does not have a working abuse address - see http://www.rfc-ignorant.org/', `h')dnl | |
211 | +FEATURE(`rhsbl',`whois.rfc-ignorant.org', `550 Mail rejected as your whois information does not exist or is obviously fictitous - see http://www.rfc-ignorant.org/', `h')dnl | |
212 | + | |
213 | +FEATURE(`delay_checks')dnl | |
214 | +FEATURE(`generics_entire_domain')dnl | |
215 | +FEATURE(`local_procmail')dnl | |
216 | +FEATURE(`masquerade_envelope')dnl | |
217 | +FEATURE(`nouucp',`reject')dnl | |
218 | +FEATURE(`redirect')dnl | |
219 | +FEATURE(`relay_based_on_MX')dnl | |
220 | +FEATURE(`relay_entire_domain')dnl | |
221 | +FEATURE(`use_ct_file')dnl | |
222 | +FEATURE(`use_cw_file')dnl | |
223 | +FEATURE(`virtuser_entire_domain')dnl | |
224 | +FEATURE(`delay_checks',`friend')dnl | |
225 | +FEATURE(`lookupdotdomain') | |
226 | + | |
227 | +MASQUERADE_DOMAIN_FILE(`/etc/mail/masquerade-these-as-me')dnl | |
228 | + | |
229 | +MAILER(local)dnl | |
230 | +MAILER(smtp)dnl | |
231 | + | |
232 | +LOCAL_RULESETS | |
233 | + | |
234 | +# | |
235 | +# snow white | |
236 | +# | |
237 | +HFrom: $>CheckFrom | |
238 | +SCheckFrom | |
239 | +# Snow White Virus | |
240 | +R$* <hahaha@sexyfun.net> $* $#error $: "553 Delivery blocked: Snow White virus" | |
241 | + | |
242 | +# | |
243 | +# sircam | |
244 | +# | |
245 | +Kchkcontent regex -a@REJ Outlook_Express_message_boundary | |
246 | +HContent-Type: $>CheckContent | |
247 | +SCheckContent | |
248 | +R$* $: $(chkcontent $&({currHeader} $) | |
249 | +R@REJ $error $: "553 Delivery blocked --- SirCam virus detected" | |
250 | + | |
251 | +# | |
252 | +# subject check | |
253 | +# subject encodings, non-ascii characters, and trailing numbers in subject | |
254 | +# with lots of spaces are spam | |
255 |