Sponsored Content
Top Forums Shell Programming and Scripting Email address verification script Post 302102899 by Ramdas on Monday 15th of January 2007 01:51:37 AM
Old 01-15-2007
Ok guys it worked like magic Smilie

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

Send email where # is in the email address - Using Unix

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

Verification of a script already running - where to do it

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

EMail Address Validation (Shell Script)

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

UNIX Script to query Active Directory: give cn (NT login name) and receive mail (Email address)

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

how to write script to change email address

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

Script Verification

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

Sending email from a script & specifying the "from" address

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

Verification on shell script

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

Field verification script help

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)

SHA1 verification script

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
qmail-start(8)						      System Manager's Manual						    qmail-start(8)

NAME
qmail-start - turn on mail delivery SYNOPSIS
qmail-start [ defaultdelivery [ logger arg ... ] ] DESCRIPTION
qmail-start invokes qmail-send, qmail-lspawn, qmail-rspawn, and qmail-clean, under the proper uids and gids. These four daemons cooperate to deliver messages from the queue. qmail-start arranges for qmail-send's activity record to be sent to qmail-start's output. See qmail-log(5) for the format of the activity record. Other than this, qmail-start does not print anything, even on failure. If defaultdelivery is supplied, qmail-start passes it to qmail-lspawn. If logger is supplied, qmail-start invokes logger with the given arguments, and feeds qmail-send's activity record through logger. Environment variables given to qmail-start will eventually be passed on to qmail-local, so make sure to clean up the environment if you run qmail-start manually: # env - PATH="/var/lib/qmail/bin:$PATH" qmail-start ./Mailbox splogger qmail & (all on one line) Resource limits, controlling ttys, et al. are also passed from qmail-start to qmail-local. Note that qmail-send normally juggles several simultaneous deliveries. To reduce qmail-send's impact on other programs, you can run qmail- start with a low priority. SEE ALSO
logger(1), splogger(1), nice(1), qmail-log(5), qmail-local(8), qmail-clean(8), qmail-lspawn(8), qmail-rspawn(8), qmail-send(8) qmail-start(8)
All times are GMT -4. The time now is 06:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy