Re: cannot attach files in sogo webmail with non ascii symbols in filename

2023-02-02 Thread Maksim Rodin
Hi,
OK!

On Thu Feb  2 10:35:16 2023, Sebastian Reitenbach wrote:
> Hey,
> 
> I was looking on how to get that passed on via "defaults", but no way, then 
> had some "ugly"
> way using rc_pre in the rc script. @landry thanks for pointing to the 
> login.conf and Maksim
> for bringing up the issue, and providing what works for you.
> 
> Attached patch should do the trick.
> 
> OK?
> 
> Sebastian
> 
> On Wednesday, February 01, 2023 12:21 CET, Maksim Rodin 
>  wrote:
> 
> > Hello,
> > > the best place is /etc/login.conf.d/sogo which comes from
> > > www/sogo/pkg/sogod.login in the ports tree.
> > Thanks for your advice! That worked for me:
> > # cat /etc/login.conf.d/sogod
> > sogod:\
> > :openfiles-cur=1024:\
> > :openfiles-max=2048:\
> > :setenv=GNUSTEP_STRING_ENCODING=NSUTF8StringEncoding:\
> > :tc=daemon:
> > 
> > I still think it might be worth mentioning this problem
> > and possible solution at least in the pkg-readme
> > 
> > On Wed Feb  1 10:31:56 2023, Landry Breuil wrote:
> > > Le Tue, Jan 31, 2023 at 09:45:24PM +0300, Maksim Rodin a écrit :
> > > > Hello,
> > > > I noticed that I cannot attach files with non ascii symbols in filename 
> > > > using sogo webmail.
> > > > There is an entry in /var/log/sogo/sogo.log:
> > > > sogod[82818:12065535212040] EXCEPTION:  
> > > > NAME:NSCharacterConversionException REASON:Can't get cString from 
> > > > Unicode string. INFO:(null)
> > > > 
> > > > After some googling I found out that sogo uses GNUstep as a dependency
> > > > and it requires the following envvar to be set for _sogo user:
> > > > $ export GNUSTEP_STRING_ENCODING=NSUTF8StringEncoding
> > > > When I launch sogo the following way:
> > > > su - _sogo -c 'GNUSTEP_STRING_ENCODING=NSUTF8StringEncoding sogod'
> > > > it works and there are no problems with adding attachments.
> > > 
> > > well that's a good find.
> > > 
> > > > The question is: what is the best way to set this envvar for sogod
> > > > daemon so that I can control the sogod service using usual rcctl 
> > > > commands?
> > > > May be it would not harm to hardcode this setting in the package?
> > > 
> > > the best place is /etc/login.conf.d/sogo which comes from
> > > www/sogo/pkg/sogod.login in the ports tree.
> > > 
> > > cc'ing sebastia as maintainer.
> > > 
> > 
> > -- 
> > Maksim Rodin
> >



-- 
С уважением,
Родин Максим



Re: cannot attach files in sogo webmail with non ascii symbols in filename

2023-02-02 Thread Landry Breuil
Le Thu, Feb 02, 2023 at 10:35:16AM +0100, Sebastian Reitenbach a écrit :
> Hey,
> 
> I was looking on how to get that passed on via "defaults", but no way, then 
> had some "ugly"
> way using rc_pre in the rc script. @landry thanks for pointing to the 
> login.conf and Maksim
> for bringing up the issue, and providing what works for you.
> 
> Attached patch should do the trick.

I had tried to repro the issue first but i was able to upload a file
named 'noé.html' as an attachement to a draft without errors, but havent
send the mail. maybe it wasnt non-ascii enough though :)

ok for the patch !



Re: cannot attach files in sogo webmail with non ascii symbols in filename

2023-02-02 Thread Sebastian Reitenbach
Hey,

I was looking on how to get that passed on via "defaults", but no way, then had 
some "ugly"
way using rc_pre in the rc script. @landry thanks for pointing to the 
login.conf and Maksim
for bringing up the issue, and providing what works for you.

Attached patch should do the trick.

OK?

Sebastian

On Wednesday, February 01, 2023 12:21 CET, Maksim Rodin  
wrote:

> Hello,
> > the best place is /etc/login.conf.d/sogo which comes from
> > www/sogo/pkg/sogod.login in the ports tree.
> Thanks for your advice! That worked for me:
> # cat /etc/login.conf.d/sogod
> sogod:\
>   :openfiles-cur=1024:\
>   :openfiles-max=2048:\
>   :setenv=GNUSTEP_STRING_ENCODING=NSUTF8StringEncoding:\
>   :tc=daemon:
> 
> I still think it might be worth mentioning this problem
> and possible solution at least in the pkg-readme
> 
> On Wed Feb  1 10:31:56 2023, Landry Breuil wrote:
> > Le Tue, Jan 31, 2023 at 09:45:24PM +0300, Maksim Rodin a écrit :
> > > Hello,
> > > I noticed that I cannot attach files with non ascii symbols in filename 
> > > using sogo webmail.
> > > There is an entry in /var/log/sogo/sogo.log:
> > > sogod[82818:12065535212040] EXCEPTION:  
> > > NAME:NSCharacterConversionException REASON:Can't get cString from Unicode 
> > > string. INFO:(null)
> > > 
> > > After some googling I found out that sogo uses GNUstep as a dependency
> > > and it requires the following envvar to be set for _sogo user:
> > > $ export GNUSTEP_STRING_ENCODING=NSUTF8StringEncoding
> > > When I launch sogo the following way:
> > > su - _sogo -c 'GNUSTEP_STRING_ENCODING=NSUTF8StringEncoding sogod'
> > > it works and there are no problems with adding attachments.
> > 
> > well that's a good find.
> > 
> > > The question is: what is the best way to set this envvar for sogod
> > > daemon so that I can control the sogod service using usual rcctl commands?
> > > May be it would not harm to hardcode this setting in the package?
> > 
> > the best place is /etc/login.conf.d/sogo which comes from
> > www/sogo/pkg/sogod.login in the ports tree.
> > 
> > cc'ing sebastia as maintainer.
> > 
> 
> -- 
> Maksim Rodin
>


sogo.diff
Description: Binary data


Re: cannot attach files in sogo webmail with non ascii symbols in filename

2023-02-01 Thread Maksim Rodin
Hello,
> the best place is /etc/login.conf.d/sogo which comes from
> www/sogo/pkg/sogod.login in the ports tree.
Thanks for your advice! That worked for me:
# cat /etc/login.conf.d/sogod
sogod:\
:openfiles-cur=1024:\
:openfiles-max=2048:\
:setenv=GNUSTEP_STRING_ENCODING=NSUTF8StringEncoding:\
:tc=daemon:

I still think it might be worth mentioning this problem
and possible solution at least in the pkg-readme

On Wed Feb  1 10:31:56 2023, Landry Breuil wrote:
> Le Tue, Jan 31, 2023 at 09:45:24PM +0300, Maksim Rodin a écrit :
> > Hello,
> > I noticed that I cannot attach files with non ascii symbols in filename 
> > using sogo webmail.
> > There is an entry in /var/log/sogo/sogo.log:
> > sogod[82818:12065535212040] EXCEPTION:  
> > NAME:NSCharacterConversionException REASON:Can't get cString from Unicode 
> > string. INFO:(null)
> > 
> > After some googling I found out that sogo uses GNUstep as a dependency
> > and it requires the following envvar to be set for _sogo user:
> > $ export GNUSTEP_STRING_ENCODING=NSUTF8StringEncoding
> > When I launch sogo the following way:
> > su - _sogo -c 'GNUSTEP_STRING_ENCODING=NSUTF8StringEncoding sogod'
> > it works and there are no problems with adding attachments.
> 
> well that's a good find.
> 
> > The question is: what is the best way to set this envvar for sogod
> > daemon so that I can control the sogod service using usual rcctl commands?
> > May be it would not harm to hardcode this setting in the package?
> 
> the best place is /etc/login.conf.d/sogo which comes from
> www/sogo/pkg/sogod.login in the ports tree.
> 
> cc'ing sebastia as maintainer.
> 

-- 
Maksim Rodin



Re: cannot attach files in sogo webmail with non ascii symbols in filename

2023-02-01 Thread Landry Breuil
Le Tue, Jan 31, 2023 at 09:45:24PM +0300, Maksim Rodin a écrit :
> Hello,
> I noticed that I cannot attach files with non ascii symbols in filename using 
> sogo webmail.
> There is an entry in /var/log/sogo/sogo.log:
> sogod[82818:12065535212040] EXCEPTION:  
> NAME:NSCharacterConversionException REASON:Can't get cString from Unicode 
> string. INFO:(null)
> 
> After some googling I found out that sogo uses GNUstep as a dependency
> and it requires the following envvar to be set for _sogo user:
> $ export GNUSTEP_STRING_ENCODING=NSUTF8StringEncoding
> When I launch sogo the following way:
> su - _sogo -c 'GNUSTEP_STRING_ENCODING=NSUTF8StringEncoding sogod'
> it works and there are no problems with adding attachments.

well that's a good find.

> The question is: what is the best way to set this envvar for sogod
> daemon so that I can control the sogod service using usual rcctl commands?
> May be it would not harm to hardcode this setting in the package?

the best place is /etc/login.conf.d/sogo which comes from
www/sogo/pkg/sogod.login in the ports tree.

cc'ing sebastia as maintainer.



cannot attach files in sogo webmail with non ascii symbols in filename

2023-01-31 Thread Maksim Rodin
Hello,
I noticed that I cannot attach files with non ascii symbols in filename using 
sogo webmail.
There is an entry in /var/log/sogo/sogo.log:
sogod[82818:12065535212040] EXCEPTION:  
NAME:NSCharacterConversionException REASON:Can't get cString from Unicode 
string. INFO:(null)

After some googling I found out that sogo uses GNUstep as a dependency
and it requires the following envvar to be set for _sogo user:
$ export GNUSTEP_STRING_ENCODING=NSUTF8StringEncoding
When I launch sogo the following way:
su - _sogo -c 'GNUSTEP_STRING_ENCODING=NSUTF8StringEncoding sogod'
it works and there are no problems with adding attachments.
The question is: what is the best way to set this envvar for sogod
daemon so that I can control the sogod service using usual rcctl commands?
May be it would not harm to hardcode this setting in the package?

-- 
Maksim Rodin