1da497de0b3c4f41eb69b1cc0ace38a9d92c7a98
[citadel.git] / citadel / modules / smtp / smtp_util.h
1 /*
2  * This module is an SMTP and ESMTP implementation for the Citadel system.
3  * It is compliant with all of the following:
4  *
5  * RFC  821 - Simple Mail Transfer Protocol
6  * RFC  876 - Survey of SMTP Implementations
7  * RFC 1047 - Duplicate messages and SMTP
8  * RFC 1652 - 8 bit MIME
9  * RFC 1869 - Extended Simple Mail Transfer Protocol
10  * RFC 1870 - SMTP Service Extension for Message Size Declaration
11  * RFC 2033 - Local Mail Transfer Protocol
12  * RFC 2197 - SMTP Service Extension for Command Pipelining
13  * RFC 2476 - Message Submission
14  * RFC 2487 - SMTP Service Extension for Secure SMTP over TLS
15  * RFC 2554 - SMTP Service Extension for Authentication
16  * RFC 2821 - Simple Mail Transfer Protocol
17  * RFC 2822 - Internet Message Format
18  * RFC 2920 - SMTP Service Extension for Command Pipelining
19  *  
20  * The VRFY and EXPN commands have been removed from this implementation
21  * because nobody uses these commands anymore, except for spammers.
22  *
23  * Copyright (c) 1998-2012 by the citadel.org team
24  *
25  *  This program is open source software; you can redistribute it and/or modify
26  *  it under the terms of the GNU General Public License version 3.
27  *  
28  *  
29  *
30  *  This program is distributed in the hope that it will be useful,
31  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
32  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
33  *  GNU General Public License for more details.
34  *
35  *  
36  *  
37  *  
38  */
39
40 const char *smtp_get_Recipients(void);
41
42 typedef struct _citsmtp {               /* Information about the current session */
43         int command_state;
44         StrBuf *Cmd;
45         StrBuf *helo_node;
46         StrBuf *from;
47         StrBuf *recipients;
48         StrBuf *OneRcpt;
49         int number_of_recipients;
50         int delivery_mode;
51         int message_originated_locally;
52         int is_lmtp;
53         int is_unfiltered;
54         int is_msa;
55 }citsmtp;
56
57 #define SMTP            ((citsmtp *)CC->session_specific_data)
58
59 void smtp_do_bounce(char *instr, StrBuf *OMsgTxt);