SUMMARY: DNS original/prefer

From: Mike's List <mikelist_at_sky.net>
Date: Wed Dec 05 2001 - 11:40:11 EST
Thanks to John/Nicholas/Jerry...basically it does not matter which format
you have it in as long as all the correct syntax is all there...


- Mike

On Wed, 5 Dec 2001, Mike's List wrote:

> Below is the original format for BIND and prefer format, is there any
> problem with the prefer format?  Does BIND needs each line the way it
> is in original or it does not matter?  (just trying to keep things
> readable/manageable)
> 
> Thanks.
> 
> 
> - Mike
> 
> 
> Original format:
> ---------------
> zone "domain.com" {
>         type master;
>         file "domain.com.zone";
> };
> 
> Prefer format:
> -------------
> zone "domain.com" { type master; file "domain.com.zone"; };
> _______________________________________________
> sunmanagers mailing list
> sunmanagers@sunmanagers.org
> http://www.sunmanagers.org/mailman/listinfo/sunmanagers
> 

From Vipin Sharma - EDS Datacenter Contractor
 <Vipin.Sharma@Sun.COM>  Wed Dec  5 17:14:42 2001
From: Vipin Sharma - EDS Datacenter Contractor
 <Vipin.Sharma@Sun.COM> (Vipin Sharma - EDS Datacenter Contractor)
Date: Wed, 5 Dec 2001 12:14:42 -0500 (EST)
Subject: SUMMARY: auto extracting mail attachment
Message-ID: <200112051707.MAA24136@matrix.East.Sun.COM>

Thanx to all who tried to help and the hint from Owens Blaine works for me, his 
hint was

#!/bin/ksh
cat | munpack

After this I was able to write my own script to get the explorer output through  
mail and extract it from mail, unzip and put it in a dir on the system.

Dirk-Willem van Gulik -

Check out the mpack/mupack tools. I use them with procmail and they work
great for exactly this.
Dw

Glass, David - I didnt try this but its a good explanation

Vipin

Hi. I needed to do this a while ago (extract a mail and delete it). I
haven't got the details with me but, if I remember correctly, I searched
through the mail file until I found a section with the correct header. I
used ed to write out a section of theis file and the to delete that section.

I don't know how familiar you are with ed but it can be run a bit like an
automated vi session so you are editing the original file, not like sed
where you have to start making copies. Although if you don't need to delete
the original mail then it is much easier.

If you just want to extract the mail to a separate file you could use
something like:

awk '{if($1=="Subject:" && $2=="test")s=1;if(s==1 &&
$0=="")s=2;if($1=="From")s=0;if(s==2)print}' /var/mail/yourname > newfile

Where the mail has the subject "test". You will need read access to the mail
file. If you need to do anything more fancy then let me know and I can give
you some pointers.

Cheers
David

Mark mbergman@merctech.com - suggested formail and procmail

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
My original post was

Hi Gurus,

I have a scenario in which I am sending a mime attachment mail to an account on 
a system2 and I want that the attachment should be extracted from the message 
and saved in a file on system2 without user intervention.
Does any body has any idea how it can be done with a script.
To start with I have to write a script and in /etc/mail/aliases I can mention 
that script against the account e.g

abc_account: "|/home/scripts/xyz.sh"

So that whenever I will send a mail from system1 to abc_account@system2 it will 
execute xyz.sh script but I dont know how to start writing this xyz.sh
For mime I can use munpack to extract that attachment from mail but question is 
how to get that mail in script so that I can say "munpack $file".


Thanx
Vipin
Received on Wed Dec 5 16:40:11 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:32:37 EDT