Multiple recipients with sendmail


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Multiple recipients with sendmail
# 1  
Old 12-28-2010
Multiple recipients with sendmail

Hi,
I use the following to send a mail :
sendmail -v someone@box.com < /appli/oracle/rap.txt

Can I give several mail address for destination ? How ?

For exemple :
sendmail -v someone@box.com, someone2@box.com, someone3@box.com < /appli/oracle/rap.txt

Thank you.
# 2  
Old 12-28-2010
Yes, but use a space as a separator, not a comma.
# 3  
Old 12-28-2010
Normally with sendmail I create an alias and put multiple recipients email addresses in a file.

Quote:
Aliases may also have the syntax ``:include:filename'' to ask sendmail to read the named file for a list of recipients. For example, an alias such as:

poets: ":include:/usr/local/lib/poets.list"
# 4  
Old 12-29-2010
ok Neo.
how do you put the addresses in poets.list ? can you give an example of poets.list file ?
# 5  
Old 12-29-2010
Neo is quoting from "man aliases".
# 6  
Old 12-29-2010
Quote:
Originally Posted by methyl
Neo is quoting from "man aliases".
actually what Neo told was not very clear. Neo can you give an example and explain.

Thanks in advance
# 7  
Old 12-29-2010
Quote:
poets: ":include:/usr/local/lib/poets.list"
The format of this example file /usr/local/lib/poets.list is just a vertical list of mail addresses (one per line).
e.g.
Code:
user1@domain1.com
user2@domain2.com

Because the list is not held in the aliases database you don't have to rebuild the aliases database every time you change the list.
You do have to rebuild the aliases database once to get the "aliasname: :include:/filename" line into the aliases database.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Clarifying sendmail configuration - sendmail-client offline

Hi all, I have read about sendmail running as 2 separate process. 1 as a MSP, and the other as the real daemon or MTA. In my current configuration, the sendmail-client is disabled. Both submit.cf and sendmail.cf are left as default untouch I do not specified any mailhost... (3 Replies)
Discussion started by: javanoob
3 Replies

2. Shell Programming and Scripting

Mailing multiple PNG attachments using sendmail

Need assistance in using the below script and having multiple png file attachments in the same script . Your inputs are appreciated. I dont have uuencode , I use either mailx, sendmail, mpack . ( echo "to: samplemail@somewhere.com" echo "from: samplemail@elsewhere.com" echo "subject:... (2 Replies)
Discussion started by: ajayram_arya
2 Replies

3. UNIX for Dummies Questions & Answers

Problem getting mailx to send true Bcc mail to multiple recipients

I am having trouble getting mailx to send multiple Bcc mails out without everyone in the list of recipients seeing everyone else's email addresses. I looked at the man pages of my system and seem to be following the syntax correctly, but the mails still go out as if I were just putting in a list of... (7 Replies)
Discussion started by: legrandtimonier
7 Replies

4. Shell Programming and Scripting

Grep from multiple patterns multiple file multiple output

Hi, I want to grep multiple patterns from multiple files and save to multiple outputs. As of now its outputting all to the same file when I use this command. Input : 108 files to check for 390 patterns to check for. output I need to 108 files with the searched patterns. Xargs -I {} grep... (3 Replies)
Discussion started by: Diya123
3 Replies

5. UNIX for Advanced & Expert Users

Sendmail questions, SCO 5.0.6 sendmail 8.11.0

I am running SCO 5.0.6 and using sendmail 8.11.0 and having issues with smtp authentication. When trying to send mail the following message will kick back. (reason: 530 5.7.1 Authentication required) 530 5.7.1 Authentication required Not sure what needs to be tweeked in sendmail.cf but I... (1 Reply)
Discussion started by: ziggy6
1 Replies

6. UNIX for Advanced & Expert Users

Sendmail not showing recipients

I've figured out to do a mail merge with /usr/lib/sendmail which is extremely helpful as it is lightning fast compared to an Outlook mail merge which pretty much locks up my machine while it struggles to push out the emails. I figured out how to send html emails, with dynamic variables, and how... (8 Replies)
Discussion started by: MaindotC
8 Replies

7. Red Hat

Sendmail - Masquerading multiple domains with different addresses

Hello Friends, I am running Sendmail 8.14 on rhel6. I have one simple question regarding domain masquerading, i would want to masquerade different domains with different addresses. By that what i mean is that lets say i have 3 domains as home.com, example.com, test.com and i would want to... (0 Replies)
Discussion started by: Rohit Bhanot
0 Replies

8. Programming

Python: multiple email recipients

I am using a the following backup script to backup a server to USB. USBBackupScript - RdiffBackupWiki However I don't know python and would like to alter the script so I can send emails about the success or failure of the backup to multiple recipients. I did do some research but the limit... (0 Replies)
Discussion started by: jelloir
0 Replies

9. UNIX for Dummies Questions & Answers

using mailx with multiple recipients

I am trying to use a file containing email addresses in my mailx command like the following: SUBJECT="Kronos User Report" BODY="kronos.txt" MAILTO="kronosmail.txt" mailx -s "$SUBJECT" $MAILTO < $BODY This works fine for the body of the message but for the recipient it says: ... (6 Replies)
Discussion started by: sdhalepaska
6 Replies

10. UNIX for Dummies Questions & Answers

Using Sendmail for multiple domain names

Hi, We're an internet company with several domain names. Our mail server was originally set up to deal with xxx@domain1.com email addresses which works fine. The problem I have is that we're now also using a domain2.com, and sales@domain1.com isn't the same as sales@domain2.com. I've added... (1 Reply)
Discussion started by: captainash
1 Replies
Login or Register to Ask a Question