Hi List,
Sorry for my bad englisch but I have a very difficult (for me) procmail
problem. So maybe anybody could help me.
There is an account you gets all the emails-from an domain you are not
deliverable.
So this emails should reply to the sender and I would do this with procmail.
the thing is that I want to make a gzip of the email
and move the attachment to /dev/null if it contains one, and then procmail
should write an email with " User not valid bla bla"
and attach the gzip
And then move the mail when the is sende to /dev/null
so I have made this but now I a little bit confused ??? Because I didn't know
if it works shell made a tempfolder for the gzip or some
thing else like that.
Can somebody help me a little bit ???
As MTA I'am using sendmail 8.9.x
an procmail 3.13.x on RedHat 6.1
# FIND OUT SUBjECT and ohter stuff
SUBJ_=`formail -c -xSubject: \
| sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`
TO_=`formail -rt -xTo: \
\xA0\xA0| expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`
ATTACH_=* From:\/.* | gzip > mail.gz
:0
* ^TO_#here have to stand to "everybody" how I made this ?? because this
mailbox contains all mails who are not deliverable on the server
* ! From:(_dot_)*email-admin(_at_)cii(_dot_)de
* ! ^FROM_DAEMON
(formail -r \
-A"X-Loop: email-admin(_at_)cii(_dot_)de" \
-I"Subject:>>>> RETURNED MAIL <<<<<" ; \
echo "Dear Sender," ; \
echo "" ; \
echo "Thank you for your email about" ; \
echo "\"${SUBJ_}\"" ; \
echo "" ; \
echo "But the email adress you have entered " ; \
echo "\"${TO_}\"" ; \
echo "is not a valid email-adress" ; \
echo "" ; \
echo "If you felt you have recevied this message error" ; \
echo "contact blabla" ; \
echo "" ; \
echo ""
| /usr/lib/sendmail -oi -t attach ${ATTACH_}
:0m
/dev/null
THX for your help
Erik
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail