[tpop3d-discuss] setting up POP before relay
klebermass@limtec.de
klebermass at limtec.de
Thu, 10 Jan 2002 08:12:20 +0100
Im on the way to hack some code into the auth_mysql modul to get an Query
that updates my Database with the IP of the Customer, ( and the actual time)
so that i can test with exim if there is an entry in the db with the same
ip and a time, which is less than x minutes.
Till now im using an older tpop3d where i put ah hack inside to test if the
sender emailadress has fetched mails the last 10 minutes, but this is far to
strickt ( eg if someone has one popbox and 3 forwards he can only send mails
with the popbox but not with the forwards)
But because im not the best in C, this can take some more time.
Perhaps u can tell me the error in my code
( in function auth_mysql_new_user_pass(...) ) :
after :
pw = getpwuid(uid);
if (!pw) {
print_log(LOG_ERR, "auth_mysql_new_user_pass:
getpwuid(%d):
%m", (int)uid);
break;
}
i put the following code :
( i know its not the best coding stile tu use if (1) but c alows only to
define vars at the beginning, not in the middle and i want to keep my test
code together)
// CM Update
if(1){
char *spquery;
const char smtpapop_query_template[] = "UPDATE popbox set
time=now(),clienthost='%s' where uid=%s";
spquery = (char*)malloc(sizeof(smtpapop_query_template) +
lengths[4] + sizeof(host));
sprintf(spquery,smtpapop_query_template,host,row[4]);
mysql_query(mysql,spquery);
free(spquery);
}
//CM Update ende
it alwas termintates the process during the first pop3 - fetch - call.
Anyone good ideas how i can solve this?
----- Original Message -----
From: "Ryan LeBlanc" <hosting@analoghosting.com>
To: <tpop3d-discuss@lists.beasts.org>
Sent: Thursday, January 10, 2002 5:32 AM
Subject: [tpop3d-discuss] setting up POP before relay
> Hi,
>
> I am wondering if any of you could help me with setting up POP before SMTP
> relay. I have tpop3d working with Exim, and mysql, using vmail-sql.
>
> I just don't really know where to begin. So, any nudges in the right
> direction would be appreciated.
>
> Thanks!
>
> Ryan LeBlanc
> hosting@analoghosting.com
>
>
>
> _______________________________________________
> tpop3d-discuss mailing list
> tpop3d-discuss@lists.beasts.org
> http://lists.beasts.org/mailman/listinfo/tpop3d-discuss
>