<<< Date Index >>>     <<< Thread Index >>>

Re: local sendmail



Anders [05.Feb.2009 10:42]:

* bill lam <cbill.lam@xxxxxxxxx> [20090205 10:06]:
On Thu, 05 Feb 2009, Anders Rayner-Karlsson wrote:
> Does not work. Tried it today, and you only get a mbox that is not a
> real mbox. You can edit it by hand, inserting a blank line between the

It works for me.  I use maildir instead of mbox if it matters

I suspected it would, but had not tried. rss2email messes up the order
of the headers, so I now know what needs to be changed.

I have not tried rss2email yet, but was trying to find a way around with any kind of system-generated messages. Passing the message directly to procmail (cat "message.txt" | procmail) works fine but without any kind of header information like From Date To Subject Message-ID. So working with such kind of "email" is more like a guessing-game. You might want to pass it to formail for formatting reasons (replace any variables as you see fit):
"| formail -I "From: root" -I "To: ${EMAIL_RECIPIENT}" -I "Date: \
$(date -R)" -I "Subject: ${EMAIL_SUBJECT}" -I Message-ID: -ds procmail"

This will add (and replace!) the aforementioned headers to any input you
might give it. This will also destroy already existing header-fields, so
you might want to look into 'man formail' for additional options.

My next guess would be to put this into a small script that can be
called from rss2email or any other program you might have. It will
certainly not be very flexible in this state but yeah, you could make it
standard compliant to work with any mail snytax -- I assume :D

I also found 'mailutils', a package including 'mail.local' (GNU
mail.local -- the local MDA) which might already help you taking care of
any local or system mailing. It didnt really suit my needs so I will try
to get a small script done myself, but it might take some time due
to my lack of scripting experience.

So, if you have procmail and formail installed already, I don't see why
one would need postfix for this.

Please correct me anywhere I am wrong, I have very limited experience
concerning all this.


JP

--
Time flies like the wind, but fruit flies like bananas.