Sponsored Content
Full Discussion: Automated e-mailer problem
Top Forums Shell Programming and Scripting Automated e-mailer problem Post 302708615 by jim mcnamara on Monday 1st of October 2012 10:25:11 PM
Old 10-01-2012
assuming that sendmail -t $tmp does work to send email. I do not see where the $uid variable gets used to address email. Oh well.
bash or ksh example using your code fragment:
Code:
#!/bin/bash
cnt=0;
for uid in $members
do
   sendmail -t  < $tmp
   cnt=$(( $cnt + 1 ))
   [  $(( $cnt % 15 )) -eq 0 ]   && wait
done 
wait

This sends 15 at one pass. You may have exceeded resource limits trying to send hundreds of emails at one time. I agree with corona -sometimes we have requirements that are there for a really poor reasons. Why is there a major time constraint on this job? Or are you simply learning how to do this?

Last edited by jim mcnamara; 10-01-2012 at 11:32 PM..
This User Gave Thanks to jim mcnamara For This Post:
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

automated back up problem

Hi.. I am using HP UX 11.0 i want to make automated back up from SAM back up tool.... so i mentioned the file systems and back up device /dev/rmt/0m and time 0:00 and days of the week........ but it was not successful.....the back up job was not started on specified time..... i am in... (7 Replies)
Discussion started by: Prafulla
7 Replies

2. UNIX for Dummies Questions & Answers

Mailer Deamon Question

does somebody knows why when my IRIX system is booting it stop for more than 3 minutes in MAILER DEMOND.??? Thanks in advance for your help (1 Reply)
Discussion started by: michoacan2000
1 Replies

3. UNIX for Dummies Questions & Answers

UNIX command line mailer

What is the difference betweeen MAILX and SENDMAIL. I have SENDMAIL configured in my system, how is it different then MAILX, espicially in the syntax of sending mail from the command line. Thanks in advance (3 Replies)
Discussion started by: dctm_deve
3 Replies

4. Shell Programming and Scripting

Drop mailer-daemon mails

Hi all, I am using a Solaris 10 machine as SMTP server. All MAILER-DAEMON mails that are not delivered are getting stuck in /var/spool/mqueue . Is there any way to DISCARD/DROP/DELETE such mails automatically so that they don't pile up in my queue ? regards (1 Reply)
Discussion started by: Junaid Subhani
1 Replies
MAILER(8)						      System Manager's Manual							 MAILER(8)

NAME
mailer - script to warn users about their weak passwords SYNOPSIS
mailer password-files DESCRIPTION
This manual page documents briefly the mailer command, which is part of the john package. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. john, better known as John the Ripper, is a tool to find weak passwords of users in a server. The mailer tool is useful to inform users which have been found to be using weak passwords by mail. You should edit the message mailer will send to the users, but remember to copy the script to a safe place before editing it, as it's gen- erally a bad idea to modify things living in /usr. SEE ALSO
john(8), unafs(8), unique(8), unshadow(8). The programs are documented fully by John's documentation, which should be available in /usr/share/doc/john or other location, depending on your system. AUTHOR
This manual page was written by Jordi Mallach <jordi@debian.org>, for the Debian GNU/Linux system (but may be used by others). John the Ripper and mailer were written by Solar Designer <solar@openwall.com>. The complete list of contributors can be found in the CRED- ITS file in the documentation directory. john June 03, 2004 MAILER(8)
All times are GMT -4. The time now is 01:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy