Sponsored Content
Full Discussion: Lftp mirror pattern
Top Forums UNIX for Beginners Questions & Answers Lftp mirror pattern Post 303045309 by indeed_1 on Monday 16th of March 2020 07:37:20 AM
Old 03-16-2020
Work like charm! This is exactly what I want.

Thank you so much brother Smilie
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

LFTP Mirroring

LFTP Mirroring We are planning to use lftp to mirror some of the files and directories on to the remote server. What we exactly want to do is mirror some of the directories and exclude some of the the directories from "/" i.e. main root. . What lftp is doing is... (0 Replies)
Discussion started by: sameerarora
0 Replies

2. Solaris

ZFS Mirror versus Hardware Mirror

I've looked a little but haven't found a solid answer, assuming there is one. What's better, hardware mirroring or ZFS mirroring? Common practice for us was to use the raid controllers on the Sun x86 servers. Now we've been using ZFS mirroring since U6. Any performance difference? Any other... (3 Replies)
Discussion started by: Lespaul20
3 Replies

3. Solaris

What is mirror and sub mirror in RAID -1 SVM

Hi , I am new to SVM .when i try to learn RAID 1 , first they are creating two RAID 0 strips through metainit d51 1 1 c0t0d0s2 metainit d52 1 1 c1t0d0s2 In the next step metainit d50 -m d51 d50: Mirror is setup next step is metaattach d50 d52 d50 : submirror d52 is... (7 Replies)
Discussion started by: vr_mari
7 Replies

4. UNIX for Advanced & Expert Users

lftp: Option to lftp a file, wait and download a file as soon as its created

Please let me know what is lftp options combination to wait and download a file from target as soon as its gets created. I tried with different options but not able to get it working as I need any help would be appreciated (4 Replies)
Discussion started by: bmkux
4 Replies

5. HP-UX

What is the difference between DRD and Root Mirror Disk using LVM mirror ?

what is the difference between DRD and Root Mirror Disk using LVM mirror ? (3 Replies)
Discussion started by: maxim42
3 Replies

6. Red Hat

Lftp issue

I installed KVM and configured two virtual machines in it server1.example.com(192.168.100.193) and tester1.example.com(192.168.100.230).I want to access server1.example.com from tester1.example.com over lftp.As far as networking is concerned between both I do have some doubts. I tried ping and... (5 Replies)
Discussion started by: shazgaurav
5 Replies

7. UNIX for Dummies Questions & Answers

Lftp operation

dear all, I need to get files from ftp when only files consist of words 'EUROPE' ftp sources in folder /ftp1/ftp2/ftp3/201409 files inside /ftp1/ftp2/ftp3/201409is as below 201409_EUROPE_citizen.txt 201409_EUROPE_natality.txt 201409_EUROPE_occupancy.txt 201409_ASIA_citizen.txt... (1 Reply)
Discussion started by: radius
1 Replies

8. Shell Programming and Scripting

lftp is not working.how to replace lftp with expect utility using same .cfg file.

We have lftp command inside shell file. which is intern calling .cfg file for transferring the file from one server to other. Below command to not working. lftp -e "set net:max-retries 1; set net:reconnect-interval-base 1; put -E -O /destinationdir/inbox/ /sourcedir/test.txt; bye" -u... (4 Replies)
Discussion started by: johnsnow
4 Replies

9. Shell Programming and Scripting

Error with LFTP

I use below ftp command to push the file from UNIX server to Mainframe system. (lftp -d -e "set ftp:passive-mode false; put -a ${SPOOLFILE} -o ${FNAME}; exit" -u ${id},${paswd} ${host} ) >> $ftplog To ftp the file successfully i need to get the out put for FNAME as "'filename'" (double... (5 Replies)
Discussion started by: zooby
5 Replies
MUTT_LDAP_QUERY(1)					User Contributed Perl Documentation					MUTT_LDAP_QUERY(1)

NAME
mutt_ldap_query - Query LDAP server for Mutt mail-reader SYNOPSIS
mutt_ldap_query.pl [options] <name_to_query> [[<other_name_to_query>] ...] OPTIONS
--config=config_file or -c config_file specify an alternate resource file other than the system ones (/etc/lbdb_ldap.rc or /etc/mutt_ldap_query.rc) or default personal ones ($HOME/.lbdb/ldap.rc or $HOME/.mutt_ldap_query.rc). --server=ldap_server or -ls ldap_server hostname of your ldap server. You can also use an ldap://foo[:port] or ldaps://foo[:port] URL here to talk to different ports or SSL encrypted servers. Or use ldapi://%2fvar%2flib%2fldap_sock to access an ldap server via a socket (use %2f as as replacement for a slash in the file name). --search_base=ldap_search_base or -sb ldap_search_base use <search_base> as the starting point for the search instead of the default. --search_fields=ldap_search_fields or -sf ldap_search_fields list of the fields on which the query will be performed. --expected_answers=ldap_expected_answers or -ea ldap_expected_answers list of the fields expected as the answer of the ldap server that will be used for composing the output of the script. --format_email=result_format_email or -fe result_format_email format to be used for composing the email output result. It has to be based on the expected ldap server answers and can use variable containers of the form ${variable} where variable belongs to the <ldap_expected_answers> set. --format_realname=result_format_realname or -fr result_format_realname format to be used for composing the realname output result. It has to be based on the expected ldap server answers and can use variable containers of the form ${variable} where variable belongs to the <ldap_expected_answers> set. --format_comment=result_format_comment or -fc result_format_comment format to be used for composing the comment output result. It has to be based on the expected ldap server answers and can use variable containers of the form ${variable} where variable belongs to the <ldap_expected_answers> set. --bind_dn=bind_distinguished_name or -bd bind_distinguished_name the destinguished name of the user who binds to the LDAP server. Leave it empty for an anonmyous bind. --bind_password=secret or -bp secret the bind password for binding to the LDAP server. Leave it empty for an anonmyous bind. --nickname=ldap_server_nickname or -n ldap_server_nickname shortcut for avoiding to use all the previous options by using the script builtin or alternate config file table of common servers and associated options. All the required parameters are then derived by performing a <lbdb_server_nickname> lookup. --debug or -d turn on debugging messages. --help or -? or -h or --man or -m generates this help message. --ignorant or -i ignorant mode: search using wildcard for *name_to_query* (requires a longer processing from LDAP server but is quite convenient :). --lbdb_output or -l suppress number of matches output (suited for interfacing with little brother database http://www.spinnaker.de/lbdb/). --version or -v show the version. DESCRIPTION
mutt_ldap_query performs ldap queries using either ldapsearch command or the perl-ldap module and it outputs the required formatted data for feeding mutt when using its "External Address Query" feature. The output of the script consists in 3 fields separated with tabs: the email address, the name of the person and a comment. INTERFACING WITH MUTT
This perl script can be interfaced with mutt by defining in your .muttrc: set query_command = "mutt_ldap_query.pl %s" Multiple requests are supported: the "Q" command of mutt accepts as argument a list of queries (e.g. "Gosse de Courville"). Alternatively mutt_ldap_query can be interfaced with the more generic little brother database query program (http://www.spinnaker.de/lbdb/) using: set query_command = "lbdbq %s" and by specifying in your ~/.lbdb/lbdbrc file another method of query just adding to the METHODS variable the m_ldap module e.g.: METHODS='m_inmail m_passwd m_ldap m_muttalias m_finger' and the right path to access m_ldap in MODULES_PATH, e.g. if you moved m_ldap in ~/.lbdb/modules: MODULES_PATH="/usr/local/lib $HOME/.lbdb/modules" Just make sure to use the correct path for calling mutt_ldap_query in the m_ldap script. RESOURCE FILE FORMAT
mutt_ldap_query is now fully customizable using an external resource file. By default mutt_ldap_query parses the system definition file located generally at /etc/mutt_ldap_query.rc or /usr/local/etc/mutt_ldap_query.rc and also the user one: $HOME/.mutt_ldap_query.rc. Instead of using command line options, the user can redefine all the variables using the resource file by two manners in order to match his site configuration. A file example is provided below: # The format of each entry of the ldap server database is the following: # LDAP_NICKNAME => ['LDAP_SERVER', # 'LDAP_SEARCH_BASE', # 'LDAP_SEARCH_FIELDS', # 'LDAP_EXPECTED_ANSWERS', # 'LDAP_RESULT_EMAIL', # 'LDAP_RESULT_REALNAME', # 'LDAP_RESULT_COMMENT'], # a practical illustrating example being: # debian => ['db.debian.org', # 'ou=users,dc=debian,dc=org', # 'uid cn sn ircnick', # 'uid cn sn ircnick', # '${uid}@debian.org', # '${cn} ${sn}', # '${ircnick}'], # the output of the query will be then: # ${uid}@debian.org ${cn} ${sn} ${ircnick} (i.e.: email name comment) # warning this database will erase default script builtin %ldap_server_db = ( 'four11' => ['ldap.four11.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'infospace' => ['ldap.infospace.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'whowhere' => ['ldap.whowhere.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'bigfoot' => ['ldap.bigfoot.com', 'c=US', 'givenname sn cn mail' , 'givenname cn sn mail o' , '${mail}' , '${givenname} ${sn}', '${o}' ], 'switchboard' => ['ldap.switchboard.com', 'c=US', 'givenname sn cn mail' , 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], 'infospacebiz' => ['ldapbiz.infospace.com', 'c=US', 'givenname sn cn mail', 'givenname cn sn mail o', '${mail}', '${givenname} ${sn}', '${o}' ], ); # hostname of your ldap server $ldap_server = 'ldap.four11.com'; # ldap base search $search_base = 'c=US'; # list of the fields that will be used for the query $ldap_search_fields = 'givenname sn cn mail'; # list of the fields that will be used for composing the answer $ldap_expected_answers = 'givenname sn cn mail o'; # format of the email result based on the expected answers of the ldap query $ldap_result_email = '${mail}'; # format of the realname result based on the expected answers of the ldap query $ldap_result_realname = '${givenname} ${sn}'; # format of the comment result based on the expected answers of the ldap query $ldap_result_comment = '(${o})'; EXAMPLES OF QUERIES
mutt_ldap_query.pl --ldap_server='ldap.mot.com' --search_base='ou=employees, o=Motorola,c=US' --ldap_search_fields='commonName gn sn cn uid' --ldap_expected_answers='gn sn preferredRfc822Recipient ou c telephonenumber' --ldap_result_email='${preferredRfc822Recipient}' --ldap_result_realname='${gn} ${sn}' --ldap_result_comment='(${telephonenumber}) ${ou} ${c}' Gosse de Courville performs a query using the ldap server ldap.mot.com using the following searching base 'ou=employees, o=Motorola,c=US' and performing a search on the fields 'commonName gn sn cn uid' for 'Gosse' and then "de Courville" looking for the following answers 'gn sn preferredRfc822Recipient ou c telephonenumber'. Based on this answers, mutt_ldap_query will return a list of entries identified of the form: <${preferredRfc822Recipient}> ${gn} ${sn} (${telephonenumber}) ${ou} ${c} where ${} variables should be considered as containers that are replaced by the results of the query. The previous query can be greatly simplified by using the ldap server mini database feature of the resource file introducing for example a nickname. mutt_ldap_query.pl --ldap_server_nickname='motorola' Gosse de Courville When not sure of the full name (i.e. it should contain Courville) the ignorant mode is useful since the query will be performed using wildcards, i.e. *Courville* in the following case: mutt_ldap_query.pl --ignorant Courville WHERE TO GET IT
The latest version can be retrieved at ftp://ftp.mutt.org/pub/mutt/contrib or http://www.courville.org/ Note that now the script is integrated in the latest version of the little brother database available at http://www.spinnaker.de/lbdb/. It is thus easier to use through this standard package than to hand customize it to fit your system/distribution needs. REFERENCES
- perl-ldap module http://perl-ldap.sourceforge.net/ - mutt is the ultimate email client http://www.mutt.org/ - historical Brandon Blong's "External Address Query" feature patch for mutt http://www.fiction.net/blong/programs/mutt/#query - little brother database is an interface query program for mutt that allow multiple searches for email addresses based on external query scripts just like this one 8-) http://www.spinnaker.de/lbdb/ AUTHORS
Marc de Courville <marc@courville.org> and the various other contributors... that kindly sent their patches. Please report any bugs, or post any suggestions, to <marc@courville.org>. COPYRIGHT
Copyright (c) 1998-2003 Marc de Courville <marc@courville.org>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the GNU General Public License (GPL). See http://www.opensource.org/gpl-license.html and http://www.opensource.org/. perl v5.10.1 2011-06-25 MUTT_LDAP_QUERY(1)
All times are GMT -4. The time now is 01:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy