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

Fix SMTP AUTH in smtp_forward/proxy and add docs #872

Merged
merged 2 commits into from Mar 3, 2015
Jump to file or symbol
Failed to load files and symbols.
+33 −0
Diff settings

Always

Just for now

Next

Fix SMTP AUTH in smtp_forward/proxy and add docs

  • Loading branch information...
smfreegard committed Mar 3, 2015
commit 98772acf13f22e86ba7b50792bf6b244bf4611c1
@@ -45,6 +45,18 @@ Configuration
Enable TLS with the forward host (if supported)
* auth\_type=[plain|login]
Enable PLAIN or LOGIN SMTP AUTH. This is required to enable AUTH.
* auth\_user=USERNAME
SMTP AUTH username to use.
* auth\_pass=PASSWORD
SMTP AUTH password to use.
# Per-Domain Configuration
More specific forward routes for domains can be defined. More specific routes
@@ -46,3 +46,15 @@ Configuration
Enable TLS with the forward host (if supported)
* auth\_type=[plain|login]
Enable PLAIN or LOGIN SMTP AUTH. This is required to enable AUTH.
* auth\_user=USERNAME
SMTP AUTH username to use.
* auth\_pass=PASSWORD
SMTP AUTH password to use.
View
@@ -283,6 +283,15 @@ exports.get_client = function (server, callback, port, host, connect_timeout, po
// smtp_forward have in common.
exports.get_client_plugin = function (plugin, connection, config, callback) {
var c = config;
// Merge in authentication settings from smtp_forward/proxy.ini if present
// FIXME: config.auth could be changed when API isn't frozen
if (c.auth_type || c.auth_user || c.auth_pass) {
c.auth = {
type: c.auth_type,
user: c.auth_user,
pass: c.auth_pass
}
}
var pool = exports.get_pool(connection.server, c.port, c.host,
c.connect_timeout, c.timeout, c.max_connections);
pool.acquire(function (err, smtp_client) {
ProTip! Use n and p to navigate between commits in a pull request.