sendmail.cf: How can I read a .db file and search for a token?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting sendmail.cf: How can I read a .db file and search for a token?
# 1  
Old 02-18-2005
sendmail.cf: How can I read a .db file and search for a token?

Hello,

I need to write code in '/etc/mail/sendmail.cf' to verify that a string exists within a hash file ( Such as /etc/mail/key-value.db ). I've searched the web and did find many great articles regarding 'sendmail.cf' however I'm not clear how I can do this specific thing as the online sources are sketchy on this topic.

I would really appreciate any feedback you can suggest or if you have links that would be great too.

Thank You,
Devyn
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read in search strings from text file, search for string in second text file and output to CSV

Hi guys, I have a text file named file1.txt that is formatted like this: 001 , ID , 20000 002 , Name , Brandon 003 , Phone_Number , 616-234-1999 004 , SSNumber , 234-23-234 005 , Model , Toyota 007 , Engine ,V8 008 , GPS , OFF and I have file2.txt formatted like this: ... (2 Replies)
Discussion started by: An0mander
2 Replies

2. Programming

C program to read a binary file and search for a string?

Hi, I am not a C programmer. The only C exposure I have is reading and completing the exercises from the C (ANSI C ) Programming Language book:o At the moment, I am using the UNIX strings command to extract information for a binary file and grepping for a particular string and the value... (3 Replies)
Discussion started by: newbie_01
3 Replies

3. Shell Programming and Scripting

Using awk to read one file and search in another file

Hi Forum. I did some google search on what I'm trying to do but I cannot get my code to work correctly. I have 2 files which are very large and I want to read text from file1 and search in file2 - if present, keep the records. I've tried fgrep -f file1 file2 but it is too slow. File1:... (10 Replies)
Discussion started by: pchang
10 Replies

4. Shell Programming and Scripting

perl- read search and replace string from the file

Dear all, I have a number of files and each file has two sections separated by a blank line. At the top section, I have lines which describes the values of the alphabetical characters, # s #; 0.123 # p #; 12.3 # d #; -2.33 # f #; 5.68 <blank line> sssssss spfdffff sdfffffff Now I... (4 Replies)
Discussion started by: sasharma
4 Replies

5. Shell Programming and Scripting

Want to read data from a file name.txt and search it in another file and then matching...

Hi Frnds... I have an input file name.txt and another file named as source.. name.txt is having only one column and source is having around 25 columns...i need to read from name.txt line by line and search it in source file and then save the result in results file.. I have a rough idea about the... (15 Replies)
Discussion started by: ektubbe
15 Replies

6. Shell Programming and Scripting

to read two files, search for patterns and store the output in third file

hello i have two files temp.txt and temp_unique.text the second file consists the unique fields from the temp.txt file the strings stored are in the following form 4,4 17,12 15,65 4,4 14,41 15,65 65,89 1254,1298i'm able to run the following script to get the total count of a... (3 Replies)
Discussion started by: vaibhavkorde
3 Replies

7. Shell Programming and Scripting

Read/Search file being written to giving error due to timing issues

The following is a piece of code to rename LOG_FILE_NEW to LOG_FILE once you get a result (either RUNNING or SHUTDOWN) RESULT="" sleep 30 while ; do sleep 10 RESULT=`sed -n '/RUNNING/'p ${LOG_FILE_NEW}` if ; then RESULT=`sed -n '/SHUTTING_DOWN/'p ${LOG_FILE_NEW}` fi done mv... (3 Replies)
Discussion started by: sonorous
3 Replies

8. Shell Programming and Scripting

Read a file and search a value in another file create third file using AWK

Hi, I have two files with the format shown below. I need to read first field(value before comma) from file 1 and search for a record in file 2 that has the same value in the field "KEY=" and write the complete record of file 2 with corresponding field 2 of the first file in to result file. ... (11 Replies)
Discussion started by: King Kalyan
11 Replies

9. Shell Programming and Scripting

Read each word from File1 and search each file in file2

file1: has all words to be searched. 100007 200999 299997 File2: has all file names to be searched. C:\search1.txt C:\search2.txt C:\search3.txt C:\search4.txt Outfile: should have all found lines. Logic: Read each word in file1 and search each file in the list of File2; if the... (8 Replies)
Discussion started by: clem2610
8 Replies

10. Shell Programming and Scripting

Korn Shell Script - Read File & Search On Values

I am attempting to itterate through a file that has multiple lines and for each one read the entire line and use the value then to search in other files. The problem is that instead of an entire line I am getting each word in the file set as the value I am searching for. For example in File 1... (2 Replies)
Discussion started by: run_unx_novice
2 Replies
Login or Register to Ask a Question
mailstats(1)							   User Commands						      mailstats(1)

NAME
mailstats - print statistics collected by sendmail SYNOPSIS
mailstats [-o] [-c ] [-C configfile] [-f statisticsfile] [-p] [-P] DESCRIPTION
The mailstats utility prints out the statistics collected by the sendmail(1M) program on mailer usage. These statistics are collected if the file indicated by the StatusFile configuration option of sendmail (defined in /etc/mail/sendmail.cf) exists. The default statistics file is /etc/mail/statistics. To enable mailstats, you must, as root, touch /etc/mail/statistics. See the StatusFile processing option in sendmail(1M). mailstats first prints the time that the statistics file was created and the last time it was modified. Then, the statistics for each mailer are displayed on a single line, each with the following whitespace-separated fields: M The mailer number. msgsfr Number of messages from the mailer. bytes_from Kbytes from the mailer. msgsto Number of messages to the mailer. bytes_to Kbytes to the mailer. msgsrej Number of messages rejected by the mailer. msgsdis Number of messages discarded by the mailer. msgsqur Number of messages quarantined by the mailer. Mailer The name of the mailer. The display of statistics described above is followed by a separation line containing only equal sign (=) characters. After the separation line, a line preceded with a "T" and totaling the values for all of the mailers is displayed. This is followed by another line preceded with a "C" that lists the number of TCP connections. To reinitialize the statistics file once a night, add an entry to root's crontab(1): mailstats -p > /dev/null OPTIONS
The following options are supported: -c Try to use submit.cf instead of the default sendmail configuration file. -C configfile Specify a sendmail configuration file. -f statisticsfile Specify a sendmail statistics file. -o Do not display the name of the mailer in the output. -p Output information in program-readable mode and clear statistics. -P Output information in program-readable mode without clearing statistics. USAGE
See largefile(5) for the description of the behavior of mailstats when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes). FILES
/dev/null Zero-lined file /etc/mail/statistics Default sendmail statistics file /etc/mail/sendmail.cf Default sendmail configuration file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsndmu | +-----------------------------+-----------------------------+ |Output Stability |Unstable | +-----------------------------+-----------------------------+ SEE ALSO
crontab(1), cron(1M), sendmail(1M), attributes(5), largefile(5) SunOS 5.11 24 Jun 2004 mailstats(1)