[linux] Re: automatisch mail met bijlagen versturen

Hugo van der Kooij hvdkooij op vanderkooij.org
Di Aug 15 19:45:08 CEST 2006


On Tue, 15 Aug 2006, Aart Koelewijn wrote:

> Nu wil ik naast dat tekstbestand ook nog wat *.gif plaatjes meesturen
> maar kom er gauw niet achter hoe ik dat hierin moet verwerken. Iemand
> hier wel ervaring mee?

Ik zie dat je al wat hebt gevonden. Ik had eerder iets heel simpel in
elkaar genutseld door zelf even mime headers te maken en daar een base64
encoded file in te prakken. Maar dat is alleen een test adres waarmee ik
een EICAR zip file kan retourneren. Dat test mooi de virusscanner van de
zender.

Het ziet er ongeveer uit als:

......
echo 'HELO arwen.waakhond.net'                              > $REPLY
echo "MAIL FROM: <$RECIPIENT>"                             >> $REPLY
echo "RCPT TO: <$SENDER>"                                  >> $REPLY
echo 'DATA'                                                >> $REPLY
echo "To: $SENDER"                                         >> $REPLY
echo "From: $RECIPIENT (Responder)"                        >> $REPLY
echo "Subject: ECHO-EICAR: $SUBJECT"                       >> $REPLY
echo 'MIME-Version: 1.0'                                   >> $REPLY
echo 'Content-Type: multipart/mixed;'                      >> $REPLY
echo '  boundary="=_NextPart_0123456789_"'                 >> $REPLY
echo 'Precedence: junk (autoreply)'                        >> $REPLY
echo ''                                                    >> $REPLY
echo ''                                                    >> $REPLY
echo 'This is a MIME encoded message.'                     >> $REPLY
echo ''                                                    >> $REPLY
echo '--=_NextPart_0123456789_'                            >> $REPLY
echo 'Content-Type: text/plain;'                           >> $REPLY
echo ''                                                    >> $REPLY
echo 'Hi'                                                  >> $REPLY
echo ' '                                                   >> $REPLY
echo 'I received a mail from you, and my job is to'        >> $REPLY
echo 'send you a virus.  This email is that virus. '       >> $REPLY
echo ' '                                                   >> $REPLY
echo 'Since I got your email, and you got this virus,'     >> $REPLY
echo 'it probably means that your email setup is o.k.'     >> $REPLY
echo 'i.e. you are able to send and receive email.'        >> $REPLY
echo 'Wether or not you killed the virus in time is'       >> $REPLY
echo 'quite another matter.'                               >> $REPLY
echo ' '                                                   >> $REPLY
echo 'Live long and prosper'                               >> $REPLY
echo '-------------------------'                           >> $REPLY
echo "$RECIPIENT"                                          >> $REPLY
echo '-------------------------'                           >> $REPLY
echo ' '                                                   >> $REPLY
echo 'ECHO-EICAR (This is a marker to prevent loops)'      >> $REPLY
echo "Process $$"                                          >> $REPLY
echo ''                                                    >> $REPLY
echo '--=_NextPart_0123456789_'                            >> $REPLY
echo 'Content-Type: application/octet-stream; name="eicarcom2.zip"' >> $REPLY
echo 'Content-Transfer-Encoding: base64'                   >> $REPLY
echo 'Content-Disposition: attachment; filename="eicarcom2.zip"' >> $REPLY
echo ''                                                    >> $REPLY
echo 'UEsDBAoAAAAAADKs6yjRINsxuAAAALgAAAANAAAAZWljYXJfY29tLnppcFBLAwQKAAAAAADg' >> $REPLY
echo 'mLgoPM9RaEQAAABEAAAACQAAAGVpY2FyLmNvbVg1TyFQJUBBUFs0XFBaWDU0KFBeKTdDQyk3' >> $REPLY
echo 'fSRFSUNBUi1TVEFOREFSRC1BTlRJVklSVVMtVEVTVC1GSUxFISRIK0gqUEsBAhQACgAAAAAA' >> $REPLY
echo '4Ji4KDzPUWhEAAAARAAAAAkAAAAAAAAAAQAgAP+BAAAAAGVpY2FyLmNvbVBLBQYAAAAAAQAB' >> $REPLY
echo 'ADcAAABrAAAAAABQSwECFAAKAAAAAAAyrOso0SDbMbgAAAC4AAAADQAAAAAAAAAAACAAtoEA' >> $REPLY
echo 'AAAAZWljYXJfY29tLnppcFBLBQYAAAAAAQABADsAAADjAAAAAAA=' >> $REPLY
echo ''                                                    >> $REPLY
echo '--=_NextPart_0123456789_--'                          >> $REPLY
echo '.'                                                   >> $REPLY


Hugo.

PS: Ben benieuws of er nog een scanner over gaat vallen ;-)

-- 
	I hate duplicates. Just reply to the relevant mailinglist.
	hvdkooij op vanderkooij.org		http://hvdkooij.xs4all.nl/
		Don't meddle in the affairs of magicians,
		for they are subtle and quick to anger.



More information about the Linux mailing list