Qsmtp
0.30dev
|
SMTP client code to parse server replies. More...
#include <qremote/client.h>
#include <netio.h>
#include <qdns.h>
#include <qremote/qremote.h>
#include <qremote/statuscodes.h>
#include <arpa/inet.h>
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
Functions | |
void | getrhost (const struct ips *m, const unsigned short idx) |
print remote host information to buffer More... | |
int | checkreply (const char *status, const char **pre, const int mask) |
SMTP client code to parse server replies.
int checkreply | ( | const char * | status, |
const char ** | pre, | ||
const int | mask | ||
) |
check the reply of the server
status | status codes to print or NULL if not to |
pre | text to write to stdout before server reply if mask matches |
mask | bitmask for pre: 1: 2xx, 2: 4xx, 4: 5xx |
status must be at least 3 bytes long but only the first 3 will have any effect. The first one is the status code writen on success (server response is 2xx), the second on on temporary error (4xx) and the third on permanent error (5xx). If no status code should be written status must be set to NULL. If the first character in status is ' ' no message will be printed for success messages.
void getrhost | ( | const struct ips * | m, |
const unsigned short | idx | ||
) |
print remote host information to buffer
m | the currently active MX entry |
s | index of the currently active IP address |