Hy all,
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-"$$"
=> "| preline -f": creates the two message header lines maildirsmtp needs
to work and feeds the standard input of the next command(sed).
=> "sed -n p > ./...": just print what it reads from the standard input to
the stout, which I'm redirecting to a file. This makes the "deliver" of the
unrecognized messages to the specified directory.
=> "mail-"$$"": is the file name that sed will attribute to the messages. I
chase $$(the runnig process PID number) in order to the arriving messages
don't overwrite each other.
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?
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.
Thank you all,
Bruno