ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Picolisp latest found at http://www.software-lab.de/down.html | check also http://www.picolisp.com for more information
harryTrout has quit [Ping timeout: 245 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
cilz has quit [Ping timeout: 260 seconds]
libertas has quit [Ping timeout: 256 seconds]
libertas has joined #picolisp
cilz has joined #picolisp
<cilz> hello
<Regenaxer> Good morning cilz
<cilz> regenaxer: good morning too
<Regenaxer> :)
rob_w has joined #picolisp
<cess11> Good morning.
<Regenaxer> Good morning cess11
<beneroth> Good morning all
<Regenaxer> Hi beneroth
<beneroth> Has anyone experience with postfix and SRS ?
<tankf33der> nope
<tankf33der> but it simple with google
<tankf33der> no ?
<beneroth> it's tricky. the straight forward solution has the issue that it starts to rewrite all emails, even emails which are not forwarded. apparently a second plugin for postfix exists to take care of that.
<beneroth> seems to be a mess. and I don't see a conceptual problem to solve this correctly, I guess the problems comes from legacy architecture with too simple assumptions...
<beneroth> maybe Exim is better in this? but there someone just found a remote code execution vulnerability which was present since the very first version.
aw- has joined #picolisp
<cess11> I think both are old and likely to have such insecurities.
<cess11> What are you trying to o?
<cess11> *do
<cilz> is there a simple way to compute the number of days between two dates? I have try using expDat though I don't know what to do with the return number
shpx has joined #picolisp
<beneroth> cilz, dates in picolisp are integeres storing a number of days. so just so a subtraction (- date1 date2)
<beneroth> (expDat) is used for user inputs, especially to convert incomplete date strings into a date number
<beneroth> check out $dat and dat$. they convert from ISO-string to picolisp date format (a number of days). see datStr to convert a picolisp date to your local date format. see also (locale)
<beneroth> cess11, I'm running a mailserver used by many non-technical users
<cilz> thanks! stupid me! had the result in front of me and did not realise!! -> (- (expDat "2016-05-25") (expDat "."))
<beneroth> no problem! that is a common experience with picolisp :)
<cess11> beneroth: Quite some time since I last tried to run mailserver but I had more luck with dovecot than either of those, and more luck with postfix than exim.
<cess11> cilz: There are similar functions for time, like tim$, and you might want to use 'stamp too.
<Regenaxer> cilz: There is also a direct way, without a lib function (- (date) (date 2018 3 13))
<Regenaxer> Same, but the fastest solution
<cilz> Regenaxer, works perfectly, thanks
<cess11> 'abs might be useful to clean out -:s.
<cilz> cess11, in fact "-" is useful for a countdown like
<aw-> hi all
<aw-> beneroth: we missed you yesterday... slacking off?
<Regenaxer> Hi aw-
<beneroth> aw-, nah, sick with the flu.
<beneroth> thanks for caring :)
<Regenaxer> Gute Besserung
<Regenaxer> All are currently
<beneroth> Dankeschön
<beneroth> Dankeschoen. schei? encoding.
<beneroth> ;)
<Regenaxer> :)
<aw-> ouch, beneroth take care
<beneroth> I'm getting better, but still quite weak and very sleepy. very annoying.
<beneroth> aw-, you never fiddled with SRS (email, patchwork to get SPF-compatible when forwarding emails)
<beneroth> by chance?
<aw-> nope
<aw-> last i played with email was Qmail back in ~2001
<beneroth> email server implementation appear to be a pretty messy field. can't quite understand why - its a big broad field, but the protocols are not that complicated I think...
<aw-> most protocols from the 80s/90s are quite simple, which leads to bad implementations due to vague interpretations
<beneroth> simple != vague necessarily
<beneroth> well the big FOSS ones are old, a bit messy, and not that clever.
<beneroth> it seems to me.
<beneroth> and the Microsoft Email Server is horrible in following the public standards, works only really well within MS world.
<aw-> i haven't read any email RFCs lately, but I know SMTP was quite simple
<beneroth> the complicating stuff comes from all the additions, e.g. SPF
<aw-> yes
<beneroth> also I'm sitting on a legacy webhosting system. with many websites made 2008, often never updated. so PHP with 2008 style. horrible.
<aw-> couldn't you setup a mail server on another host?
<aw-> with dovecot/postfix
<beneroth> e.g. contact forms sending emails (instead of storing stuff into DB). and not using a configured sender - NO. they just abuse the entered email address as FROM in the email! WTF.
<beneroth> what were this PHP shit-cms authors even thinking? this was wrong even in 2008.
<aw-> haha yeah, i've done stuff like that, also ~2001 in my early PHP days
<aw-> :D
<beneroth> yeah. so now I have cases like the one I found out about this morning: old website, contact forms sends an email with the entered email address as sender, to a mailbox in my infrastructure which the client happened to have redirected.
<cess11> Lovely.
<beneroth> FROM sender + SPF + Forwarding. even just parts of that combination are a receipt for failure.
<beneroth> bbl - away for a while
<aw-> hmmm
<aw-> i don't know anything about SPF,. sorry :\
<beneroth> no problem. I know about it - its simple. Problem is most setups (especially legacy one) have the assumption that SPF does not exist :)
<beneroth> SPF is basically a DNS entry whitelisting one or multiple domain names or IPs to send emails for a domain (as sender domain)
<beneroth> receiving email servers can lookup the SPF entry and check the whitelist with the host from which they got the email.
<beneroth> so forwarding brakes, unless the forwarding server re-writes the sender address (domain) in the email (an this appears not to be that simple to do in postfix, unless you want all emails rewritten, not only the forwarded ones)
<beneroth> bbl
<cess11> They didn't think it through when they designed the email protocols, among other things they didn't count on cheap and simple allowing for insane amounts of spam.
<cess11> Just like crypto commodities.
mtsd has joined #picolisp
aw- has quit [Quit: Leaving.]
<beneroth> back
<beneroth> cess11, right. so the attempt to mitigate this is to put a load of patchwork extensions on top of the vulnerable email protocols - increasing the attack surface, the risk of failures, and the complexity of failures.
<beneroth> solutions is to eventually migrate to another set of protocols (maybe blackmail standard) or to switch to walled gardens like google mail & messengers (this approach is favoured by business and consumers)
mtsd has quit [Quit: Leaving]
<beneroth> [off-topic] anyone using samba? https://wiki.samba.org/index.php/CVE-2018-1057
<beneroth> (logged in users can change password of any user - yes including admin)
alexshendi has quit [Read error: Connection reset by peer]
orivej has joined #picolisp
vikepl has joined #picolisp
vikepl has quit [Remote host closed the connection]
alexshendi has joined #picolisp
clonak671 has joined #picolisp
clonak671 has quit [Remote host closed the connection]
mangoicedtea has joined #picolisp
mangoicedtea has quit [Ping timeout: 245 seconds]
mangoicedtea has joined #picolisp
cilz has quit [Quit: Page closed]
rob_w has quit [Quit: Leaving]
cilz has joined #picolisp
alexshendi has quit [Ping timeout: 246 seconds]
<tankf33der> Regenaxer: here ?
<Regenaxer> Hai
<tankf33der> question about native again
<Regenaxer> good
<tankf33der> i call this funtion
<tankf33der> it works
<tankf33der> no problem.
<cess11> beneroth: Yup, it's plain nightmarish and horrible to work with public mailservers due to this. And as soon as a customer has a weak password one is on all the blacklists due to all the spam they allowed through their account.
<tankf33der> there is code and the way when it crash
<tankf33der> when i call it (crypto_lock_aead (need 32 255) (need 12 255) (cons 1) (need 7 7)) it works
<tankf33der> now i need encrypt empty like list
mangoicedtea has quit [Ping timeout: 265 seconds]
<tankf33der> now i dont know if i should handle epmpty list or library doesnt support empty input.
<beneroth> cess11, yeah that's why I do spamfiltering on both incoming and outgoing mails. Broken customer accounts and malware/vulnerabilities on customer websites happen from time to time.
<Regenaxer> tankf33der, problem is when 'P' is NIL?
<beneroth> though sometimes email receivers put you on a blacklist just for a few legitimate emails. Just because they don't know your server and want to see if someone contacts them then. Happened to me even with some pil apps (sending registration confirmations).
<Regenaxer> length zero
alexshendi has joined #picolisp
<tankf33der> yes, when P is NIL
<tankf33der> (list 'CH (cons PL 'B PL)) evaluated to (CH (0 B . 0))
<Regenaxer> but then you pass 0 in PL, so should be OK
<tankf33der> (cons NIL (cons PL) P) evaluated to (NIL (0))
<Regenaxer> yes
<Regenaxer> *plain_text is not a string pointer?
<tankf33der> const uint8_t *plain_text, size_t text_size
<tankf33der> as i post a pastebin links
<Regenaxer> yes
<Regenaxer> uint8_t *
<Regenaxer> so not a string?
<Regenaxer> ie UTF-8 characters?
<Regenaxer> Because then you could simply pass P
<Regenaxer> But that's perhaps not the problem
<Regenaxer> As the text_size is zero, I would expect that it works
<Regenaxer> Perhaps the function does not just want a count, but a null-terminated string?
<tankf33der> no
<Regenaxer> What if you pass "^@" instead of NIL?
<tankf33der> this is array
<tankf33der> i pass pointer and length
<Regenaxer> so no null-terminator needed
<Regenaxer> Perhaps it is really the case that the library doesnt support empty input
<tankf33der> found.
<tankf33der> instead of (list 'CH (cons PL 'B PL)) i pass 0
<tankf33der> so i need a special handle for NIL
<tankf33der> and for decrypt.
<tankf33der> crypto_unlock_aead
<Regenaxer> So you pass a null-pointer?
<tankf33der> i pass a list (list 1 2 3) or NIL
<tankf33der> :)
<Regenaxer> yes
<Regenaxer> ok
<Regenaxer> is *cipher_text the buffer for the result?
<tankf33der> yeap
<Regenaxer> Probably it also works if you allocate a buffer with non-zero size then
<Regenaxer> But 0 is fine
<tankf33der> final version:
<tankf33der> issue closed.
<tankf33der> thanks a lot.
<Regenaxer> (if P (list 'CH (cons PL 'B PL)) 0)
<Regenaxer> ok
<Regenaxer> Does (and P (list 'CH (cons PL 'B PL))) also work"
<Regenaxer> ?
<Regenaxer> NIL should give a nullpointer iirc
<tankf33der> lets try.
mangoicedtea has joined #picolisp
<Regenaxer> I check the sources of 'native'
<Regenaxer> hmm, no, it gives a string with only a nullbyte
<Regenaxer> ie. empty string
<tankf33der> but it works
<tankf33der> NIL or (list 111 11 1)
<tankf33der> (and P (list 'CH (cons PL 'B PL)))
<tankf33der> (and (gt0 CL) (list 'P (cons CL 'B CL)))
<tankf33der> in two functions
<Regenaxer> hmm, not sure what this C function expects
<tankf33der> can i leave two if's as before then ?
<Regenaxer> In any case, a NIL argument to 'native' is an empty string
<Regenaxer> same as ""
<Regenaxer> both in C and in Pil
<tankf33der> can i leave two if's as before then ?
<Regenaxer> yes, if you prefer
<Regenaxer> (if ... 0) ?
<tankf33der> yeap
<tankf33der> thanks.
<tankf33der> bbl
<Regenaxer> cu
mangoicedtea has quit [Ping timeout: 252 seconds]
nonlinear has quit [Ping timeout: 268 seconds]
shpx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shpx has joined #picolisp
yumaikas is now known as xkarain
xkarain is now known as yumaikas
karswell has joined #picolisp
mangoicedtea has joined #picolisp
shpx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shpx has joined #picolisp