You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2009/08/14 22:27:37 UTC
svn commit: r804362 - in
/james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core:
./ filter/fastfail/
Author: norman
Date: Fri Aug 14 20:27:36 2009
New Revision: 804362
URL: http://svn.apache.org/viewvc?rev=804362&view=rev
Log:
replace deprecated methods
Modified:
james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/AuthRequiredToRelayRcptHook.java
james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/SenderAuthIdentifyVerificationRcptHook.java
james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/filter/fastfail/ValidRcptHandler.java
james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/filter/fastfail/ValidRcptMX.java
Modified: james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/AuthRequiredToRelayRcptHook.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/AuthRequiredToRelayRcptHook.java?rev=804362&r1=804361&r2=804362&view=diff
==============================================================================
--- james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/AuthRequiredToRelayRcptHook.java (original)
+++ james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/AuthRequiredToRelayRcptHook.java Fri Aug 14 20:27:36 2009
@@ -40,7 +40,7 @@
public HookResult doRcpt(SMTPSession session, MailAddress sender,
MailAddress rcpt) {
if (!session.isRelayingAllowed()) {
- String toDomain = rcpt.getHost();
+ String toDomain = rcpt.getDomain();
if (!session.getConfigurationData().getMailServer().isLocalServer(toDomain)) {
if (session.isAuthSupported()) {
return new HookResult(HookReturnCode.DENY,
Modified: james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/SenderAuthIdentifyVerificationRcptHook.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/SenderAuthIdentifyVerificationRcptHook.java?rev=804362&r1=804361&r2=804362&view=diff
==============================================================================
--- james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/SenderAuthIdentifyVerificationRcptHook.java (original)
+++ james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/SenderAuthIdentifyVerificationRcptHook.java Fri Aug 14 20:27:36 2009
@@ -47,9 +47,9 @@
SMTPSession.SENDER);
if ((senderAddress == null)
- || (!authUser.equals(senderAddress.getUser()))
+ || (!authUser.equals(senderAddress.getLocalPart()))
|| (!session.getConfigurationData().getMailServer()
- .isLocalServer(senderAddress.getHost()))) {
+ .isLocalServer(senderAddress.getDomain()))) {
return new HookResult(HookReturnCode.DENY,
SMTPRetCode.BAD_SEQUENCE,
DSNStatus.getStatus(DSNStatus.PERMANENT,
Modified: james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/filter/fastfail/ValidRcptHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/filter/fastfail/ValidRcptHandler.java?rev=804362&r1=804361&r2=804362&view=diff
==============================================================================
--- james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/filter/fastfail/ValidRcptHandler.java (original)
+++ james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/filter/fastfail/ValidRcptHandler.java Fri Aug 14 20:27:36 2009
@@ -171,14 +171,14 @@
if (!session.isRelayingAllowed()) {
boolean invalidUser = true;
- if (session.getConfigurationData().getUsersRepository().contains(rcpt.getUser()) == true || recipients.contains(rcpt.toString().toLowerCase()) || domains.contains(rcpt.getHost().toLowerCase())) {
+ if (session.getConfigurationData().getUsersRepository().contains(rcpt.getLocalPart()) == true || recipients.contains(rcpt.toString().toLowerCase()) || domains.contains(rcpt.getDomain().toLowerCase())) {
invalidUser = false;
}
// check if an valid virtual mapping exists
if (invalidUser == true && vut == true) {
try {
- Collection targetString = table.getMappings(rcpt.getUser(), rcpt.getHost());
+ Collection targetString = table.getMappings(rcpt.getLocalPart(), rcpt.getDomain());
if (targetString != null && targetString.isEmpty() == false) {
invalidUser = false;
Modified: james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/filter/fastfail/ValidRcptMX.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/filter/fastfail/ValidRcptMX.java?rev=804362&r1=804361&r2=804362&view=diff
==============================================================================
--- james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/filter/fastfail/ValidRcptMX.java (original)
+++ james/server/sandbox/active/smtp_refactor/smtpserver-function/src/main/java/org/apache/james/smtpserver/core/filter/fastfail/ValidRcptMX.java Fri Aug 14 20:27:36 2009
@@ -121,7 +121,7 @@
*/
public HookResult doRcpt(SMTPSession session, MailAddress sender, MailAddress rcpt) {
- String domain = rcpt.getHost();
+ String domain = rcpt.getDomain();
// Email should be deliver local
if (!domain.equals(LOCALHOST)) {
@@ -143,7 +143,7 @@
// Check for invalid MX
if (bNetwork.matchInetNetwork(ip)) {
return new HookResult(HookReturnCode.DENY,SMTPRetCode.AUTH_REQUIRED, DSNStatus.getStatus(DSNStatus.PERMANENT, DSNStatus.SECURITY_AUTH) + " Invalid MX " + session.getRemoteIPAddress()
- + " for domain " + rcpt.getHost() + ". Reject email");
+ + " for domain " + domain + ". Reject email");
}
} catch (UnknownHostException e) {
// Ignore this
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org