Sally Cheng <[EMAIL PROTECTED]> wrote:
>
> I am using Qmail 1.03 and today i noticed that my
> server is attacked by spammers and I got notice from
> other servers that my host is put in their BLACK list
> for spamming. I have looked in the FAQ but tried to
> fix but couldn't make it done. I had to delete all teh
> message in /var/qmail/queue. Could anybody help me to
> stop these SPAMMING and RELAYING.
Did you delete /var/qmail/control/rcpthosts? Then it's an open relay. Bad.
> Moreover I would like to control the relay through my
> host in following way:
>
>
> [My host name is myhost.mudomain.com and domain is
> mydomain.com]
>
> 1. I need to allow my users ([EMAIL PROTECTED] and
> [EMAIL PROTECTED]) send emails to anywhere
> through my server. ie my server is a SMTP gateway for
> my client-hosts.
>
> 2. I need to allow other hosts to send email to my
> users. So that my server will receive email from other
> servers fr local users and put it in their mailbox.
>
> 3. I need to REJECT all the other hosts or mails from
> other host NOT addressed to our local users.
>
> 4. I need to REJECT all the foreign hosts to use my
> hosts use as relay. Ie direct SMTP connection can be
> given only to my users or same network 10.0.0.0
Put "mydomain.com" and ".mydomain.com" into /var/qmail/control/rcpthosts.
Use tcpserver to start qmail-smtpd. Use a tcp.rules file to control access.
Assuming it's in /etc/tcpcontrol/smtp.rules, put the following lines in it:
10.:allow,RELAYCLIENT=""
:allow
Then recompile the .cdb file from this rules file. Now anyone on your 10.
network should be allowed to relay, and no one else should. Other hosts will
only be able to hand you mail for machines under the mydomain.com domain.
Charles
--
-----------------------------------------------------------------------
Charles Cazabon <[EMAIL PROTECTED]>
GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/
Any opinions expressed are just that -- my opinions.
-----------------------------------------------------------------------