Seyyed Hamid Reza Hashemi Golpayegani [mailto:[EMAIL PROTECTED]] wrote:
> I have installed Redhar Linux 6.0 and qmail 1.03 on it . I have install POP3
> daemen on that . OutLook Express and other pop3 clients can send a message
> that have a sender e-mail address that not on my domain.com . For example if
> my domain is morva.com you can send a mail message from my PoP3 daemon
> that's sender address is from hotmail.com !?!?!?
> I want to deliver only the mails that from my domain and reject mails that
> don't from my domain ! So how can I do this on my pop3 and sending mechanism
>?

Just filtering mail based on the sender domain is a bad idea. It's easy enough
to someone to abuse your server just by spoofing a domain on your machine..
then you get the fallout from the spam. If you really want to do this, search
the list archives and/or qmail.org and you'll find some patches floating
around.

If you know that your users are going to come from a specific block of ip
addresses, then setup tcpserver to set the RELAYCLIENT environment variable for
connects from this ipaddress block, and setup a "rcpthosts" file. For more
information see www.qmail.org and the qmail manual pages

If you don't have the luxury of all your users being in one ipaddress block,
then a good solution is to require POP before SMTP. This way you only allow
computers which have previously authenticated though SMTP to relay mail though
your machine. I have setup a tool to do this:
http://www.davideous.com/smtp-poplock/

 - David Harris
   Principal Engineer, DRH Internet Services

Reply via email to