- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Get the attachment then ftp it ..
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2001 07:51 PM
тАО08-07-2001 07:51 PM
Is there a script or a command to get an attachment from an email or several emails and put the attachments in one folder? I am running HPUX 11.0 and the attachments are coming from a windows box type email IE Outlook or Outlook Express. Here is my situation we have customer who send us .vox files for a custom prompts for an IVR.They email them to us and we have to manually ftp them to the IVRS, which are sco boxes. My idea is to have them email it to a username on an HPUX box (witch is already set up to receive and relay mail). Once the file gets to the HPUX box have a cron script that will extract the file and put it in a directory. Then have another cron script that will ftp or rcp the vox files to all the IVRs on the network. Everything is already set up on the network side. But my first step is to extract the attachment to a directory. The ftp script part shouldn?t be too hard.
Thanks,
Richard
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2001 11:34 PM
тАО08-07-2001 11:34 PM
Re: Get the attachment then ftp it ..
If you get them to send the mail with the attachment uuencoded (and gzipped, say) for example, to an address which is aliased to a program, then this could do the extraction for you, e.g. send to the user "extract" - in your aliases file, you'll have:
extract "|/usr/local/bin/read_att.sh"
/usr/local/bin/read_att.sh could contain something like:
=====================
#!/bin/ksh
/usr/bin/uudecode -p | gunzip -c > /tmp/att.$$
...
your ftp code
...
=====================
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2001 01:04 AM
тАО08-08-2001 01:04 AM
Re: Get the attachment then ftp it ..
http://hpux.tn.tudelft.nl/hppd/hpux/Networking/Mail/alpha.html
Use it together with Robin's suggestion (uudecode is probably not enough).
/Allan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2001 01:01 PM
тАО08-08-2001 01:01 PM
Re: Get the attachment then ftp it ..
I downloaded ripmime of the porting website.
But I cant get it to work. I did
swinstall -s ripmime-0.1.11-sd-11.00.depot
For somereason I just cant get anything to work off this website.
Thanks
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2001 11:05 PM
тАО08-08-2001 11:05 PM
Re: Get the attachment then ftp it ..
/Allan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2001 11:44 PM
тАО08-08-2001 11:44 PM
Re: Get the attachment then ftp it ..
Is this what "not work" means ?
/Allan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2001 03:03 AM
тАО08-09-2001 03:03 AM
Re: Get the attachment then ftp it ..
So we are able to send and receive mail with attachment automated.
There are Perl-modules available which do the attachment cutting.
Perl and procmail is availble on HP-UX, but you need to build your scripting, our scripting is about 1000 lines of scripting. Using shell-scripting will do the job, but i think you need more lines of code to get it up and running.
:-)
Allan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2001 09:43 AM
тАО08-09-2001 09:43 AM
Re: Get the attachment then ftp it ..
can use Perl's MIME::Parser to detach them.
You can then use Perl's Net::FTP to ftp them.
# read MIME message from stdin; save
# attachments to dir somedir
use MIME::Parser;
$p = new MIME::Parser;
$p->output_dir("somedir");
$e = $p->read(\*STDIN);
# ftp a file from somedir to destdir at remote host
use Net::FTP;
$ftp = Net::FTP->new("somehost.com");
$ftp->login("anonymous",'me@here.there');
$ftp->cwd("destdir");
$ftp->put("somedir/some.file");
$ftp->quit;
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2001 07:48 PM
тАО08-09-2001 07:48 PM
Re: Get the attachment then ftp it ..
thanks for the perl script.
I dont know anything about perl but it is a goal of mine to learn perl. Can you explain to me how to set that script up? We do have perl on out HP box so that is not a problem.
THanks
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2001 11:05 PM
тАО08-09-2001 11:05 PM
SolutionMake sure you have perl V5 (run perl -v). If you have, create your executable script with the path to your perl binary at the top, e.g. #!/opt/perl5/bin/perl
If the MIME module is missing (just create a one line script containing 'use MIME::Parser;' to check), have a look at http://www.cpan.org to download it. Obviously this goes for any other missing modules.
A start, hopefully...Robin