procmail
[Top] [All Lists]

Re: Procmail/Perl and locking

2004-07-14 05:01:39
On Wed, Jul 14, 2004 at 01:46:22PM +0200, Sven Schmitt wrote:

I made a Perl script which converts some filecontent into several
emails. At the end of the script, I have a bunch of emails stored in a
variable (formatted like a standard mailbox). So far, everything works
perfect.

All left to do is to append the content of the variable to the mailbox.
...
Now I wonder if the above Perl code will be safe, or if there
still is the chance that I run into Procmail/Perl file access problems.
If so, has anybody a better idea (or link)?

I'd suggest you use procmail for local delivery, rather than rolling
your own.  Parse the variable, feed each message to procmail.  If you
want your code to be flexible enough to handle multiple environments and
future upgrades (who knows -- perhaps a user really want to store things
in Maildirs instead of mbox), then you should let procmail do its job.

To make the process easier, perhaps store each email in an array element
rather than appending them to a single variable.  But I'm no perl guru,
I can't give you code examples.

-- 
  Paul Chvostek                                             
<paul(_at_)it(_dot_)ca>
  Operations / Abuse / Whatever
  it.canada, hosting and development                   http://www.it.ca/


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>