Skip to content
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

SMTP Auth #28

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

SMTP Auth #28

wants to merge 12 commits into from

Conversation

msztolcman
Copy link

added option to handle smtp authorization. There exists stuff that requires SMTP authorization, and cannot use no auth at all. So I added an option to enable this using options:
--smtp-auth - enable SMTP authorization
--smtp-username, --smtp-password

maildump/smtp.py Outdated Show resolved Hide resolved
maildump_runner/__main__.py Outdated Show resolved Hide resolved
@ThiefMaster ThiefMaster changed the title Smtp auth SMTP Auth Jul 23, 2018
@ThiefMaster
Copy link
Owner

ThiefMaster commented Jul 23, 2018

Thanks for the PR! I'm curious, what client are you using maildump with that requires smtp auth?

@ThiefMaster
Copy link
Owner

Hey, I know it's been a long time, but if you rebase this (and adapt to maildump now being Python 3.6+ only) I'll promise to merge it quickly :)

@msztolcman
Copy link
Author

Hi,
I've refreshed this pull request. Please review :)

maildump/smtp.py Outdated Show resolved Hide resolved
maildump/smtp.py Outdated Show resolved Hide resolved
maildump/smtp.py Outdated Show resolved Hide resolved

return self._smtp_auth.check_password(auth_data_splitted[1], auth_data_splitted[2])

def smtp_EHLO(self, arg):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to override all this? A quick google search pointed me to this patch from this python issue where someone tried to get smtp auth support upstream, and they don't override EHLO. However, I don't know how good that implementation is.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how in other way push info about AUTH PLAIN to capabilities.

maildump/smtp.py Outdated Show resolved Hide resolved
maildump_runner/main.py Outdated Show resolved Hide resolved
@@ -87,11 +91,19 @@ def main():
args.htpasswd = os.path.abspath(args.htpasswd)
print('Htpasswd path is relative, using {0}'.format(args.htpasswd))

if args.smtp_auth and not os.path.isabs(args.smtp_auth):
args.smtp_auth = os.path.abspath(args.smtp_auth)
print('SMTP Htpasswd path is relative, using {0}'.format(args.smtp_auth))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
print('SMTP Htpasswd path is relative, using {0}'.format(args.smtp_auth))
print('Htpasswd path for SMTP AUTH is relative, using {0}'.format(args.smtp_auth))

maildump_runner/main.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants