Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 May : Re: SMTP server as a Windows service with Indy???
| Subject: | Re: SMTP server as a Windows service with Indy??? |
| Posted by: | "Bo Berglund" (bo.berglu..@telia.com) |
| Date: | Sat, 6 May 2006 08:02:12 |
On Fri, 5 May 2006 18:22:05 -0700, "Remy Lebeau \(TeamB\)"
<no.spam@no.spam.com> wrote:
>
>"Bo Berglund" <bo.berglund@telia.com> wrote in message
>news:btmn52l4ecf22gd930aiihi3hpodrso2v4@4ax.com...
>
>> I am looking for a way to solve my email sending problems where my
>> ISP has now gone to content filtering *outgoing* mail such that I can
>> no longer send attachments with exe files in them. Such attachments
>> makes the message blocked by the ISP. Stupid but true.
>
>That is easy to get around. You can either:
>
>1) put the .exe file into a .zip file and attach that instead
Actually that is the way I always do it and I did it also when I
discovered this problem...
>
>2) change the TIdAttachment.Filename property to something else. You can
>also set the TIdAttachment.ContentType property to
>'application/octet-stream'. By changing both of these properties, the only
>way the server can determine whether or not an attachment is an .exe file is
>to extract the attachment and parse the .exe file's raw data. Most server's
>are not likely to do that yet.
First off, I am not programming a mail client in thus case. I am using
MS Outlook as the mail client so I do not have any control of these
message properties.
But I tried this concerning the attachments:
- file.exe name changed to file.hej. Bounced!
- file.hej put into container.zip. Bounced!
- container.zip changed to container.tjosan. Bounced!
- container.zip encrypted using Winzip. No bounce!
- file.exe put into container.zip, then encrypted. Bounced!
So whatever engine the ISP is using will detect the file types by
reading the file itself and is able to open a zipfile even though its
name extension is changed and see the contents even if the content
itself is encrypted.
My guess is that if the contents of the zip is listed as *.exe it will
bounce, but if it is not .exe then it will be checked and if the zip
is encrypted then the checker gives up and accepts the file as legit.
Problem is that the destination company has an incoming inspection
policy that forbids encrypted files! It requires all attachments to be
valid and open so it can inspect them inbound. So even if I found one
way to get around the stupid outbound filter that solution is stopped
in the other end....
The destination company policy is to accept exe files in zips if they
validate as non virus, but to do this check they have to be able to
open the exe and examine it. Hence the block of encrypted files. What
I found is not getting through this incoming filter is zipfiles
containing embedded cab files. Cab files seem to be no-no for that
filter no matter what....
Luckily I do not build installers that contain cab files since I use
Innosetup. :-)
>
>> So I am looking to create a SMTP server using Indy9 and Delphi 7.
>
>You don't need to do that to solve this issue.
How else?
>
>> What I need is a service app thta I can install on a W2K server I
>> have on my LAN and which will have the sole task of sending mail
>> on to the destination.
>
>That is easier said then done. A lot of SMTP servers nowadays are
>black-listing unknown servers that send messages to them. ISPs recognize
>each other's servers, though. This way, spammers are being forced to send
>outgoing messages through their own ISPs rather than to their target
>recipients directly. The ISPs can then filter the messages accordingly.
>
I downloaded an SMTP application from "SoftStack" called "Advanced
SMTP server" and tested it. It did get past the ISP:s outbound filter
and reached my test destinations (myself at various mail accounts).
But it has several drawbacks:
- It is a regular program that I have to start so other PC:s on my
home network are depending on me starting that program. I need a
service.
- It changes the mail by individualizing a message that has been sent
with multiple people in To:, Cc: and Bcc: such that each one will get
a separate message where they are the sole recipient. THis way there
is no way a Reply All can be done and this is simply not acceptable to
me.
I also tried to get the Virtual SMTP server that comes with Microsoft
IIS working, but no matter what I do it just receives the outbound
mail and then fails delivery to the outside...
So I figured the best way would be to roll my own using Indy. I have
programmed several other application wityh mail ability using Indy so
I am fairly informed about the client side issues for sending mail.
But that was always *to* an SMTP server. Now I need to actually create
such a server myself...