2 * smtp.h -- prototypes for smtp handling code
4 * For license terms, see the file COPYING in this directory.
12 #define SMTPBUFSIZE 256
14 /* SMTP error values */
17 #define SM_UNRECOVERABLE 129
19 /* ESMTP extension option masks (not all options are listed here) */
20 #define ESMTP_8BITMIME 0x01
21 #define ESMTP_SIZE 0x02
22 #define ESMTP_ETRN 0x04
23 #define ESMTP_ATRN 0x08 /* used with ODMR, RFC 2645 */
24 #define ESMTP_AUTH 0x10
26 /* SMTP timeouts (seconds) - SHOULD clauses from RFC-5321 sec. 4.5.3.2. */
27 #define TIMEOUT_STARTSMTP 300
28 #define TIMEOUT_HELO 300 /* not in RFC-5321, also for EHLO/LHLO */
29 #define TIMEOUT_MAIL 300
30 #define TIMEOUT_RCPT 300
31 #define TIMEOUT_DATA 120
32 #define TIMEOUT_DATALINE 180
33 #define TIMEOUT_EOM 600
34 #define TIMEOUT_DEFAULT 300 /* not in RFC-5321, all other client timeouts */
36 extern time_t last_smtp_ok;
38 int SMTP_helo(int socket, char smtp_mode, const char *host);
39 int SMTP_ehlo(int socket, char smtp_mode, const char *host, char *name, char *passwd, int *opt);
40 int SMTP_from(int socket, char smtp_mode, const char *from,const char *opts);
41 int SMTP_rcpt(int socket, char smtp_mode, const char *to);
42 int SMTP_data(int socket, char smtp_mode);
43 int SMTP_eom(int socket, char smtp_mode);
44 int SMTP_rset(int socket, char smtp_mode);
45 int SMTP_quit(int socket, char smtp_mode);
46 int SMTP_ok(int socket, char smtp_mode, int mintimeout);
48 extern char smtp_response[MSGBUFSIZE];