1 /*	$NetBSD: login_sender_match.h,v 1.2 2022/10/08 16:12:45 christos Exp $	*/
2 
3 #ifndef _LOGIN_SENDER_MATCH_H_INCLUDED_
4 #define _LOGIN_SENDER_MATCH_H_INCLUDED_
5 
6 /*++
7 /* NAME
8 /*	login_sender_match 3h
9 /* SUMMARY
10 /*	oracle for per-login allowed sender addresses
11 /* SYNOPSIS
12 /*	#include <login_sender_match.h>
13 /* DESCRIPTION
14 /* .nf
15 
16  /*
17   * Utility library.
18   */
19 #include <dict.h>
20 
21  /*
22   * External interface.
23   */
24 typedef struct LOGIN_SENDER_MATCH LOGIN_SENDER_MATCH;
25 
26 extern LOGIN_SENDER_MATCH *login_sender_create(const char *title,
27 					               const char *map_names,
28 					         const char *ext_delimiters,
29 					            const char *null_sender,
30 					               const char *wildcard);
31 extern void login_sender_free(LOGIN_SENDER_MATCH *lsm);
32 extern int login_sender_match(LOGIN_SENDER_MATCH *lsm, const char *login_name,
33 			              const char *sender_addr);
34 
35 #define LSM_STAT_FOUND		(1)
36 #define LSM_STAT_NOTFOUND	(0)
37 #define LSM_STAT_RETRY		(DICT_ERR_RETRY)
38 #define LSM_STAT_CONFIG		(DICT_ERR_CONFIG)
39 
40 /* LICENSE
41 /* .ad
42 /* .fi
43 /*	The Secure Mailer license must be distributed with this software.
44 /* AUTHOR(S)
45 /*	Wietse Venema
46 /*	Google, Inc.
47 /*	111 8th Avenue
48 /*	New York, NY 10011, USA
49 /*--*/
50 
51 #endif					/* _LOGIN_SENDER_MATCH_H_INCLUDED_ */
52