Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Nov : Encrypted attachments and spam filters

www.cryer.info
Managed Newsgroup Archive

Encrypted attachments and spam filters

Subject:Encrypted attachments and spam filters
Posted by:"Fredrik Björk" (fredrik.bjo..@agrolink.fi)
Date:Thu, 30 Nov 2006 22:02:39

Hello

I have an application that encrypts a textfile and sends the encrypted
file as an attachment using Indy components . The application has worked
fine,but we had to make some changes to it. (Indy 10 and Delphi/BDS2006)
When we tested the application we found out that the some mail servers
rejected the mail. I think that  the message looks like spam or virus or
something bad. I tried to do some changes and found out that if the
attachments content type was set to 'text/plain' instead of the default
value at least some more servers accepted the message.
We tried to send the message to a hotmail adress and it never appeared
there. Yahoo mail did accept the message. For now the aplication serves
it purpose because it is used to send sensitive data from one
organisation to an other and the recieving organisations server accepts
the message. The application is automaticly started every day,so that is
the reason why we had to do it this way. However i am not convinced that
it will work all time sinc some servers today reject the message.


The part of my code looks like this.

>  Idmessage1.Subject := SSeBifogadFil ;
>  IdMessage1.MsgId := EmailFrom + ' ' + extractfilename(Fil) ;
>  IdMessage1.From.Name := EmailFrom ;
>  IdMessage1.From.Address := EmailSender ;
>  IdMessage1.Sender.Name := EmailFrom ;
>  IdMessage1.Sender.Address := EmailSender ;
>  IdMessage1.Body.Text := Meddelande ;
>  IdMessage1.Date := Now ;
>  with
>  TIdAttachmentFile.Create(IdMessage1.MessageParts,Fil)
>  do begin
>  ContentType := 'text/plain' ;
>  Filename := extractfilename(Fil) ;
>  ContentTransfer := 'base64' ;
>  end ;

Also I understand that the servers dont recognise then mail client that
is sending the file. Is there anything more that can be done to convince
the mail servers that the message is not spam or virus?

Fredrik

Replies:

www.cryer.info
Managed Newsgroup Archive