3 messages in net.sourceforge.lists.courier-sqwebmail[sqwebmail] SQWEBMAIL_MAX(MSG|ARG|ATT...
FromSent OnAttachments
Pawel TeczaApr 27, 2006 10:07 am 
Sam VarshavchikApr 27, 2006 3:33 pm 
Pawel TeczaApr 28, 2006 2:03 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[sqwebmail] SQWEBMAIL_MAX(MSG|ARG|ATT)SIZE env variablesActions...
From:Pawel Tecza (p.te@net.icm.edu.pl)
Date:Apr 27, 2006 10:07:36 am
List:net.sourceforge.lists.courier-sqwebmail

Hello Sam! :)

Don't panic! It's my last post at this mailing list today. I promise :)

Could you please tell me, why SQWEBMAIL_MAXMSGSIZE env variable is overwritten by MAXMSGSIZE if it has lesser value (max_attach() function in webmail/attachments.c file)? The same situation is for SQWEBMAIL_MAXARGSIZE and SQWEBMAIL_MAXATTSIZE (cgi_maxarg() and cgi_maxformarg() functions in cgi/cgi.c file). In my opinion SQWEBMAIL_MAX(MSG|ARG|ATT)SIZE env variables shouldn't be overwritten if they are not null. So I propose the changes like below:

static off_t max_attach() { //off_t n=0; off_t n=MAXMSGSIZE; const char *p=getenv("SQWEBMAIL_MAXMSGSIZE");

if (p) n=atol(p);

//if (n < MAXMSGSIZE) // n=MAXMSGSIZE; return n; }

What do you think about it? I'll send you a patch if you want.

Regards,