<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)
<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))