Re: [exim] Batch SMTP or text-files as input or text-to-queu…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Graeme Fowler
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Batch SMTP or text-files as input or text-to-queue insertion
On Wed 04 Jan 2006 23:52:52 GMT , Andre Turpin <andreturpin@???> wrote:
> I've got some text files outputted from our billing systems that are rather
> pretty, and I'm looking to email these to each customer. They look like the
> following. Don't make too much fun, but we used to use a program called Sims
> on a Macintosh, and we could just drop the text files in the queue directory
> and it would process them and send them off (slowly...but it worked). Now
> I'm trying to do something similar with Exim 4.54.

[snip]

As long as the messages themselves conform to RFC2822 and contain all
the relevant header lines, you should be able to drop them in a
specific (_not_ the spool directory) directory on the mail server, and
then run something like this from a cron job.

#!/bin/sh
# maybe include some error trapping to generate a run report
# which could be mailed to the administrators
#
for FILE in /path/to/files/*
do
/path/to/exim -bm -t -oi < $FILE
done
# EOF

Which takes each message in turn, then pumps it through as a
locally-generated message on standard input (-bm), sender/recipient(s)
taken from From:/To:/Cc:/Bcc: lines in message header (-t), terminating
the message on EOF rather than a single . (-oi).

Hope that helps.

Graeme