Observe the 'preferred sender email' and 'preferred sender name' preferences when...
[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-2013 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  * This program is distributed in the hope that it will be useful,
29  * but WITHOUT ANY WARRANTY; without even the implied warranty of
30  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
31  * GNU General Public License for more details.
32  *
33  */
34
35 const char *smtp_get_Recipients(void);
36
37 typedef struct _citsmtp {               /* Information about the current session */
38         int command_state;
39         StrBuf *Cmd;
40         StrBuf *helo_node;
41         StrBuf *from;
42         StrBuf *recipients;
43         StrBuf *OneRcpt;
44         int number_of_recipients;
45         int delivery_mode;
46         int message_originated_locally;
47         int is_lmtp;
48         int is_unfiltered;
49         int is_msa;
50         StrBuf *preferred_sender_email;
51         StrBuf *preferred_sender_name;
52 } citsmtp;
53
54 #define SMTP            ((citsmtp *)CC->session_specific_data)
55
56 void smtp_do_bounce(char *instr, StrBuf *OMsgTxt);