-
Notifications
You must be signed in to change notification settings - Fork 0
Home
David Garratt edited this page Jun 14, 2024
·
13 revisions
In summary sftpPut is a utility which is designed to run as a service and it's purpose is to monitor a local folder for a file or files matching a mask and if found upload them to a remote SFTP machine. The local file is then removed.
See the partner program called sftpGet
config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<sftpSend2>
<general>
<value id="title" encrypted="no">SFTP Example</value>
<value id="emailEnabled" encrypted="no">false</value>
</general>
<security>
<value id="remoteHost" encrypted="no">1.2.3.4</value>
<value id="remotePort" encrypted="no">22</value>
<value id="checkKnownHosts" encrypted="no">no</value>
<value id="knownHostsFile" encrypted="no">./ssh/known_hosts</value>
<value id="authType" encrypted="no">user password</value>
<value id="username" encrypted="no">testuser</value>
<value id="password" encrypted="no">testpassword</value>
<value id="privateKeyFile" encrypted="no">./ssh/sftpSend</value>
<value id="privateKeyPasswordProtected" encrypted="no">no</value>
<value id="privateKeyPassword" encrypted="no"/>
</security>
<source>
<value id="localDir" encrypted="no">./send/</value>
<value id="localFileMask" encrypted="no">*.xml</value>
<value id="backupDir" encrypted="no"></value>
<value id="pollFrequencySeconds" encrypted="no">5000</value>
</source>
<destination>
<value id="remoteDir" encrypted="no">/remote/</value>
<value id="tempFileExtension" encrypted="no">.tmp</value>
</destination>
</sftpSend2>
</config>
email.xml
<?xml version="1.0" encoding="UTF-8"?>
<emailSettings>
<configuration>
<property name="mail.smtp.auth" value="true"/>
<property name="mail.smtp.starttls.enable" value="true"/>
<property name="mail.smtp.host" value="smtp.live.com"/>
<property name="mail.smtp.socketFactory.port" value="25"/>
<property name="mail.smtp.user" value="email@outlook.com"/>
<property name="mail.smtp.password" value="password"/>
<property name="mail.smtp.socketFactory.class" value="javax.net.ssl.SSLSocketFactory"/>
<property name="mail.smtp.auth" value="true"/>
<property name="mail.smtp.port" value="25"/>
<property name="mail.smtp.from" value="email@outlook.com"/>
<property name="mail.debug" value="true"/>
</configuration>
<!-- Distribution Lists are referred to within message mapping Config.xml -->
<distributionList id="Monitor" enabled="Y" maxFrequencyMins="0">
<toAddressList>example@email.com</toAddressList>
</distributionList>
</emailSettings>