Return-Path: X-Original-To: apmail-jmeter-user-archive@www.apache.org Delivered-To: apmail-jmeter-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 43D5118963 for ; Thu, 13 Aug 2015 17:28:58 +0000 (UTC) Received: (qmail 68419 invoked by uid 500); 13 Aug 2015 17:28:57 -0000 Delivered-To: apmail-jmeter-user-archive@jmeter.apache.org Received: (qmail 68384 invoked by uid 500); 13 Aug 2015 17:28:57 -0000 Mailing-List: contact user-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JMeter Users List" Delivered-To: mailing list user@jmeter.apache.org Received: (qmail 68374 invoked by uid 99); 13 Aug 2015 17:28:57 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Aug 2015 17:28:57 +0000 Received: from [192.168.7.235] (unknown [41.248.185.92]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id E15AC1A0325 for ; Thu, 13 Aug 2015 17:28:56 +0000 (UTC) Message-ID: <55CCD3D5.3090303@apache.org> Date: Thu, 13 Aug 2015 18:28:53 +0100 From: Milamber Organization: Apache Software Fondation User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1 MIME-Version: 1.0 To: JMeter Users List Subject: Re: JMeter - IP Source (aka IP Spoofing) option for Mail sampler References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Currently, only the HTTP Request (using HttpClient implementation 3/4) can make tcp/ip connection with a different IP source. The other samplers don't provide this behavior (currently). Your script below (FTP) is not the same behavior. You use a special feature from FTP protocol: the passive connection for the data transfer. You can open a ticket on Bugzilla, and provide some patches to implement this. On 10/08/2015 15:26, Karthick N wrote: > Hello Team, > > I'm trying to achieve SMTP/POP3 session to the server using different > client IP address via JMeter. However IP source (aka IP Spoofing) option is > only available with HTTP sampler. > > BTW, I don't want to use the distributed test (master/salve). I want to > simulate the same behavior whats being used by HTTP sampler. > > I was successful of writing a script for FTP. But i'm seeking a > method/feature to invoke different client IP's (Like HTTP IP source) for > default samplers like FTP, Mail read, SMTP, JDBC, MongoDB etc. instead of > wrting script. Any help is highly appreciated. > > Here is the sample code for FTP: > > import org.apache.commons.net.ftp.FTPClient; > > FTPClient client = new FTPClient(); > > client.setPassiveLocalIPAddress("${IP}"); > > client.connect("xx.xx.xx.xx",21); > > client.login("administrator","dell@123"); > > OutputStream stream = new FileOutputStream("TempServerLog.txt"); > > boolean success = client.retrieveFile("test1.txt", stream); > > log.info("Success: " + success); > > if (!success) { > > SampleResult.setSuccessful(false); > > SampleResult.setResponseMessage("Failed to read file"); > > } > > client.disconnect(); > > Thanks > > Karthick > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org For additional commands, e-mail: user-help@jmeter.apache.org