Hi, all
I have a newbie question: I'm trying to analyse the bonced e-mails that come to my server. I 've been playing around for a while and I was able only to store in a text file with the following script that is called by mailertable:
#! /bin/sh
DIREC=/opt/prueba_rebotes_log
:0
$DIREC/prueba_attachments
The thing is that I'm interested in the original mail that comes attached in the bounced e-mail. I only managed to get the different fields for the bounced mail (body, subject, etc.) but there's no sign of the original e-mail anywhere. I could get the fields of the bounced e-mail with:
#! /bin/sh
DIREC=/opt/prueba_log
HD=`formail -X ""`
CC=`formail -xCc:`
CT=`formail -xContent-Type:`
SUBJECT=`formail -xSubject:` # Obtengo Subject
FROM=`formail -r -xTo:` # Obtengo From
TO=`formail -xTo:` # Obtengo To
BODY=`formail -I ""` # Obtengo Body
DATE=`formail -x Date` # Obtengo Date
:0c
| echo "********************">> $DIREC/log
:0c
| echo "DE: $FROM">> $DIREC/log
:0c
| echo "PARA: $TO">> $DIREC/log
:0c
| echo "FECHA: $DATE">> $DIREC/log
:0c
| echo "ASUNTO: $SUBJECT">> $DIREC/log
$DIREC/log
:0c
|echo "$BODY" >> $DIREC/log
but no sign of the attached file
Anybody has any idea?
Thanks in advanced.
Pedemonti
I have a newbie question: I'm trying to analyse the bonced e-mails that come to my server. I 've been playing around for a while and I was able only to store in a text file with the following script that is called by mailertable:
#! /bin/sh
DIREC=/opt/prueba_rebotes_log
:0
$DIREC/prueba_attachments
The thing is that I'm interested in the original mail that comes attached in the bounced e-mail. I only managed to get the different fields for the bounced mail (body, subject, etc.) but there's no sign of the original e-mail anywhere. I could get the fields of the bounced e-mail with:
#! /bin/sh
DIREC=/opt/prueba_log
HD=`formail -X ""`
CC=`formail -xCc:`
CT=`formail -xContent-Type:`
SUBJECT=`formail -xSubject:` # Obtengo Subject
FROM=`formail -r -xTo:` # Obtengo From
TO=`formail -xTo:` # Obtengo To
BODY=`formail -I ""` # Obtengo Body
DATE=`formail -x Date` # Obtengo Date
:0c
| echo "********************">> $DIREC/log
:0c
| echo "DE: $FROM">> $DIREC/log
:0c
| echo "PARA: $TO">> $DIREC/log
:0c
| echo "FECHA: $DATE">> $DIREC/log
:0c
| echo "ASUNTO: $SUBJECT">> $DIREC/log
$DIREC/log
:0c
|echo "$BODY" >> $DIREC/log
but no sign of the attached file
Anybody has any idea?
Thanks in advanced.
Pedemonti