-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from jcbf/jcbf/skip_auth
Implement SpikAuth. Will be on by default
- Loading branch information
Showing
21 changed files
with
392 additions
and
19 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
LogTo /devsdasdadadssad/stdout | ||
RefuseFail off # (on|off) | ||
TTL 1D | ||
User nobody | ||
Socket inet:2424@127.0.0.1 | ||
Syslog none | ||
Daemonize off # (on|off) | ||
AuthservID mail.example.com |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
LogTo /dev/stdout | ||
RefuseFail off # (on|off) | ||
TTL 1H | ||
TTL 1h | ||
User asdasdadasda | ||
Socket inet:2424@127.0.0.1 | ||
Syslog none | ||
Daemonize off # (on|off) | ||
AuthservID mail.example.com |
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
mt.startfilter("./smf-spf", "-f", "-c","./smf-spf-tests-faiillogfile.conf") | ||
-- try to connect to it | ||
conn = mt.connect("inet:2424@127.0.0.1", 10, 0.25) | ||
if conn == nil then | ||
error("mt.connect() failed") | ||
end | ||
|
||
if conn == nil then | ||
print "Connect to Milter failed: should fail" | ||
else | ||
error("mt.connect() to milter. Test failed") | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
mt.startfilter("./smf-spf", "-f", "-c","./smf-spf-not-exists.conf") | ||
-- try to connect to it | ||
conn = mt.connect("inet:2424@127.0.0.1", 10, 0.25) | ||
if conn == nil then | ||
error("mt.connect() failed") | ||
end | ||
|
||
if conn == nil then | ||
print "Connect to Milter failed: should fail" | ||
else | ||
error("mt.connect() to milter. Test failed") | ||
end |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
mt.echo("SPF fail test") | ||
|
||
-- try to start the filter | ||
mt.startfilter("./smf-spf", "-f", "-c","./smf-spf-tests-q.conf") | ||
|
||
-- try to connect to it | ||
conn = mt.connect("unix:./milter.sock", 40, 0.25) | ||
if conn == nil then | ||
error("mt.connect() failed") | ||
end | ||
|
||
if mt.conninfo(conn, "localhost", "10.11.12.13") ~= nil then | ||
error("mt.conninfo() failed") | ||
end | ||
if mt.getreply(conn) == SMFIR_ACCEPT then | ||
mt.echo("no MTA name test passed") | ||
else | ||
error("mt.conninfo() unexpected reply") | ||
end | ||
mt.disconnect(conn) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
mt.echo("Invalid sender hardfail - ./smf-spf-tests-refuse.conf") | ||
|
||
-- try to start the filter | ||
mt.startfilter("./smf-spf", "-f", "-c","./smf-spf-tests-fixedip-fail.conf") | ||
|
||
-- try to connect to it | ||
conn = mt.connect("inet:2424@127.0.0.1", 40, 0.25) | ||
if conn == nil then | ||
error("mt.connect() failed") | ||
end | ||
|
||
-- send connection information | ||
|
||
mt.macro(conn, SMFIC_CONNECT, "j", "mta.name.local") | ||
if mt.conninfo(conn, "a.server.name.local", "10.11.12.13") ~= nil then | ||
error("mt.conninfo() failed") | ||
end | ||
|
||
-- send envelope macros and sender data | ||
-- mt.helo() is called implicitly | ||
mt.macro(conn, SMFIC_MAIL, "i", "DEADBEAF") | ||
if mt.mailfrom(conn, "underspell.com") ~= nil then | ||
error("mt.mailfrom() failed") | ||
end | ||
if mt.getreply(conn) ~= SMFIR_REPLYCODE then | ||
error("mt.mailfrom() unexpected reply") | ||
end | ||
print ("received SMFIR_REPLYCODE ") | ||
|
||
if mt.mailfrom(conn, "<12345678901234567890123456789012345678901234567890123456789012345@underspell.com>") ~= nil then | ||
error("mt.mailfrom() failed") | ||
end | ||
if mt.getreply(conn) ~= SMFIR_REPLYCODE then | ||
error("mt.mailfrom() unexpected reply") | ||
end | ||
print ("received SMFIR_REPLYCODE ") | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
mt.startfilter("./smf-spf", "-f", "-c","./smf-spf-tests-fail-user.conf") | ||
-- try to connect to it | ||
conn = mt.connect("inet:2424@127.0.0.1", 4, 0.25) | ||
if conn == nil then | ||
error("mt.connect() failed") | ||
end | ||
|
||
print "Connect to Milter: OK" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
-- Copyright (c) 2009-2013, The Trusted Domain Project. All rights reserved. | ||
mt.echo("SPF skip auth test") | ||
|
||
-- try to start the filter | ||
mt.startfilter("./smf-spf", "-f", "-c","./smf-spf-tests-natip.conf") | ||
|
||
-- try to connect to it | ||
conn = mt.connect("inet:2424@127.0.0.1", 40, 0.25) | ||
if conn == nil then | ||
error("mt.connect() failed") | ||
end | ||
|
||
-- send connection information | ||
-- mt.negotiate() is called implicitly | ||
mt.macro(conn, SMFIC_CONNECT, "{j)", "mta.name.local") | ||
if mt.conninfo(conn, "localhost", "192.0.0.194") ~= nil then | ||
error("mt.conninfo() failed") | ||
end | ||
if mt.getreply(conn) ~= SMFIR_CONTINUE then | ||
error("mt.conninfo() unexpected reply") | ||
end | ||
|
||
if mt.helo(conn, "underspell.com") ~= nil then | ||
error("mt.helo() failed") | ||
end | ||
if mt.getreply(conn) ~= SMFIR_CONTINUE then | ||
error("mt.helo() unexpected reply") | ||
end | ||
-- send envelope macros and sender data | ||
mt.macro(conn, SMFIC_MAIL, "{i}", "t-verify-malformed") | ||
mt.macro(conn, SMFIC_MAIL, "{auth_authen}", "username@example.net") | ||
if mt.mailfrom(conn, "<user@underspell.com>") ~= nil then | ||
error("mt.mailfrom() failed") | ||
end | ||
if mt.getreply(conn) ~= SMFIR_REPLYCODE then | ||
error("mt.mailfrom() unexpected reply") | ||
end | ||
|
||
mt.disconnect(conn) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
-- Copyright (c) 2009-2013, The Trusted Domain Project. All rights reserved. | ||
mt.echo("SPF skip auth test") | ||
|
||
-- try to start the filter | ||
mt.startfilter("./smf-spf", "-f", "-c","./smf-spf-tests-natip.conf") | ||
|
||
-- try to connect to it | ||
conn = mt.connect("inet:2424@127.0.0.1", 40, 0.25) | ||
if conn == nil then | ||
error("mt.connect() failed") | ||
end | ||
|
||
-- send connection information | ||
-- mt.negotiate() is called implicitly | ||
mt.macro(conn, SMFIC_CONNECT, "{j)", "mta.name.local") | ||
if mt.conninfo(conn, "localhost", "192.0.0.194") ~= nil then | ||
error("mt.conninfo() failed") | ||
end | ||
if mt.getreply(conn) ~= SMFIR_CONTINUE then | ||
error("mt.conninfo() unexpected reply") | ||
end | ||
|
||
if mt.helo(conn, "underspell.com") ~= nil then | ||
error("mt.helo() failed") | ||
end | ||
if mt.getreply(conn) ~= SMFIR_CONTINUE then | ||
error("mt.helo() unexpected reply") | ||
end | ||
-- send envelope macros and sender data | ||
mt.macro(conn, SMFIC_MAIL, "{i}", "t-verify-malformed") | ||
mt.macro(conn, SMFIC_MAIL, "{verify}", "OK") | ||
if mt.mailfrom(conn, "<user@underspell.com>") ~= nil then | ||
error("mt.mailfrom() failed") | ||
end | ||
if mt.getreply(conn) ~= SMFIR_REPLYCODE then | ||
error("mt.mailfrom() unexpected reply") | ||
end | ||
|
||
mt.disconnect(conn) |
Oops, something went wrong.