plan9fox/sys/src/cmd/upas
Ori Bernstein e6d31c1715 spf: limit recursion depth to prevent ddos (thanks tijay, iashiq5)
An attacker may use an infinite number of SPF referrals in his/her SPF
setting and can send an email to your mail server which would make
your SMTP server make a lot of DNS queries.  By exploiting this
vulnerability, an attacker can block your SMTP queue, flood the
associated recursive resolver, or any DNS authoritative server.

According to RFC recommendations
(https://datatracker.ietf.org/doc/html/rfc7208#section-4.6), a few DNS
lookup limits exist that an SMTP server needs to maintain while
resolving an SPF record.  That is, SPF implementations MUST limit the
total number of query-causing terms to 10 and the number of void
lookups to 2 to avoid unreasonable load on the DNS.

from:

Taejoong “Tijay” Chung (tijay@vt.edu)
Ishtiaq Ashiq (iashiq5@vt.edu)
2022-06-30 01:24:27 +00:00
..
alias upas/*: fix mkfile issues (thanks amavect) 2020-11-22 11:36:23 -08:00
bayes upas/*: fix mkfile issues (thanks amavect) 2020-11-22 11:36:23 -08:00
binscripts upas: fix mk nuke 2020-11-25 19:54:52 +10:30
common mklib, upas/common: clean up libcommon properly (thanks mikan) 2021-02-03 08:10:11 -08:00
filterkit upas/*: fix mkfile issues (thanks amavect) 2020-11-22 11:36:23 -08:00
fs upas/fs: add missing newline to a debug print 2021-10-09 10:53:39 +00:00
imap4d upas/*: fix mkfile issues (thanks amavect) 2020-11-22 11:36:23 -08:00
Mail acne/Mail: fix double-free (Bterm() in mesgshow()) 2022-01-29 20:50:03 +00:00
marshal marshal: remove debug junk. 2021-02-20 13:03:35 -08:00
ml upas/ml: touch the artwork 2021-01-19 18:12:30 -08:00
ned upas/*: fix mkfile issues (thanks amavect) 2020-11-22 11:36:23 -08:00
pop3 upas/*: fix mkfile issues (thanks amavect) 2020-11-22 11:36:23 -08:00
q runq: clean up code, fix error handling. 2021-02-02 06:52:00 -08:00
qfrom upas/*: fix mkfile issues (thanks amavect) 2020-11-22 11:36:23 -08:00
scanmail upas/*: fix mkfile issues (thanks amavect) 2020-11-22 11:36:23 -08:00
send upas/send: add \n to error in refuse() (thanks josuah) 2021-02-20 15:25:25 -08:00
smtp upas/*: fix mkfile issues (thanks amavect) 2020-11-22 11:36:23 -08:00
spf spf: limit recursion depth to prevent ddos (thanks tijay, iashiq5) 2022-06-30 01:24:27 +00:00
unesc upas/*: fix mkfile issues (thanks amavect) 2020-11-22 11:36:23 -08:00
vf [9front] upas/vf: exclude mime boundary from temporary attachment files 2021-02-08 20:59:01 -08:00
mkfile upas: make 'all' the default target 2020-11-21 16:13:20 -08:00
mkupas upas/*: cleanup mkfiles (thanks amavect) 2020-11-17 18:37:38 -08:00
README Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00

Once upon a time Upas ran on many versions of Unix.
This is a partial rewrite to ANSI C specifically for Plan 9.
It uses's Plan 9's bio library instead of stdio and Plan 9's
regular expression library.

I've tried to make portability possible but it has
never been ported.  To port Upas to another system:

	- port Plan 9's libbio library working on that system (already available).
	- port Plan 9's regexp library working on that system (should just compile).
	- rewrite common/libsys.c to reflect system calls for that system.  This
	  file contains all the really system dependent code that differs between
	  Plan 9 and each Unix.  This includes file management, signal
	  handling, process control and error handling.
	- change the important directory trees in common/mail.c to reflect
	  where you want things like 
	- get the ARGBEGIN/ARGEND/ARGF macros from Plan 9's libc.h
	- get the include files correct in common/sys.h
	- rewrite smtp/mxdial to use the conventions of that system
	- rewrite runq.c to walk queues on that system.