Lisa Kraft asked,
| For a very short list of names we could, of course, use:
|
| ! person1 person2 person3 ...
|
| But for a large list, this is not practical, and neither is:
|
| *0
| | formail -a "X-Loop: Mysite.COM" \
| -a "Bcc: person1(_at_)site1(_dot_)com" \
| -a "Bcc: person2(_at_)site2(_dot_)com" \
| -a "Bcc: person3(_at_)site3(_dot_)com" \
| ...etc...
| | $SENDMAIL -t
And that wouldn't work anyway; you'd need -A, not -a (or you'd get only one
Bcc: line added), and the recipe needs to start with :0, not *0.
| Is there a simple recipe that would import or cat a
| local file file with this pure text formatting:
|
| Bcc: person1(_at_)site1(_dot_)com
| Bcc: person2(_at_)site2(_dot_)com
| Bcc: person3(_at_)site3(_dot_)com
| ...etc...
Well, yes. sed can pull in an outside file. I find that this works reliably.
Include your X-Loop: header in the file as well:
:0fh
* conditions
| sed "2r file_with_additional_headers"
:0A
! -t
There are other possibilities, but none are without faults. I've never had
a problem pulling in the file after the second line: if your system adds a
Return-Path: on incoming mail, then if the From_ line has no >From_ extension
(it rarely does), you'll be placing the additional headers between
Return-Path: and the first Received: (I've never seen Return-Path: broken off
into a continuation line); if the From_ line does have a >From_ extension,
you'll be placing them between the extended From_ and Return-Path:.