Prev: tv card not detected; new motherboard [updated]
Next: Address a specific keyboard for IOCTL cmd execution for LED test
From: Manuel Rodriguez on 21 May 2010 08:09 Hi, I have a long plain-text-file (200kb) with a mass-e-mailing: To: a(a)a.com Hi, its a nice day --- To: b(a)b.com Hi, its a nice day --- To: c(a)c.com Hi, its a nice day --- My aim is to use this as input for sendmail. It looks like spam, but it isn't -- its my curiculum vitae which i wanna send to 20 corporations. I have read a little bit in the sendmail manual "man sendmail" but i didn't find a solution. Hints? Thank you in advance.
From: The Natural Philosopher on 21 May 2010 08:43 Manuel Rodriguez wrote: > Hi, > I have a long plain-text-file (200kb) with a mass-e-mailing: > > To: a(a)a.com > Hi, its a nice day > --- > To: b(a)b.com > Hi, its a nice day > --- > To: c(a)c.com > Hi, its a nice day > --- > > My aim is to use this as input for sendmail. It looks like spam, but > it isn't -- its my curiculum vitae which i wanna send to 20 > corporations. I have read a little bit in the sendmail manual "man > sendmail" but i didn't find a solution. Hints? > > Thank you in advance. use sendmail (or mail) with a command line of the recipients and the message in stdin.
From: unruh on 21 May 2010 11:23 On 2010-05-21, Manuel Rodriguez <aa5(a)gmx.net> wrote: > Hi, > I have a long plain-text-file (200kb) with a mass-e-mailing: > > To: a(a)a.com > Hi, its a nice day > --- > To: b(a)b.com > Hi, its a nice day > --- > To: c(a)c.com > Hi, its a nice day > --- > > My aim is to use this as input for sendmail. It looks like spam, but > it isn't -- its my curiculum vitae which i wanna send to 20 And who says your CV is not spam? And if you start your message with the above, it sure is spam. > corporations. I have read a little bit in the sendmail manual "man > sendmail" but i didn't find a solution. Hints? mailman? > > Thank you in advance.
From: Maxwell Lol on 21 May 2010 17:33 Manuel Rodriguez <aa5(a)gmx.net> writes: > Hi, > I have a long plain-text-file (200kb) with a mass-e-mailing: > > To: a(a)a.com > Hi, its a nice day > --- > To: b(a)b.com > Hi, its a nice day > --- > To: c(a)c.com > Hi, its a nice day > --- > > My aim is to use this as input for sendmail. Create a mailing list. just add a few lines in your /etc/aliases file like this: mylist: :include:/etc/lists/addresses owner-list: your(a)mail.address where addresses contains --------------snip------- a(a)a.com b(a)b.com --------------snip------- type "newaliases" after you make this modificaiton. Then send mail so that the To: file is your address the BCC: field is "mylist" This way - the name of the mailing list is not in the To: field, and if peoiple reply, it does not go to everyone. Just to you. Test it first with a few test addresses to make sure.
From: Chris Davies on 6 Jun 2010 09:26
Manuel Rodriguez <aa5(a)gmx.net> wrote: > I have a long plain-text-file (200kb) with a mass-e-mailing: > To: a(a)a.com > Hi, its a nice day > --- > To: b(a)b.com > Hi, its a nice day > My aim is to use this as input for sendmail. [...] Sendmail won't have a clue about this. It understands individual email messages and delivers those individually. Take a look at something like csplit to split the file on the /^---/ pattern, and then a for loop to pipe each message into sendmail. If the file really does contain this sort of stuff then you'll need to rip out the To: line (or better, follow it with a blank line). **UNTESTED** something like this FROM_ADDR='my.email(a)address' FROM_NAME='My Name' SUBJECT='Subject of email message' csplit -ksz mass-emails-file '/^---/' '{*}' for F in xx?? do TO=`head -1 "$F" | sed 's/^To: *//'`` ( echo "From: $FROM_NAME <$FROM_ADDR>" echo "To: $TO" echo "Subject: $SUBJECT"; echo sed 1d "$F" ) | sendmail -f "$FROM_ADDR" "$TO" rm -f "$F" done Most sendmails will automatically add the Date and Message-id fields, but some won't, so be aware of this potential issue. I *strongly* recommend you test this without sendmail but with a dummy script that only pretends to send the email. Chris PS What's the relevance of "csv" in the subject? |