]> code.citadel.org Git - citadel.git/blob - citadel/server/modules/smtp/smtp_util.h
Remove preprocessor tests for OpenSSL. It's a requirement.
[citadel.git] / citadel / server / modules / smtp / smtp_util.h
1 // Copyright (c) 1998-2024 by the citadel.org team
2 // This program is open source software.  Use, duplication, or disclosure is subject to the GNU General Public License v3.
3
4 struct citsmtp {                // Information about the current session
5         int command_state;
6         StrBuf *Cmd;
7         StrBuf *helo_node;
8         StrBuf *from;
9         StrBuf *recipients;
10         StrBuf *OneRcpt;
11         int number_of_recipients;
12         int delivery_mode;
13         int message_originated_locally;
14         int is_lmtp;
15         int is_unfiltered;
16         int is_msa;
17         StrBuf *preferred_sender_email;
18         StrBuf *preferred_sender_name;
19 };
20
21 #define SMTP            ((struct citsmtp *)CC->session_specific_data)
22
23 // These are all the values that can be passed to the is_final parameter of smtp_do_bounce()
24 enum {
25         SDB_BOUNCE_FATALS,
26         SDB_BOUNCE_ALL,
27         SDB_WARN
28 };
29
30 void smtp_do_bounce(const char *instr, int is_final);
31 char *smtpstatus(int code);
32 void dkim_sign(StrBuf *email, char *pkey_in, char *domain, char *selector);
33 void dkim_init(void);
34 void dkim_check_advisory(char *inetcfg_in);
35 EVP_PKEY *dkim_import_key(char *pkey_in);
36 char *dkim_get_public_key(EVP_PKEY *pkey);