jetmore / swaks

Swaks - Swiss Army Knife for SMTP
http://jetmore.org/john/code/swaks/
GNU General Public License v2.0
848 stars 86 forks source link

Auth should support netrc #3

Closed jetmore closed 4 years ago

jetmore commented 4 years ago

Requested sluka.de#martin 2014-09-05, patch provided

Currently, one of my use cases is a simple monitoring cronjob including the requirement for authentication. For security reasons, I do not want to put the password on the command line, but obviously it is no alternative to be prompted for it either.

Therefore I have modified your script so that it will try to obtain the login credentials from my ~/.netrc using the standard Net::Netrc module if authentication is required but no username and/or password is given. You may still turn this off by supplying -au respectively -ap without an argument.

Please find a patch attached. Maybe this extension is also of interest for the official swaks version. Please let me know what you think about it.

jetmore commented 4 years ago

swaks-netrc-patch.txt

jetmore commented 4 years ago

dupe of #5