Ralf Hildebrandt skrev 2010-10-18 14:43:
* Patric Falinder<patric.falin...@omg.nu>:
Hi,

I'm not really sure if this has to do with Postifx so just tell me if
I'm wrong.

Is it possible to resend emails that are in a Maildir already?

Yes.

#!/bin/sh

#
#  verschickt die gesamte Mail eines Benutzers an $1
#
USAGE="usage: $0 u...@domain"

if test $# != 1
then
        echo $USAGE
        exit 1
fi

if  ! grep @<<STOP>  /dev/null
$1
STOP
then
        echo $USAGE
        echo No @ in Mail-address
        exit 1
fi

if !  test -d new -a -d cur -a tmp
then
        echo You are not in Maildir
        echo there is no new cur tmp
        exit 1
fi


find cur new tmp -type f | xargs --replace /usr/local/scripts/send_mail $1 {}


----
/usr/local/scripts/send_mail
----
#!/bin/sh
/usr/local/sbin/mini_sendmail -syour.mail.host -p25 -fnob...@charite.de $1<  
$2&&  rm -f $2

Thanks a lot, will try that! :)

-Patric

Reply via email to