On Thu, 6 Oct 2005, Dallman Ross wrote:
On Thu, Oct 06, 2005 at 07:56:48AM -0700, saravanan ganapathy wrote:
Now I have to test with maildir format.Since each mail
has its own filename , I don't know how to copy the
file ( where the mail is just delivered) to multiple
servers.
Any help?
Again, its name is stored in $LASTFOLDER, and it is
accessible to you via the TRAP setting, among other ways.
Another way would be to make the delivery a cloning recipe,
so we can now manipulate $LASTFOLDER in a subsequent recipe.
:0 c
$DEFAULT # assume maildir format
:0 A w
| cp -p "$LASTFOLDER" "/wherever"
cp(1) works on local server (if no NFS), Saravanan wants
to copy file to multiple servers. Do it by script which
calls to scp(1):
...
for i in server1 server2 server3 ...
do
scp -B -p "$LASTFOLDER" $i:/wherever
done
The scp must run in batch mode and maybe you will need to
set the ssh-agent variables in the shell. If you want FTP
you must write the passwd as _plan_text_ in the script!
...
for i in server1 server2 server3 ...
do
ftp -vin <<- EOftp
open $i
user theusername abrakadabra
cd /wherever
put
bye
EOftp
done
Bye,
Udi
:0 e
{ LOG = ERROR }
Or something.
Dallman
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
+++++++++++++++++++++++++++++++++++++++++++
This Mail Was Scanned By Mail-seCure System
at the Tel-Aviv University CC.
---------------------------------------------------------------------------
Udi Mottelo - Unix System Administrator.
Faculty of Engineering - Tel-Aviv University
E-Mail: <uuddii(_at_)eng(_dot_)tau(_dot_)ac(_dot_)il> Phone: +972-3-6409446
PGP/GPG public-kye: http://www.eng.tau.ac.il/~uuddii/pgp/public.asc
---------------------------------------------------------------------------
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail