commit - f0f9389e66f9685fa2965736d8e266fa98120659
commit + 0fb4c799d83c496ce928115aecd3ff531e49ece9
blob - acc026b2c8062c0edb9a7bf98b3f4df11c76d6e0
blob + 76a4910a41b9100a23778cc039aacc53ba756e44
--- opensmtpd.c
+++ opensmtpd.c
OSMTPD_NEED_FCRDNS))
osmtpd_register(OSMTPD_TYPE_REPORT, OSMTPD_PHASE_LINK_CONNECT,
incoming, 1, NULL);
- if (needs & OSMTPD_NEED_SIDENTITY)
+ if (needs & OSMTPD_NEED_GREETING)
osmtpd_register(OSMTPD_TYPE_REPORT, OSMTPD_PHASE_LINK_GREETING,
incoming, 1, NULL);
- if (needs & OSMTPD_NEED_CIDENTITY)
+ if (needs & OSMTPD_NEED_IDENTITY)
osmtpd_register(OSMTPD_TYPE_REPORT, OSMTPD_PHASE_LINK_IDENTIFY,
incoming, 1, NULL);
if (needs & OSMTPD_NEED_CIPHERS)
ctx->ctx.reqid = search.ctx.reqid;
ctx->ctx.rdns = NULL;
ctx->ctx.fcrdns = OSMTPD_STATUS_TEMPFAIL;
- ctx->ctx.sidentity = NULL;
- ctx->ctx.cidentity = NULL;
+ ctx->ctx.identity = NULL;
+ ctx->ctx.greeting.identity = NULL;
ctx->ctx.ciphers = NULL;
ctx->ctx.msgid = 0;
ctx->ctx.mailfrom = NULL;
if (ondeletecb_session != NULL)
ondeletecb_session(ctx, session->ctx.local_session);
free(session->ctx.rdns);
- free(session->ctx.sidentity);
- free(session->ctx.cidentity);
+ free(session->ctx.identity);
+ free(session->ctx.greeting.identity);
free(session->ctx.ciphers);
free(session->ctx.mailfrom);
for (i = 0; session->ctx.rcptto[i] != NULL; i++)
void (*f)(struct osmtpd_ctx *, const char *);
if (cb->storereport) {
- if ((ctx->sidentity = strdup(identity)) == NULL)
+ if ((ctx->greeting.identity = strdup(identity)) == NULL)
osmtpd_err(1, NULL);
}
void (*f)(struct osmtpd_ctx *, const char *);
if (cb->storereport) {
- if ((ctx->sidentity = strdup(identity)) == NULL)
+ if ((ctx->identity = strdup(identity)) == NULL)
osmtpd_err(1, NULL);
}
blob - 8b5b5cd17cd7233bd2390346c5d89cc5bdc6e777
blob + 9a58a8d8764b383d3e902c5ee51f806f44b3552b
--- opensmtpd.h
+++ opensmtpd.h
#define OSMTPD_NEED_DST 1 << 1
#define OSMTPD_NEED_RDNS 1 << 2
#define OSMTPD_NEED_FCRDNS 1 << 3
-#define OSMTPD_NEED_SIDENTITY 1 << 4
-#define OSMTPD_NEED_CIDENTITY 1 << 5
+#define OSMTPD_NEED_IDENTITY 1 << 4
+#define OSMTPD_NEED_GREETING 1 << 5
#define OSMTPD_NEED_CIPHERS 1 << 6
#define OSMTPD_NEED_MSGID 1 << 7
#define OSMTPD_NEED_MAILFROM 1 << 8
struct sockaddr_storage dst;
char *rdns;
enum osmtpd_status fcrdns;
- char *sidentity;
- char *cidentity;
+ /* HELO/EHLO identity */
+ char *identity;
+ struct greeting {
+ char *identity;
+ /* textstring not supplied by smtpd */
+ } greeting;
char *ciphers;
uint32_t msgid;
char *mailfrom;