niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » shell
mail script
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
Author Message
eeb4u@hotmail.com
*nix forums beginner


Joined: 26 Oct 2005
Posts: 18

PostPosted: Fri Jul 21, 2006 5:50 am    Post subject: mail script Reply with quote

I have a mailserver (Mdaemon on Windows 2003) that handles some
customer email. I used to ftp an alias file to it after processing it
on a solaris box. The aliases were created on one system, FTP'ed to my
solaris box, then I used to upload the alias file nightly to the
windows server. The solaris box had to do some manipulation of the
file to get it in a format that Mdaemon likes while retaining the
permanant aliases on the Mdaemon mail server

The alias file came form a system that is no longer used, and currently
the email aliases are generated via a crystal report. The Crystal
report can be emailed anywhere, but is mailed as an attachment.

I have set up fetchmail to retrieve the email message, but the crystal
report file (plain text file) is an attachment and I don't see a way of
viewing it.

Can anyone suggest of a way to script reading an email attachment, or
is there a simpler way of getting the report file onto a unix box for
proccessing prior to sending to my mail server.

thanks in advance,

Mike D
Back to top
Bill Marcum
*nix forums Guru


Joined: 28 Mar 2005
Posts: 1264

PostPosted: Fri Jul 21, 2006 6:11 am    Post subject: Re: mail script Reply with quote

On 20 Jul 2006 22:50:14 -0700, eeb4u_athotmail_com
<eeb4u@hotmail.com> wrote:
Quote:

I have set up fetchmail to retrieve the email message, but the crystal
report file (plain text file) is an attachment and I don't see a way of
viewing it.

Can anyone suggest of a way to script reading an email attachment, or
is there a simpler way of getting the report file onto a unix box for
proccessing prior to sending to my mail server.

munpack

mimedecode

Perhaps you wouldn't need a unix box if you installed Cygwin on the mail
server (or better yet, use a Unix, Linux or BSD box as a mail server,
but I'm sure there are reasons you don't already do that).


--
A man is like a rusty wheel on a rusty cart,
He sings his song as he rattles along and then he falls apart.
-- Richard Thompson
Back to top
John L
*nix forums Guru Wannabe


Joined: 17 Mar 2005
Posts: 191

PostPosted: Fri Jul 21, 2006 6:38 am    Post subject: Re: mail script Reply with quote

"eeb4u_athotmail_com" <eeb4u@hotmail.com> wrote in message news:1153461014.160759.277040@m73g2000cwd.googlegroups.com...
Quote:
I have a mailserver (Mdaemon on Windows 2003) that handles some
customer email. I used to ftp an alias file to it after processing it
on a solaris box. The aliases were created on one system, FTP'ed to my
solaris box, then I used to upload the alias file nightly to the
windows server. The solaris box had to do some manipulation of the
file to get it in a format that Mdaemon likes while retaining the
permanant aliases on the Mdaemon mail server

The alias file came form a system that is no longer used, and currently
the email aliases are generated via a crystal report. The Crystal
report can be emailed anywhere, but is mailed as an attachment.

I have set up fetchmail to retrieve the email message, but the crystal
report file (plain text file) is an attachment and I don't see a way of
viewing it.

Can anyone suggest of a way to script reading an email attachment, or
is there a simpler way of getting the report file onto a unix box for
proccessing prior to sending to my mail server.


Simplest is probably to email it straight to a shell script (or other program)
by using an alias.

It is probably irrelevant that there is an attachment. The attachment is still
part of the mail message, merely demarcated with special markers that
may or may not be respected by whatever software processes mail.

You can make simplifying assumptions, such as that only relevant email
is sent to this alias/program, and that anything not in the right format can
be simply discarded as spam (perhaps this should be forwarded to
a human who can check the right stuff is being discarded and there is
not a bug in the script).

--
John.
Back to top
Michael Heiming
*nix forums Guru


Joined: 19 Feb 2005
Posts: 1423

PostPosted: Fri Jul 21, 2006 7:28 am    Post subject: Re: mail script Reply with quote

In comp.unix.shell eeb4u_athotmail_com <eeb4u@hotmail.com>:
Quote:
I have a mailserver (Mdaemon on Windows 2003) that handles some
customer email. I used to ftp an alias file to it after processing it
on a solaris box. The aliases were created on one system, FTP'ed to my
solaris box, then I used to upload the alias file nightly to the
windows server. The solaris box had to do some manipulation of the
file to get it in a format that Mdaemon likes while retaining the
permanant aliases on the Mdaemon mail server
[..]


Quote:
I have set up fetchmail to retrieve the email message, but the crystal
report file (plain text file) is an attachment and I don't see a way of
viewing it.

Can anyone suggest of a way to script reading an email attachment, or
is there a simpler way of getting the report file onto a unix box for
proccessing prior to sending to my mail server.

Not completely sure what you are doing, but it sounds like an
easy job using procmail to send the attachment to a file and then
further process it. As others already pointed out you would ease
up things if you use some *nix box as mail server.

Good luck

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 388: Bad user karma.
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
The time now is Sun Nov 23, 2008 2:36 pm | All times are GMT
navigation Forum index » Programming » shell
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Restricting postfix mail incoming only from Barracuda firewa gnewak Postfix 0 Thu Jul 03, 2008 12:57 am
No new posts Filtering internal mail and forwarding to another domain fmaa1 Postfix 0 Wed Apr 30, 2008 12:50 pm
No new posts problem with sending mail nuxia Postfix 0 Mon Apr 21, 2008 3:58 am
No new posts mail delivery to cyrus fails embedded Postfix 0 Mon Mar 03, 2008 2:43 pm
No new posts mail forwarding loop killersushi Postfix 0 Tue Jan 23, 2007 3:43 am

Mortgage | Credit Cards | Refinance | Free Advertising | Free Advertising
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1725s ][ Queries: 16 (0.0877s) ][ GZIP on - Debug on ]