Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

envrcpt milter strange behaviour

4 views
Skip to first unread message

RJ45

unread,
Jul 1, 2005, 12:08:07 PM7/1/05
to
Hello,
I did a milter program to REJECT spam upon receiving it.
I have a user database and I compare this database with
rcpt field.

the problem is with multile rcpt instances
when I have a message sent to more than one user
that is when I have more than one recipient sometimes
the milter library gets all the rcpt addresses
and sometimes it does not.
I did many many tries and I See that what happen is that
sometimes only the LAST rcpt address is loaded.
if I have for example

To: <us...@mydomain.com>, <us...@mydomain.com>, <us...@mydomain.com>

what happens is that sometimes all the 3 addresses are seen by my
milter program and somtimes only the last one <us...@mydomain.com>
is seen

this is the piece of code.
I used the syslog function to log in a file what is happening and
I CAN'T understand why this is happening.

here is the piece of code:

static sfsistat rjfi_envrcpt(SMFICTX *ctx, char **args) {
struct myctx *myctx = (struct myctx *)smfi_getpriv(ctx);

strncat(myctx->rcpt,*args,sizeof(myctx->rcpt)-1);
syslog(LOG_INFO,"RCPT: %s", myctx->rcpt);

return SMFIS_CONTINUE;
}

as I Said not all the recipinets are loaded... sometimes happens that
only one recipient is read and the others aren;t even if
they do exists in the mail header.

what I Can do to fix this problem ?

thanks

Rick

0 new messages