qmail <[EMAIL PROTECTED]> wrote:
> 
> I need to redirect all unrecognized messages for a virtual domain to a
> directory where another program(maildirsmtp) will catch it and send it to
> another mailserver.
> 
> To let the unrecognized messages into the specified directory, i'm using
> the following .qmail-default command line:
> 
> | preline -f sed -n p > ./some_user/Maildir/new/mail-"$$"
[...] 
> I'd like to ask you: is this procedure dangerous? There is the possibility
> of loosing messages, receive attacks, or something I can't imagine now?

Yes.  You said $$ was the PID; that can wrap (especially if you're on a system
with 15- or 16--bit PIDs), and you get a filename collision -- and lose mail.

> You can ask me " Why don't you use the "| forward ..." command?"
> Because it makes the $SENDER of the messages turn to the forwarded user
> when resending the messages - and this doesn't fit my needs. I need the
> original $SENDER of the messages preserved when sending the messages again
> with the maildirsmtp.

So why not do something like ``NEWSENDER="$SENDER" forward ...'' ?

Charles
-- 
-----------------------------------------------------------------------
Charles Cazabon                            <[EMAIL PROTECTED]>
GPL'ed software available at:  http://www.qcc.sk.ca/~charlesc/software/
Any opinions expressed are just that -- my opinions.
-----------------------------------------------------------------------

Reply via email to