Defines SMFSession_T datatype and related functions. More...
#include "smf_envelope.h"
Go to the source code of this file.
Data Structures | |
struct | SMFSession_T |
Holds spmfilter session data. More... | |
Functions | |
SMFSession_T * | smf_session_new (void) |
Create a new SMFSession_T object. | |
void | smf_session_free (SMFSession_T *session) |
Free a SMFSession_T object. | |
void | smf_session_set_helo (SMFSession_T *session, char *helo) |
Set helo for session. | |
char * | smf_session_get_helo (SMFSession_T *session) |
Get session helo. | |
void | smf_session_set_xforward_addr (SMFSession_T *session, char *xfwd) |
Set xforward addr. | |
char * | smf_session_get_xforward_addr (SMFSession_T *session) |
Get xforward address. | |
void | smf_session_set_response_msg (SMFSession_T *session, char *rmsg) |
Set response message. | |
char * | smf_session_get_response_msg (SMFSession_T *session) |
Get response message. | |
SMFEnvelope_T * | smf_session_get_envelope (SMFSession_T *session) |
Retrieve the SMFEnvelope_T object from the current session. | |
void | smf_session_set_message_file (SMFSession_T *session, char *fp) |
Set path for message file. | |
char * | smf_session_get_message_file (SMFSession_T *session) |
Get message file. | |
char * | smf_session_get_id (SMFSession_T *session) |
Get session id. | |
Defines SMFSession_T datatype and related functions.
Each message is processed in a new session, with unique session id. The session data itself is stored in a SMFSession_T object, whereas the email content is stored on disk instead, but connection informations and message headers are hold in memory. If you need to modify an email in the current session, you have to use the session functions.
If a header of a session object has been modified, the session will be marked as "dirty" - that means the header will be flushed to disk before the final delivery is initialized, to keep the message in sync with the modified data.
void smf_session_free | ( | SMFSession_T * | session | ) |
Free a SMFSession_T object.
session | a SMFSession_T object |
SMFEnvelope_T* smf_session_get_envelope | ( | SMFSession_T * | session | ) |
Retrieve the SMFEnvelope_T object from the current session.
session | a SMFSession_T object |
char* smf_session_get_helo | ( | SMFSession_T * | session | ) |
char* smf_session_get_id | ( | SMFSession_T * | session | ) |
char* smf_session_get_message_file | ( | SMFSession_T * | session | ) |
char* smf_session_get_response_msg | ( | SMFSession_T * | session | ) |
char* smf_session_get_xforward_addr | ( | SMFSession_T * | session | ) |
SMFSession_T* smf_session_new | ( | void | ) |
Create a new SMFSession_T object.
void smf_session_set_helo | ( | SMFSession_T * | session, |
char * | helo | ||
) |
Set helo for session.
session | SMFSession_T object |
helo | helo message |
void smf_session_set_message_file | ( | SMFSession_T * | session, |
char * | fp | ||
) |
Set path for message file.
session | SMFSession_T object |
fp | message file path |
void smf_session_set_response_msg | ( | SMFSession_T * | session, |
char * | rmsg | ||
) |
Set response message.
session | SMFSession_T object |
rmsg | response message |
void smf_session_set_xforward_addr | ( | SMFSession_T * | session, |
char * | xfwd | ||
) |
Set xforward addr.
session | SMFSession_T object |
xfwd | xforward address |