Expand PMF_FN_* macros.
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / global / mail_addr.c
blobce8e6db0977a7c905ebc0f8c99a9ca6c07b52661
1 /* $NetBSD$ */
3 /*++
4 /* NAME
5 /* mail_addr 3
6 /* SUMMARY
7 /* pre-defined mail addresses
8 /* SYNOPSIS
9 /* #include <mail_addr.h>
11 /* const char *mail_addr_double_bounce()
13 /* const char *mail_addr_postmaster()
15 /* const char *mail_addr_mail_daemon()
16 /* DESCRIPTION
17 /* This module predefines the following addresses:
18 /* .IP MAIL_ADDR_POSTMASTER
19 /* The postmaster handle. Typically used for sending mail to.
20 /* .IP MAIL_ADDR_MAIL_DAEMON
21 /* The mailer-daemon handle. Typically used to bring bad news.
22 /* .IP MAIL_ADDR_EMPTY
23 /* The empty mail address. This refers to the postmaster on the
24 /* local machine.
25 /* .PP
26 /* mail_addr_double_bounce() produces the fully-qualified version
27 /* of the local double bounce address.
29 /* mail_addr_postmaster() produces the fully-qualified version
30 /* of the local postmaster address.
32 /* mail_addr_mail_daemon() produces the fully-qualified version
33 /* of the local mailer-daemon address.
34 /* CONFIGURATION PARAMETERS
35 /* double_bounce_sender, the double bounce pseudo account.
36 /* myhostname, the local machine hostname.
37 /* BUGS
38 /* Addresses are constructed by string concatenation, instead of
39 /* passing them to the rewriting service.
40 /* LICENSE
41 /* .ad
42 /* .fi
43 /* The Secure Mailer license must be distributed with this software.
44 /* AUTHOR(S)
45 /* Wietse Venema
46 /* IBM T.J. Watson Research
47 /* P.O. Box 704
48 /* Yorktown Heights, NY 10598, USA
49 /*--*/
51 /* System library. */
53 #include <sys_defs.h>
55 /* Utility library. */
57 #include <stringops.h>
59 /* Global library. */
61 #include "mail_params.h"
62 #include "mail_addr.h"
64 /* mail_addr_double_bounce - construct the local double-bounce address */
66 const char *mail_addr_double_bounce(void)
68 static char *addr;
70 if (addr == 0)
71 addr = concatenate(var_double_bounce_sender, "@",
72 var_myhostname, (char *) 0);
73 return (addr);
76 /* mail_addr_postmaster - construct the local postmaster address */
78 const char *mail_addr_postmaster(void)
80 static char *addr;
82 if (addr == 0)
83 addr = concatenate(MAIL_ADDR_POSTMASTER, "@",
84 var_myhostname, (char *) 0);
85 return (addr);
88 /* mail_addr_mail_daemon - construct the local mailer-daemon address */
90 const char *mail_addr_mail_daemon(void)
92 static char *addr;
94 if (addr == 0)
95 addr = concatenate(MAIL_ADDR_MAIL_DAEMON, "@",
96 var_myhostname, (char *) 0);
97 return (addr);