-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First experimental implementation of ESMTP, HELO fallback and various improvements #11
Open
micia
wants to merge
36
commits into
corecode:master
Choose a base branch
from
micia:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…til crypto.c enables it
…en, improve external buffer logic to report actual length to the caller, make it return the actual status code rather than status code / 100
… ESMTP aware functions, rework authentication mechanisms accordingly
Rework routines to perform basic checking for I/O errors and improve logic to check for meaningful configuration, user defined ports are now validated and stored in unsigned integers for maximum portability.
USESSL implies SECURETRANS so the condition is redundant.
Makes the config file parser ignore trailing and ending whitespaces, leading to the expected results while parsing badly formatted files. Also makes the chomp() function deal with the comments directly, to have consistend behaviour across every configuration file.
Make HELO fallback possible only if no authentication was supplied by the user, also fix a bug in ESMTP flags refreshing (actually drop old features)
If server advertises the login possibility and the user provides us with authentication credential, dma should use them or fail.
Do not let read_remote tolerate invalid status numbers anywhere in the message, also unify error handling and ensure null byte termination for any string.
errno could be zero leading to a confusing message like: SMTP login failed: success
Remote connection depends on global status, which is unreliable and unpredictable, encapsulate any connection configuration into a struct connection and use only this one for communication, this way any delivery will be easily manageable and the struct config will be read only across the process.
Code and both config file and man pages refer that option as SECURETRANS, not SECURETRANSFER.
This reverts commit 1fcb993.
SECURETRANS option is actually SECURETRANSFER
Be less redundant with hostnames and addresses, the first one should be enough.
Actually send AUTH PLAIN and encode credentials properly.
Fix a typo in man page, remove unused macro constant, make ESMTP parsing more strict
bzero() and bcopy() are deprecated and marked as legacy by POSIX, bcopy() is not even specified anymore by POSIX.
Clear FILE stream error flag on retry to allow delivery logic to retry properly on I/O error failure.
Warn on read errors during bounce creation but still try to deliver the bounced mail. Main delivery routine is responsible to clear FILE stream error indicator to provide a valid stream to the bounce routine.
Thanks, still trying to find time to review the patches. Please be patient. |
I suspect it might be better to create a formal parser with yacc/lex. What do you think? We can also chat more quickly on IRC ##dma@freenode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These commits implement basic ESMTP parsing and support, as well as implementing a basic HELO fallback in case everything else fails. The main changes are:
These features are not fully tested yet, but using dma on a daily basis I don't see any issue, but a code review and a more in depth test would be necessary.