email to group-id is failing to receive


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting email to group-id is failing to receive
# 1  
Old 01-06-2009
Java email to group-id is failing to receive

Hi all,

The below is the program i used to send a mail.

#!/bin/ksh
mailaddress=$(cat $HOME/email.txt)
(cat | mail -s "TESTING LOAD STATUS on `date`" "$mailaddress") <<EOD
ignore. this is a test mail
EOD


email.txt contains, like below
GrouptID@mail.com,IndividualID@mail.com

The problem here is,
This mail was recevied only at individual id end, it is recevied at group id.
Is there any way to send mails to group id.

My UNIX configuration is,
AIX Version: 5

Thanks.
# 2  
Old 02-03-2009
You don't send email to a "group id". You must set up a forwards or alias file, create a name for that alias (usually the group name), and list each of the members in that group. In theory, you can dynamically generate that group on a daily basis. Or, you can have an email address tied to a program, which dynmacially determines the email list.

If you are using sendmail, the file you want to edit is /etc/aliases.
# 3  
Old 06-29-2009
Hi,

I am using mail command, i am not that much aware of sendmail.

here is my script:
Code:
#!/bin/ksh
mailaddress=$(cat $HOME/email.txt)
(cat | mail -s "TESTING LOAD STATUS on `date`" "$mailaddress") <<EOD
ignore. this is a test mail
EOD

where the email.txt file contains:
Quote:
>cat $HOME/email.txt
arunprasad@mail.com,my.friends.group...garaj@mail.com
>
My script is taking the list of mail id's from email.txt file. However, the list contains a group id also and failed to send/receive. but the same was successfully received at arunprasad@mail.com - Individual mail id.

I have a question here. Is there any limitation in mail id what we are mentioning in mail command? Say for example 'my.friends.group.mail@mail.com' contains three periods - four words in a mail address. The same case is also applicable for individual mail id like 'arun.t.prasad.thangaraj@mail.com'. So i am suspecting this is not the issue with mail address type: whether group id or individual id. But seems like mail address length?

Please help me to figure out the problem.
# 4  
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

# 5  
Old 06-29-2009
Hi thanks for idea.
However, i am having this issue in production box and this is replicated in many of the scripts.
Changing mail to sendmail in all scripts is not possible.

Is there any possibilities to resolve this issue with 'mail' command?

thanks a bunch!
# 6  
Old 06-29-2009
Quote:
I am using mail command, i am not that much aware of sendmail.
This is not really the point. If you are using a "production" box, you must be aware of the underlying mail system. Anyway, refer to my original response. The problem is emailing to a group.
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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
Login or Register to Ask a Question