View Single Post

  #3 (permalink)  
Old 01-24-2008
silvietta
 
Posts: n/a
Default Re: dotqmail problem

On 22 Gen, 09:11, silvietta <sylvie.labruy...@gmail.com> wrote:
> > :
> > : Yes. I have a large number of dotqmail files doing mail to netnews
> > : gating by way ov a pipe to python scripts for further processing, for ex
> > :
> > : |preline $HOME/mail2news.py
> > :
> > :
> > : as the only line in the dotqmail for the mailing list "subscriber"

>
> > But note that this only works for an address like
> > myusername-whatever and the dotqmail file is .qmail-whatever

>
> > You'll need to play with aliases for your other forms of redirection
> > which are not dotqmail based

>
> Thank you Howard!
> I was thinking about a shell script to process the FROM field of
> incoming mail lookimg for "root" word (I need to receive on one of my
> cellphone-manageables e-mail accounts LDAP messages coming from a
> script when I'm nor at job neither at home or in a place where I can
> log over the internet ... like when I go to the mountains ;-) ).
> I'll try and I'll let you know.
>
> Sil


Sorry, another problem is rising now:

suppose my primary e-mail address (managed by qmail) is
silvia@mydomain.it and suppose I want to receive messages from
root@ldap.mydomain.it (sent from cron to silvia@mydomain.it) also in,
say, silvia@gmail.com, I must create a .qmail-silvia file this way:

/home/vpopmail/domains/mydomain/D/silvia/Maildir/ # this way I
get normally all my messages
| /home/silvia/copymsgs #
where copymsgs is a shell script to forward root@ldap... 's messages
to silvia@gmail.com

right?

The problem now is how to write the script itself; I try to better
explain: I was thinking to write something like this (1st thing that
came to my mind):

cat <message> | grep root@ldap > root.txt
if [ -s root.txt ] then <forward>
fi
rm -f root.txt

but ... how tell the script on which file doing the cat command?
and ... how to tell qmail to forward if the test doesn't fail?

Thank you and best regards,

Sil

Reply With Quote