1 /*:ts=8*/ 2 /***************************************************************************** 3 * FIDOGATE --- Gateway software UNIX <-> FIDO 4 * 5 * $Id: config.h,v 4.49 2004/08/22 20:19:09 n0ll Exp $ 6 * 7 * Configuration header file 8 * 9 ***************************************************************************** 10 * Copyright (C) 1990-2002 11 * _____ _____ 12 * | |___ | Martin Junius <mj.at.n0ll.dot.net> 13 * | | | | | | Radiumstr. 18 14 * |_|_|_|@home| D-51069 Koeln, Germany 15 * 16 * This file is part of FIDOGATE. 17 * 18 * FIDOGATE is free software; you can redistribute it and/or modify it 19 * under the terms of the GNU General Public License as published by the 20 * Free Software Foundation; either version 2, or (at your option) any 21 * later version. 22 * 23 * FIDOGATE is distributed in the hope that it will be useful, but 24 * WITHOUT ANY WARRANTY; without even the implied warranty of 25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 26 * General Public License for more details. 27 * 28 * You should have received a copy of the GNU General Public License 29 * along with FIDOGATE; see the file COPYING. If not, write to the Free 30 * Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 31 *****************************************************************************/ 32 33 /***** General configuration *************************************************/ 34 35 /* 36 * Generate local FTN addresses, e.g. 37 * user_name%p.f.n.z@host.domain 38 * instead of 39 * user_name@p.f.n.z.domain 40 */ 41 /* #define LOCAL_FTN_ADDRESSES */ 42 43 /* 44 * Create Binkley-style BSY files for all outbound operations 45 */ 46 #define DO_BSY_FILES 47 48 /* 49 * Create lock files / BSY files in an NFS-safe way (see man 2 open) 50 */ 51 #define NFS_SAFE_LOCK_FILES 52 53 /* 54 * Create 4D outbound filenames for AmigaDOS mailers, 55 * Z.N.F.P.flo / Z.N.F.P.mo0 56 */ 57 /* #define AMIGADOS_4D_OUTBOUND */ 58 59 /* 60 * Default max. message size for FIDO. Due to some more brain damage 61 * in FIDONET programs we have to split larger messages into several 62 * smaller ones. May be set with the -M option in AREAS or MaxMsgSize 63 * in DEFAULT_CONFIG_GATE. 64 */ 65 /* < 16 K */ 66 #define MAXMSGSIZE 14000 67 /* < 32 K */ 68 /* #define MAXMSGSIZE 30000 */ 69 70 /* 71 * Domain for invalid FTN addresses 72 */ 73 #define FTN_INVALID_DOMAIN "INVALID_FTN_ADDRESS" 74 75 /* 76 * syslog facility used for logging if logfile == "syslog" 77 * (only for HAS_SYSLOG defined) 78 */ 79 #define FACILITY LOG_LOCAL0 80 81 /* 82 * Default assumed charset for Fido messages (see also DefaultCharset) 83 */ 84 #define CHARSET_STDFTN "ibmpc" 85 86 /* 87 * Default assumed charset for RFC messages if without MIME headers 88 */ 89 #define CHARSET_STDRFC "iso-8859-1" 90 91 /* 92 * Default charset for RFC messages with forced 7bit encoding 93 */ 94 #define CHARSET_STD7BIT "us-ascii" 95 96 97 98 /***** ftn2rfc configuration ************************************************/ 99 100 /* 101 * Rewrite addresses found in ALIASES so that the sender's address is the 102 * gateway address. The reverse direction requires suitable MTA aliases. 103 */ 104 /* #define ALIASES_ARE_LOCAL */ 105 106 107 108 /***** rfc2ftn configuration ************************************************/ 109 110 /** Passthru operation for NetMail: FIDO->Internet->FIDO **/ 111 /* #define PASSTHRU_NETMAIL */ 112 /** Passthru operation for EchoMail: FIDO->Internet->FIDO **/ 113 /* 114 * Implemented, but requires ftntoss run after rfc2ftn to sort SEEN-BY 115 */ 116 /* #define PASSTHRU_ECHOMAIL */ 117 118 /* 119 * Don't pass news control messages to FTN 120 */ 121 #define NO_CONTROL 122 123 124 125 /***** AI patches configuration (see README.ai) *****************************/ 126 /* 127 * Add -a option to HOSTS entries, useful only with PASSTHRU_NET/ECHOMAIL 128 */ 129 /* #define AI_1 */ 130 131 /* 132 * New `DeleteSeenBy' and `DeletePath' options for ftntoss 133 */ 134 /* #define AI_3 */ 135 136 /* 137 * Check on 8bit in subject, origin and tearline 138 */ 139 #define AI_5 140 141 /* 142 * New `AddressIsLocalForXPost' option in config.common file (see 143 * example). In this variable one can specify wildcards to determine 144 * which users are allowed to crosspost to areas marked with `-l' flag 145 * in `areas' file. 146 */ 147 /* #define AI_6 */ 148 149 /* 150 * Added ACL support. This feature allows one to describe the 151 * correspondence between sender's email address and newsgroups to 152 * which this sender is allowed to write. One can use wildcards as 153 * email and newsgroups. The newsgroups list is in INN like style. See 154 * the comments in `acl' file in the `examples' directory for further 155 * information. 156 */ 157 /* #define AI_8 */ 158 159 160 161 /***** System dependend configuration *************************************** 162 * 163 * HAS_FCNTL_LOCK Do you have file locking with fcntl() 164 * 165 * HAS_GETTIMEOFDAY Do you have gettimeofday()? 166 * 167 * HAS_TM_GMTOFF Does your (struct tm) have a tm_gmtoff field? 168 * 169 * HAS_SYSEXITS_H Do you have sysexits.h? 170 * 171 * 172 * Define only one of HAS_TM_ZONE, HAS_STRFTIME, HAS_TZNAME!!! 173 * 174 * HAS_TM_ZONE Does your (struct tm) have a tm_zone field? 175 * 176 * HAS_STRFTIME Do you have strftime()? 177 * 178 * HAS_TZNAME Do you have extern char *tzname[2]? 179 * 180 * 181 * Define only one of HAS_STRCASECMP, HAS_STRICMP!!! 182 * 183 * HAS_STRCASECMP Do you have strcasecmp(), strncasecmp()? 184 * 185 * HAS_STRICMP Do you have stricmp(), strnicmp()? 186 * 187 * 188 * HAS_STRERROR Do you have strerror()? 189 * 190 * 191 * DO_BINARY Open files in binary mode 192 * 193 * DO_DOSIFY DOSify program names for execution 194 * 195 * 196 * RECEIVED_BY_MAILER "Received: by NeXT.Mailer" 197 * Define this if your mail system always 198 * generates something like 199 * "Received: by NeXT.Mailer" 200 * 201 * HAS_SYSLOG syslogd, syslog(), vsyslog() supported 202 * 203 * HAS_SNPRINTF snprintf(), vsnprintf() supported 204 * 205 * HAS_HARDLINKS hardlinks supported by link() and filesystem 206 * 207 * HAS_POSIX_REGEX POSIX regcomp(), regexec() etc. supported 208 */ 209 210 /***** Unix and derivates ***************************************************/ 211 /* Standard config: POSIX UNIX */ 212 # define HAS_FCNTL_LOCK 213 # undef HAS_GETTIMEOFDAY 214 # undef HAS_TM_GMTOFF 215 # undef HAS_SYSEXITS_H 216 # undef HAS_TM_ZONE 217 # define HAS_STRFTIME 218 # undef HAS_TZNAME 219 # undef HAS_STRCASECMP 220 # undef HAS_STRICMP 221 # define HAS_STRERROR 222 # undef DO_BINARY 223 # undef DO_DOSIFY 224 # undef HAS_SYSLOG /* syslog(), vsyslog() not supported */ 225 # undef HAS_SNPRINTF /* snprintf(), vsnprintf() not supported */ 226 # define HAS_HARDLINKS 227 # undef HAS_POSIX_REGEX 228 229 #ifdef __sun__ 230 # ifdef __svr4__ /* Solaris 2.x aka SUNOS 5.x, GNU gcc */ 231 # define HAS_FCNTL_LOCK 232 # define HAS_GETTIMEOFDAY 233 # undef HAS_TM_GMTOFF 234 # define HAS_SYSEXITS_H 235 # undef HAS_TM_ZONE 236 # define HAS_STRFTIME 237 # undef HAS_TZNAME 238 # define HAS_STRCASECMP 239 # undef HAS_STRICMP 240 # define HAS_STRERROR 241 # undef DO_BINARY 242 # undef DO_DOSIFY 243 # define HAS_SYSLOG 244 # define HAS_SNPRINTF 245 # define HAS_HARDLINKS 246 # define HAS_POSIX_REGEX 247 # else /* SUNOS 4.1.x, GNU gcc */ 248 # define HAS_FCNTL_LOCK 249 # define HAS_GETTIMEOFDAY 250 # define HAS_TM_GMTOFF 251 # define HAS_SYSEXITS_H 252 # undef HAS_TM_ZONE 253 # define HAS_STRFTIME 254 # undef HAS_TZNAME 255 # define HAS_STRCASECMP 256 # undef HAS_STRICMP 257 # undef HAS_STRERROR 258 # undef DO_BINARY 259 # undef DO_DOSIFY 260 # define HAS_SYSLOG 261 # undef HAS_SNPRINTF 262 # define HAS_HARDLINKS 263 # undef HAS_POSIX_REGEX 264 # endif /**svr4**/ 265 #endif 266 267 #ifdef __linux__ /* Linux */ 268 # define HAS_FCNTL_LOCK 269 # define HAS_GETTIMEOFDAY 270 # undef HAS_TM_GMTOFF 271 # define HAS_SYSEXITS_H 272 # undef HAS_TM_ZONE 273 # define HAS_STRFTIME 274 # undef HAS_TZNAME 275 # define HAS_STRCASECMP 276 # undef HAS_STRICMP 277 # define HAS_STRERROR 278 # undef DO_BINARY 279 # undef DO_DOSIFY 280 # define HAS_SYSLOG 281 # define HAS_SNPRINTF 282 # define HAS_HARDLINKS 283 # define HAS_POSIX_REGEX 284 #endif 285 286 #if (defined(__FreeBSD__)||defined(__DragonFly__)) /* FreeBSD 2.1.6., GNU gcc */ 287 # define HAS_FCNTL_LOCK 288 # define HAS_GETTIMEOFDAY 289 # define HAS_TM_GMTOFF 290 # define HAS_SYSEXITS_H 291 # define HAS_TM_ZONE 292 # define HAS_STRFTIME 293 # undef HAS_TZNAME 294 # define HAS_STRCASECMP 295 # undef HAS_STRICMP 296 # undef HAS_STRERROR /* ? */ 297 # undef DO_BINARY 298 # undef DO_DOSIFY 299 # define HAS_SYSLOG 300 # define HAS_SNPRINTF /* ? */ 301 # define HAS_HARDLINKS 302 # undef HAS_POSIX_REGEX /* ? */ 303 #endif 304 305 #ifdef ISC /* ISC 3.x, GNU gcc, -DISC necessary */ 306 # define HAS_FCNTL_LOCK 307 # define HAS_GETTIMEOFDAY 308 # undef HAS_TM_GMTOFF 309 # undef HAS_SYSEXITS_H /* ? */ 310 # undef HAS_TM_ZONE 311 # undef HAS_STRFTIME 312 # define HAS_TZNAME 313 # undef HAS_STRCASECMP /* ? */ 314 # undef HAS_STRICMP 315 # undef HAS_STRERROR /* ? */ 316 # undef DO_BINARY 317 # undef DO_DOSIFY 318 # define HAS_SYSLOG 319 # undef HAS_SNPRINTF 320 # define HAS_HARDLINKS 321 # undef HAS_POSIX_REGEX 322 #endif 323 324 #ifdef __NeXT__ /* NEXTSTEP 3.3 (Intel only?) */ 325 # define HAS_GETTIMEOFDAY 326 # define HAS_TM_GMTOFF 327 # define HAS_SYSEXITS_H 328 # define HAS_TM_ZONE 329 # define HAS_STRFTIME 330 # define HAS_TZNAME 331 # undef HAS_STRCASECMP 332 # undef HAS_STRICMP 333 # undef HAS_STRERROR 334 # undef DO_BINARY 335 # define RECEIVED_BY_MAILER "Received: by NeXT.Mailer" 336 # undef DO_DOSIFY 337 # define HAS_SYSLOG 338 # undef HAS_SNPRINTF 339 # define HAS_HARDLINKS 340 # undef HAS_POSIX_REGEX 341 #endif /* __NeXT__ */ 342 343 344 /***** Other (MSDOS, OS/2, Windows) *****************************************/ 345 #ifdef MSDOS /* MSDOS, DJGPP GNU gcc */ 346 # undef HAS_FCNTL_LOCK 347 # define HAS_TM_GMTOFF 348 # undef HAS_SYSEXITS_H /* ? */ 349 # undef HAS_TM_ZONE 350 # define HAS_GETTIMEOFDAY 351 # define HAS_STRFTIME 352 # undef HAS_STRCASECMP 353 # define HAS_STRICMP 354 # undef HAS_STRERROR /* ? */ 355 # define DO_BINARY 356 # define DO_DOSIFY 357 # undef HAS_SYSLOG /* syslog(), vsyslog() not supported */ 358 # undef HAS_SNPRINTF 359 # undef HAS_HARDLINKS 360 # undef HAS_POSIX_REGEX 361 #endif 362 363 #ifdef __EMX__ /* OS/2, EMX GNU gcc */ 364 # ifndef OS2 365 # define OS2 366 # endif 367 #endif 368 #ifdef OS2 369 # undef HAS_FCNTL_LOCK 370 # undef HAS_SYSEXITS_H 371 # define HAS_GETTIMEOFDAY 372 # define HAS_STRFTIME 373 # undef HAS_STRCASECMP 374 # define HAS_STRICMP 375 # define HAS_STRERROR 376 # define DO_BINARY 377 # define DO_DOSIFY 378 # undef HAS_SYSLOG /* syslog(), vsyslog() not supported */ 379 # define HAS_SNPRINTF 380 # undef HAS_HARDLINKS 381 # undef HAS_POSIX_REGEX 382 #endif 383 384 #ifdef __CYGWIN32__ /* GNU-Win32 Beta 20.1 */ 385 # undef HAS_FCNTL_LOCK 386 # undef HAS_GETTIMEOFDAY 387 # undef HAS_TM_GMTOFF 388 # undef HAS_SYSEXITS_H 389 # undef HAS_TM_ZONE 390 # define HAS_STRFTIME 391 # undef HAS_TZNAME 392 # define HAS_STRCASECMP 393 # undef HAS_STRICMP 394 # define HAS_STRERROR 395 # define DO_BINARY 396 # undef DO_DOSIFY 397 # undef HAS_SYSLOG /* syslog(), vsyslog() not supported */ 398 # undef HAS_SNPRINTF /* in stdio.h, but not in libraries */ 399 # undef HAS_HARDLINKS 400 # undef HAS_POSIX_REGEX 401 #endif 402 403 /* Reset some #define's based on system config */ 404 #ifndef HAS_HARDLINKS 405 # undef NFS_SAFE_LOCK_FILES 406 #endif 407 408 /***** End of configuration *************************************************/ 409 410 411 412 /***** ^AMSGID/Message-ID configuration *************************************/ 413 414 /* 415 * Standard FIDONET domain for Z1-6 Message-IDs 416 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 417 * !!! DON'T TOUCH THIS, IF YOU'RE NOT ABSOLUTELY SURE WHAT YOU'RE DOING !!! 418 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 419 */ 420 #define MSGID_FIDONET_DOMAIN ".fidonet.org" 421 422 423 424 /**************************************************************************** 425 * * 426 * Think twice before changing anything below!!! * 427 * * 428 ****************************************************************************/ 429 430 /* 431 * Permissions 432 */ 433 #define PACKET_MODE 0600 /* Mode for outbound packets */ 434 #define BSY_MODE 0644 /* Mode for BSY files */ 435 #define FLO_MODE 0644 /* Mode for FLO files */ 436 #define DATA_MODE 0600 /* Mode for ffx data files */ 437 #define DIR_MODE 0755 /* Mode for directories */ 438 #define CONF_MODE 0644 /* Mode for written config files */ 439 440 /* 441 * RFC headers recognized at beginning of FTN message body 442 */ 443 #define FTN_RFC_HEADERS \ 444 "From:", "Reply-To:", "UUCPFROM:", "To:", "Cc:", "Bcc:", \ 445 "Newsgroups:", "Sender:", "Content-Transfer-Encoding:", \ 446 "Header-To:", "Header-Cc:" 447 448 /* 449 * RFC headers output for ^ARFC level 1 (partial RFC headers) 450 */ 451 #define RFC_LVL_1_HEADERS \ 452 "From", "Reply-To", "To", "Cc", "Newsgroups", "Date", \ 453 "Sender", "Resent-From", "Return-Path", \ 454 "Next-Attachment" 455 456 /* 457 * Open modes for fopen(), binary for system requiring this. 458 */ 459 #ifdef DO_BINARY 460 # define R_MODE "rb" 461 # define W_MODE "wb" 462 # define A_MODE "ab" 463 # define RP_MODE "r+b" 464 # define WP_MODE "w+b" 465 # define AP_MODE "a+b" 466 #else 467 # define R_MODE "r" 468 # define W_MODE "w" 469 # define A_MODE "a" 470 # define RP_MODE "r+" 471 # define WP_MODE "w+" 472 # define AP_MODE "a+" 473 #endif /**DO_BINARY**/ 474 #define R_MODE_T "r" 475 #define W_MODE_T "w" 476 #define A_MODE_T "a" 477 #define RP_MODE_T "r+" 478 #define WP_MODE_T "w+" 479 #define AP_MODE_T "a+" 480 481 /* 482 * Format strings for dates 483 */ 484 #define DATE_LOG "%b %d %H:%M:%S" 485 486 #define DATE_DEFAULT "%a, %d %b %Y %H:%M:%S %O" 487 #define DATE_NEWS "%a, %d %b %Y %H:%M:%S %O" 488 #define DATE_MAIL "%a, %d %b %Y %H:%M:%S %O (%Z)" 489 #define DATE_FROM "%a %b %d %H:%M:%S %Y" 490 491 #define DATE_FTS_0001 "%d %b %y %H:%M:%S" 492 #define DATE_TICK_PATH "%a %b %d %H:%M:%S %Y %Z" 493 #define DATE_VIA "%a %b %d %Y at %H:%M:%S %Z" 494 #define DATE_SPLIT "%d %b %y %H:%M:%S" 495 496 /* 497 * Product code for packets generated by FIDOGATE, 0xfe is used because 498 * this code is reserved for new products, when the code numbers ran out. 499 */ 500 #define PRODUCT_CODE 0xfe 501 502 /* 503 * Hard limits compiled into FIDOGATE 504 */ 505 #define MAXADDRESS 32 /* Max. # of FTN address in CONFIG */ 506 507 #define MAXDOSDRIVE 16 /* Max. # of DOS drives in CONFIG */ 508 509 #ifndef MAXPATH /* Already defined by DJGPP */ 510 # define MAXPATH 128 /* Max. size of path names */ 511 #endif 512 513 #define MAXINETADDR 128 /* Max. size of an Internet address */ 514 515 #define MAXUSERNAME 128 /* Max. size of an user name */ 516 517 #define MAXOPENFILES 10 /* Max. # of open packet files used 518 * by ftntoss/ftnroute, this value 519 * should work on all supported 520 * systems, it can be incremented with 521 * ftntoss/ftnroute's -M option */ 522