Sponsored Content
Top Forums Shell Programming and Scripting email to group-id is failing to receive Post 302329643 by kshji on Monday 29th of June 2009 06:04:10 AM
Old 06-29-2009
You can use sendmail client to send mail. Only need to look where is your sendmail.
Using sendmail give more ... here is example to use sendmail. In this example you can put many emails on same line using , delimeter or put every email in the own line = better, everyone get individual mail.
Code:
#!/usr/bin/ksh
MessageFile="xxx.txt"
SM="/usr/lib/sendmail -t -i"
Sender="my.address.what.ever@some.subdomain.company.domain"
Subject="Something"
BackupMailBox="someaddress@some.domain"
Timestamp=$(date '+%Y-%m-%d %H:%M:%S')
message="Hello world"

for To in $(cat $HOME/email.txt)
do
$SM <<EOF
To: <$To>
Bcc: <$BackupMailBox>
From: <$Sender>
Subject: $Subject $Timestamp

$Timestamp

$message

$(cat $MessageFile 2>/dev/null)

EOF
done

 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Can send but not receive email

Hi, One of the users in our company can send but not receive email. We are using SENDMAIL in conjunction with procmail. The funny thing is that all his sent email is in his /var/spool/mail but the email client does not pick anything up! He is using IMAP. Anyone see have any ideas? (2 Replies)
Discussion started by: mojoman
2 Replies

2. UNIX for Dummies Questions & Answers

new to ldap, send email to a ou or group, and see a list from email client

hi, i'm running openldap on ubuntu 10.04, creating new items with apache directory studio (windows version). i use the ldap just as an address book to our small office (email clients are windows live mail 2009, 2011, microsoft outlook 2007 and 2010). a. i cant see a list of the contacts,... (0 Replies)
Discussion started by: V4705
0 Replies

3. Shell Programming and Scripting

Run a script when I receive an email

Hi expert I wish to start a shell script when I receive an email. I modified the aliases file and I add this string as400nag: "|/home/nag-script/startstop/AS400-Boot.sh The solution works . When the as400nag user receive an email the /home/nag-script/startstop/AS400-Boot.sh starts .but... (3 Replies)
Discussion started by: emi65
3 Replies

4. Forum Support Area for Unregistered Users & Account Problems

Have yet to receive activation email

Good Afternoon, I attempted to register on this forum yesterday using the username 'DBirks', however I have yet to receive the required activation email. I have checked both my inbox and junk e-mail folder on my email client as well as on owa, but I have not seen any sign of it. I have... (1 Reply)
Discussion started by: Unregistered
1 Replies

5. HP-UX

Unable to receive mails from email relay server

Hi, I have reports that are generated in one server (10.61.1.108), hostname l28bi01. These reports are supposedly sent to a group of email addresses hourly via an email relay server. However, this is not happening. In sendmail.cf in bi01, the DS Smart Relay Host ip address is: ... (3 Replies)
Discussion started by: anaigini45
3 Replies

6. Shell Programming and Scripting

Check email successful sent and receive

We have a unix/linux server , that send mass email from it , the emails will pass the smtp gateway , email server and sent to the client , but sometimes the client do not receive the mail , we do not know the reason and when it will happen . We would like to have a script that check when the... (2 Replies)
Discussion started by: ust4
2 Replies
SENSIBLE-MDA(8) 					      System Manager's Manual						   SENSIBLE-MDA(8)

NAME
sensible-mda - a generic local MDA router for Debian systems SYNOPSIS
sensible-mda from to detail client-addr DESCRIPTION
sensible-mda is used to simplify the installation and configuration of sendmail(8) , or other MTAs for use on Debian systems. With sensi- ble-mda, sendmail can support a plethora of MDAs (procmail, maildrop, deliver, etc.) without having pick any one of them as required. FUNCTION
sensible-mda is called by sendmail as a local mailer when the following exists in sendmail.mc: define(`LOCAL_MAILER_ARGS', `sensible-mda $g $u $h ${client_addr}')dnl sensible-mda will look for the following MDAs (in this order), and pass the mail on to the first SUID MDA found (Or first found MDA, if run w/euid=root): procmail(1), maildrop(1), deliver(8), mail.local(8) OPTIONS
Available command line options are the following: from The sender of this email (sendmail $g variable) to The recipient of this email (sendmail $u variable) detail The detail portion of the recipient userid (sendmail $h variable) - ie: cowboy+sendmail@debian.org client-addr TCP/IP address of the sender (sendmail ${client_addr} variable) Not used (for the nonce) FILES
/etc/mail/sendmail.mc sendmail m4 input to generate sendmail.cf /etc/mail/sendmail.cf actual sendmail configuration file (treated as a binary file) SEE ALSO
sendmail(8), procmail(1), maildrop(1), deliver(8), mail.local(8) BUGS
None known so far. AUTHOR
Richard Nelson <cowboy@debian.org> HISTORY
4th Berkeley Distribution October 21 1999 SENSIBLE-MDA(8)
All times are GMT -4. The time now is 02:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy