01-15-2007
Ok guys it worked like magic
Here is the final thing. The "sleep 1" is for reducing the no of concurrent lookups on the LDAP server.
-----
#!/bin/bash
sleep 1
LDAP_LOOKUP='/var/qmail/bin/qmail-ldaplookup -m '
GOODMAILADDR='/var/qmail-outside/control/goodmailaddr'
export $LDAP_LOOKUP $GOODMAILADDR
t=`echo $1|cut -d "@" -f2`
k=`grep "^@$t$" $GOODMAILADDR`
if [ $? -eq 1 ]; then
$LDAP_LOOKUP $1
else
echo "this is a external address"
exit 0
fi
-----
Warm Regards
Ram
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
How do I send an email using malix where email address contains a #.
I have a email address like this : #test@test.com
I want to send email like malix -s "TEST" #test@test.com < SOMEFILE
I tried \# but doesn't work. Please let me know how we can achieve this?
I am in... (1 Reply)
Discussion started by: jingi1234
1 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have a script I want to run as a background process. Where would I add a bit of script so that a check can be performed to see it this is already running and, where it isn't, to then run it? I know how to do this... I just don't know where I can put the initial part of the check script so... (2 Replies)
Discussion started by: miwinter
2 Replies
3. Shell Programming and Scripting
Hi,
Can anyone provide me the code snippet for EMail Address Validation.
User is going to enter the email address in form window. I need to validate the format is correct.
Thanks in Advance
BS (3 Replies)
Discussion started by: balajiora
3 Replies
4. Shell Programming and Scripting
Hi folks
I need to write UNIX script (with ldapsearch) to query Active Directory. Input is NT login name and output is Email address.
Attached a screenshot of Sysinternals "AD Explorer". I need to do the same in CLI.
http://i.imgur.com/4s6FB.png
I am absolute LDAP/ldapsearch noob. (0 Replies)
Discussion started by: slashdotweenie
0 Replies
5. Shell Programming and Scripting
we have 4000 html pages that need an email address changed.
eg) company@yahoo.com to company@hotmail.com
we only want the file modified date to be changed when there has been a change to the file.
Should I be using grep?
I fairly new to UNIX and was told to using something like... (2 Replies)
Discussion started by: mchelle_99
2 Replies
6. Shell Programming and Scripting
Hi eveyone
I am planning to use crontab to delete all files in my donwloads directory that are older than one hour
I will be using crontab to run this script
find /home/kee/downloads/* -daystart -mmin +59 -type f -name -exec rm -r {}\;
could you please let me know if the above... (1 Reply)
Discussion started by: k33k00
1 Replies
7. Shell Programming and Scripting
Hello all, I have a requirement to send an email from a shell script. Simple enough. A google search gives thousands of examples. But here's the catch. I need to be able to specify the "from" address, and none of the examples I've found allow for that.
When I used the mail or mailx commands,... (2 Replies)
Discussion started by: lupin..the..3rd
2 Replies
8. Shell Programming and Scripting
hello i have writing a shell script to download and run some packages
the only way that i use to verify download pack is , limit users ip to download from main server, if wget can download file (verified) then script run by execute it sh pack76.sh
else show and error
(stupid solution ha?)
... (8 Replies)
Discussion started by: nimafire
8 Replies
9. Shell Programming and Scripting
Hello again unix.com
I need some help regarding a script.
I have:
function checkform ( form )
{
if (form.pass.value.length < 6) {
alert( "Error." );
form.pass.focus();
document.getElementById('pass').style.backgroundColor="#FFFFFF";
return... (2 Replies)
Discussion started by: galford
2 Replies
10. OS X (Apple)
Hi guys!
Me again! ...
I'm trying to build (on MacOS directly) a bash script that will help me verify a SHA1 digest (to verify downloads and so on and so forth).
So first off, here's my version of BASH under OSX:
bash-4.4$
And here's my version of Sierra (macOS):
10.12.3 (16D32)
... (2 Replies)
Discussion started by: Ardzii
2 Replies
LEARN ABOUT SUSE
avahi-autoipd.action
avahi-autoipd.action(8) System Manager's Manual avahi-autoipd.action(8)
NAME
avahi-autoipd.action - avahi-autoipd action script
SYNOPSIS
/etc/avahi/avahi-autoipd.action
DESCRIPTION
avahi-autoipd.action is the action script that is called whenever an IP address has been acquired by avahi-autoipd or when it detected an
IP address conflict. The script should add or remove the specified address from the specified network interface.
PARAMETERS
argv[1] An event string: one of BIND, CONFLICT, UNBIND or STOP. If BIND is passed an IP address has been sucessfully acquired and the
script shall add it to the network interface. If CONFLICT is passed avahi-autopid detected a IP address on the local network, the action
script should remove the configured IP address. If UNBIND is passed the IP address should be removed from the interface, too, because a
routable address has been configured to the interface by some other program. If STOP is passed the avahi-autoipd is being shutdown and the
action script should remove the IP address. In short: on BIND the address should be added to the interface, on CONFLICT, UNBIND or STOP it
should be removed.
argv[2] The network interface name.
argv[3] An IP address from the IPv4LL range.
AUTHORS
The Avahi Developers <avahi (at) lists (dot) freedesktop (dot) org>; Avahi is available from http://avahi.org/
SEE ALSO
avahi-autoipd(8), dhclient-script(8), ip(8), ifconfig(8)
COMMENTS
This man page was written using xml2man(1) by Oliver Kurth.
Manuals User avahi-autoipd.action(8)