Environment requirements:
- OS: Ubuntu 18.04 x64
- Python: 3.7.5
- Evolution (install | eMail setup)
- Visual Studio Code | PyCharm Community Edition for debugging
python3 main.py
Currently, maildir is a directory that stores email messages as files. Maildir works with Courier, a mail server that provides folders and quotas for the email accounts on your hosting account.
The folders inside the mail directory are subdirectories such as .Drafts, .Trash and .Sent. Each of these folders contain three additional subdirectories called tmp, new and cur.
- tmp - This subdirectory stores email messages that are in the process of being delivered. It may also store other kinds of temporary files.
- new - This subdirectory stores messages that have been delivered but have not yet been seen by any mail application, such as webmail or Outlook.
- cur - This subdirectory stores messages that have already been viewed by mail applications, like webmail or Outlook.
CODE TRANSFER NOTE: The quoted-printable and base64 converters are designed so that the data after its use is easily interconvertible. The only nuance that arises in such a relay is a sign of the end of the line. When converting from quoted-printable to base64, the newline should be replaced with the CRLF sequence. Accordingly, and vice versa, but ONLY when converting text data.
export PYTHONPATH=`pwd`
cd server && pytest-3
- J. Klensin, Network Working Group (October 2008) (DRAFT STANDARD)
- SMTP protocol Explained (How Email works?)
- About powerful select
- Interface to pselect and sigprocmask system calls
- Multiple recipients (100%)
- Graceful shutdown (Ok)
- Big mails (99%)
- Tests (100%)
- Fast sending and receiving mails (100%)
- Our server is not using like fork() works. Here, each running process uses your own select. Therefore, in order to terminate a single job by connection, we have to close all sockets in each process. It is the main idea of graceful shutdown.
- Other solution of problem getting out of select is destroying all processes by a powerful library psutil. Getting a parent process and then all we need is destroying its child processes.
- Solution of graceful shutdown (get out of select/poll by sigint):
- First step: create one socket (as checker), this socket is allways added into select
- Second step: Check if this socket is preparing to read?
- Third step: If it does not prepare, that means we need to close owner process, and write to sigint worker remaining datas.
- Remember: otherwise, we can use pipe instead of a socket.
- Last TODO causes mostly by using regular expressions! It is fixed!