TIdSMTPServer and e-mail forwarding

Giganews Newsgroups
Subject: TIdSMTPServer and e-mail forwarding
Posted by:  Thiago Rangel (thiferrang…@yahoo.com.br)
Date: Mon, 03 May 2010

Hi,

I have searched the entire atozedsoftware.indy.protocol.smtp for an
answer to my question, but it seems that no one have asked a similar
question yet.

I am trying to build an e-mail application that forwards e-mails to a
given list of e-mail addresses, as function on the destination address.
For example, an e-mail is sent to enginiers@localhost is forward to all
enginiers (say 30 different addresses, NOT in localhost). The same
application would also forward e-mails that are sent to
lawyers@localhost, although those e-mails would be forward to a
different list of people. In summary:

1) A user uses (e.g.) smtp.yahoo.com to send an e-mail to
account@myipaddress.
2) My application receives the e-mail from smtp.yahoo.com
3) My application forwards the e-mail to a list of previously registered
users.

I started by creating an application with TIdSMTPSever. I got to the
point where I can use my local e-mail client (ie Thunderbird) to send an
e-mail to the application. However, the original idea as to receive
e-mails from other (any) e-mail severs (say, GMail, HotMail). However, I
cannot get an e-mail from GMail when the destination address has my
fixed IP address: say "te…@234.234.234.234". I do not know if the
problem is that GMail would not send an e-mail to an address without DNS
(just the raw IP), or if I am listening in the wrong port, with the
wrong protocol.

So, I guess my question is "what port and protocol should I use to get
e-mails that are addressed to me, but sent through a different STMP
server?" Is it regular STMP in port 25?

I would be very grateful to any help you can provide.

Best!

Thiago

Replies