Koozali.org: home of the SME Server

Block/reject one email adress on own domain

Offline psoren

  • *
  • 371
  • +0/-0
Block/reject one email adress on own domain
« on: July 12, 2004, 01:41:30 PM »
Hi

Is it possible to block or reject mails to one or more email adresses on my own domain. This adress does no longer exist but more than half of the spam i get is for that one adress. I already have spam filtering but it would be better to ease the work of the server if it could be rejected instead

Per

Offline NickR

  • *
  • 283
  • +0/-0
    • http://www.witzendcs.co.uk/
Block/reject one email adress on own domain
« Reply #1 on: July 12, 2004, 04:41:10 PM »
Darrel May's Mailrules contrib will do this.  OTOH, if the account is dead, why not just delete it?
--
Nick......

Offline psoren

  • *
  • 371
  • +0/-0
Block/reject one email adress on own domain
« Reply #2 on: July 13, 2004, 02:44:48 PM »
Hi

I have now tried Mailfront but it doesnt work.

I'm running 6.0.01.

I have also tried Mailfront on a 5.6, and here it works.

So i tried to look at where and how the config files was modified and it looks the same for 5.6 and 6.x. But for some reason 6.x ignores the settings. After changing settings manually i did "svc -t /service/smtpfront-qmail" to activate the new settings, but they never worked. I even tried to reboot. Could this be a bug that needs to be reported?

The user that i want to block is already deleted, but there is still a lot of virus and spam comming for it. So i get lots of mail from the virus scanner (AntiVir) because of that.

Per

Offline NickR

  • *
  • 283
  • +0/-0
    • http://www.witzendcs.co.uk/
Block/reject one email adress on own domain
« Reply #3 on: July 13, 2004, 02:54:33 PM »
Quote from: "psoren"
Hi

I have now tried Mailfront but it doesnt work.

I'm running 6.0.01.

I have also tried Mailfront on a 5.6, and here it works.


Strange, I have installed this on at least half a dozen 6.0.01 servers and never had a problem.
--
Nick......

Anonymous

Block/reject one email adress on own domain
« Reply #4 on: July 13, 2004, 03:16:04 PM »
If you watch /var/log/smtpfront-qmail/current does it then reject the message? On mine it accepts the message, but on 5.6 it rejects it.
I have tried two 6.0.01 servers with same result.

From the log file on 6.0.01:

@4000000040f3dec0346d12ec tcpserver: pid 11313 from 127.0.0.1
@4000000040f3dec0348ec7d4 tcpserver: ok 11313 0:127.0.0.1:825 localhost:127.0.0.1::33705
@4000000040f3dec0374a55c4 smtpfront-qmail[11313]: MAIL FROM:<xxx@xxx.xx>
@4000000040f3dec037511454 smtpfront-qmail[11313]: RCPT TO:<yyy@yy.yy>
@4000000040f3decc0afefeac smtpfront-qmail[11313]: Accepted message qp 11314 bytes 1679
@4000000040f3decc0b2c2544 smtpfront-qmail[11313]: bytes in: 1685 bytes out: 199
@4000000040f3decc0b3583b4 tcpserver: end 11313 status 0
@4000000040f3decc0b35a2f4 tcpserver: status: 0/40

From 5.6:
@4000000040f3dfbc0d52aadc tcpserver: pid 7709 from 127.0.0.1
@4000000040f3dfbc0d69a5ac tcpserver: ok 7709 0:127.0.0.1:825 localhost:127.0.0.1::48612
@4000000040f3dfbc0ff45f9c smtpfront-qmail[7709]: MAIL FROM:<xxx@xxx.xx>
@4000000040f3dfbc10457954 smtpfront-qmail[7709]: RCPT TO:<yyy@yyy.yy>
@4000000040f3dfbc1045a064 smtpfront-qmail[7709]: Sorry, that is an invalid e-mail address
@4000000040f3dfbc1045b3ec smtpfront-qmail[7709]: bytes in: 77 bytes out: 173
@4000000040f3dfbc1045c38c tcpserver: end 7709 status 0
@4000000040f3dfbc1045d32c tcpserver: status: 0/40
@4000000040f3dfbc1045dee4 tcpserver: status: 1/40
@4000000040f3dfbc1045ea9c tcpserver: pid 7710 from 127.0.0.1
@4000000040f3dfbc104bf57c tcpserver: ok 7710 0:127.0.0.1:825 localhost:127.0.0.1::48613
@4000000040f3dfbc109f071c smtpfront-qmail[7710]: MAIL FROM:<>
@4000000040f3dfbc10a3cdc4 smtpfront-qmail[7710]: RCPT TO:<xxx@xxx.xx>
@4000000040f3dfbc13bafcbc smtpfront-qmail[7710]: Accepted message qp 7711 bytes 2475
@4000000040f3dfbc13daa634 smtpfront-qmail[7710]: bytes in: 2507 bytes out: 165
@4000000040f3dfbc13e1d224 tcpserver: end 7710 status 0
@4000000040f3dfbc13e1e994 tcpserver: status: 0/40

Weird stuff....

per

Offline NickR

  • *
  • 283
  • +0/-0
    • http://www.witzendcs.co.uk/
Block/reject one email adress on own domain
« Reply #5 on: July 13, 2004, 05:24:27 PM »
Quote from: "Anonymous"
If you watch /var/log/smtpfront-qmail/current does it then reject the message? On mine it accepts the message, but on 5.6 it rejects it.


Yes, my 6 is exactly what your 5.6 looks like.

Do you have a:
/etc/e-smith/templates/var/qmail/control/mailrules.default

directory?

I'm wondering if it maybe hasn't expanded the template - might be worth trying it by hand?
--
Nick......

Offline psoren

  • *
  • 371
  • +0/-0
Block/reject one email adress on own domain
« Reply #6 on: July 13, 2004, 08:03:53 PM »
Quote from: "NickR"
Do you have a:
/etc/e-smith/templates/var/qmail/control/mailrules.default

directory?

I'm wondering if it maybe hasn't expanded the template - might be worth trying it by hand?


It's all there and it's the file that i also tried editing manually (and expanding). It really just looks like the file is ignored.
Another funny thing is, that i can not undo/remove the rules in the server manager. There is no "remove button" comming......

Per

Offline NickR

  • *
  • 283
  • +0/-0
    • http://www.witzendcs.co.uk/
Block/reject one email adress on own domain
« Reply #7 on: July 13, 2004, 08:29:47 PM »
Hmm, very odd.  If I can think of anything else to try, I'll post back here.
--
Nick......

Offline psoren

  • *
  • 371
  • +0/-0
Block/reject one email adress on own domain
« Reply #8 on: July 14, 2004, 04:28:30 PM »
Just a thougth...

Could it be that spamassassin makes smtpfront-qmail bypass those mailrules...??

Per

Offline psoren

  • *
  • 371
  • +0/-0
Block/reject one email adress on own domain
« Reply #9 on: July 18, 2004, 11:50:33 AM »
I have found that on a fresh install, i can reject one or more email adresses by typing them into /var/qmail/control/badrcptto. BUT then i install AntiVir and it stops working. So AntiVir gets the mails before smtpfront-qmail and smtpfront-qmail does not recognize that it's a blocked adress.
Which ports do smtpfront-qmail deliver to qmail on. I can configure AntiVir to listen on another port and get it between smtpfront-qmail and qmail ( I hope ).
But still i can not get smtpfront-qmail to reject adresses put into mailrules.default. How can i test if the standard rules work?

Per