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

Re: local sendmail



Patrick [05.Feb.2009 15:19]:

* Patrick Shanahan <ptilopteri@xxxxxxxxx> [02-05-09 09:08]:

No, you do not *need* postfix, but your MDA *must* deliver to procmail
in some manner.  You may process the mail with procmail:
  formail -ds procmail -m <recipe.file> <mail.file>
  formail -ds procmail <mail.file>
The crux is that the MDA *must* deliver to procmail.


Do you mean MTA or MUA? I thought procmail would be the MDA.

On further thought, or whatever that process should be called, the
above is not entirely true.  It is quite possible to accept the mail
whereever your MDA places it, I assume it is consistent and in one
place, and run a cron job to have that place/file processed via
procmail and delivered to *different* location/file.  Then just don't
access the location that the MDA delivers with your email client.

Well, I am not sure if I do get your point, but why not just tell the
program, whos output you like to get, to direct all such traffic to a
script? Either specify the email command in a config file (at best) or
get into the source code and change it as mentioned before.

In my case, just using msmtp that is, there is no executable called
'mail' installed. This of course might be different with other MTAs or
other software. So I would go about putting a very simple script
together as a replacement for mail. Ideally, it will accept the
standard mail options like recipient or subject and pass all that
information first to formail and then to procmail (error handling left
aside). It surely is not as beautiful or flexible as other approaches,
but it might just do it.

Help me where I am wrong.


JP

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