/README (1058e91164c6384b9d271e249ee74a7df9952884) (3802 bytes) (mode 100644) (type blob)

Primary target audience:
 - system developers
 - advanced system administrators
 - very advanced users

Target scale: personal program, one account.

This program is not meant to send emails to "queueing" smtp servers which
expect user authentication. This program does act as a "real" smtp server
sending emails to "real" smtp servers.

This is, yet another, _naive_ SYNChronous SendMail, for linux. Features are:
 - No libc: direct linux "syscalls" for x86_64 and aarch64/arm64 hardware
   architectures. ulinux, the ultra thin user level linux abstraction layer,
   should support not too hard addition of new hardware architectures.
 - No brain damaged build system (GNU autotools, meson, cmake, etc).
 - Include a minimal dns resolver (expecting recursion support from the DNS
   servers) with a resolver.conf file parser.
 - IPv4 and IPv6 (only IPv4 was properly tested though).
 - SMTP transparency handling (<CRLF>.<CRLF> to <CRLF>..<CRLF> without "sed").
   If you want to handle it yourself, you can disable it in config.h.
 - "One Compilation Unit". Actually 1 C src file and 1 assembly src file.

How to build:
	Copy "config.default.h" wherever suits your build system/scripts and
	rename it to "config.h". Customize it with what you must/want.
	Use/copy&customize the make_* included scripts.
	In theory, you could compile with:
		"cc -I$config_h_dir -c all.c -o all_c.o"-ish
	You could assemble with:
		"cpp -DASSEMBLER -I$config_h_dir all.S | as -o all_S.o -"-ish
	You could link with:
		"ld -o syncsm all_c.o all_S.o"-ish

	See the specifics for each hardware architecture in the provided make_*
	scripts. At the time of writing, only aarch64/arm64 requires to be 
	provided the linux used hardware page size, because this value is
	dependent on chosen options from linux compilation: we don't want to
	dynamically discover this value using the linux auxv process vector.

	It is based on a gcc/binutils toolchain, but the ground work to allow
	adding new toolchains without insane kludge should be around (namely not
	too hard-ish dependency on C inline assembly).

To deal with the log, egrep and "egrep -v" are your friends. The log
level-ish/severit-ish of a line is at its start.

	'nothing/nobody is perfect'

--------------------------------------------------------------------------------

This project uses "One Compilation Unit":
	It's possible to use the C preprocessor to perform local (part of a
	compilation unit) namespace transformations. But those latests are
	applied to _all_ identifiers: type names, struct member names, function
	names, variable names, enum member names, then have limitations. The
	main limitation is identifier collision. The idea is to work around them
	locally (the preprocessor will warn you about collisions). Another
	limitation is, since tranformations are using the C preprocessor,
	special handling of macros. See GLOBAL_NAMESPACE_RULES.

	This system has enough expressive power to grow projects to very large,
	then is kind of overkill here since it's a rather poor project from a
	namespace point of view. It is another method than the classic
	compilation unit based partitioning of namespace.

	All that to say: this code organization allows to grow "One Compilation
	Unit" projects to very large and keep namespace in check for writting
	code.

	Resorting to "beyond sanity" complex computer languages in order to let
	them perform global namespage management is a blunt mistake. In other
	words, it is way more _un_reasonable than this very method.
	
	Of course, a natural border of this model is the one between C files and
	assembly files (and no, inline assembly is not a good answer, for many
	reasons).

This code should support easy ipv4 support removal refurbishment and
simplification for a clean ipv6 only implementation.


Mode Type Size Ref File
100644 blob 853 cfee40c9af4999813fcbb3a32e07de953696d003 ABBREVIATIONS
100644 blob 3802 1058e91164c6384b9d271e249ee74a7df9952884 README
100644 blob 967 eb0eb02192cae4ec269d7836bcccf789dd3baa09 RULES_GLOBAL_NAMESPACE
100644 blob 226 47e8cbfba1358960f381e80943afaa64d6083673 RULES_POINTER
100644 blob 141 a7eef9c825adfb6cb392c5f61048ae1a9961144f TODO
100644 blob 186 e08b0072d50fa683daf4b72ffcca9afe28f33928 all.S
100644 blob 907 68a9ab080cac0188391966e29be979548a77b537 all.c
100644 blob 2570 9c5f66db8962e15d99644ac8f42fc207e27d3178 config.default.h
100644 blob 448 b3b72c25ea89e0f17ab77ead13e89b915186ec95 dns.h
040000 tree - 60975c8ad01566be3264e1648a304087dae2e6e4 dns
100755 blob 1246 6ebc4041142bda951a9a02320d45deb7ee43f39b make_gcc_aarch64
100755 blob 1245 303ed53e1ef0a6f89a5d13c2eb21c271e0b6dcd0 make_gcc_x86_64
040000 tree - fcae74b207287320abbbd373133626ae7ee67ed0 namespace
100644 blob 434 6b73d3e06f341d75c9f17c00b0720b85498ef628 perr.h
100644 blob 450 88813b86df39c72cc32605e178edfdd544297e42 smtp.h
040000 tree - eca08c8db66629459c72e1223d89a03895dc8bab smtp
100644 blob 13459 1169541482e1d1c3e5a2e61c0dcb338d2d3c5689 syncsm.c
100644 blob 1948 678eed4da259f00ba708f070aeddb69229322df6 syncsm.h
100644 blob 880 82aad126f033e8ecb5c919dbd27996b094bbfbe8 ulinux.h
040000 tree - 503817b57582aa9b3b6a5482104fe81605a6a035 ulinux
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/sylware/syncsm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/sylware/syncsm

Clone this repository using git:
git clone git://git.rocketgit.com/user/sylware/syncsm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main