New filter type

This forum contains features that has been archived. This section contains implemented features, duplicate requests, and requests which we have decided not to implement.
Post Reply
jasond
Normal user
Normal user
Posts: 64
Joined: 2004-07-22 21:28
Location: Austin, TX
Contact:

New filter type

Post by jasond » 2004-07-29 00:03

Searched and read but didn't see what I was looking for. What would be really nice is to have a filter option to bounce the e-mail instead of deleting it. We have accounts that do nothing but attract spam. Removing the postmaster address is not an option because it's been requested to catch e-mails to invalid addresses. Hopefully by bouncing the e-mail, the amount of spam to these addresses would decrease.

I would like to do this without having to use ASSP. Didn't see any events in the documentation, so I assume writing my own COM object is out...

User avatar
Bram
Senior user
Senior user
Posts: 417
Joined: 2004-05-24 22:57
Location: The Netherlands
Contact:

Post by Bram » 2004-07-29 07:17

I think this is a very good feature!! I will definetly use it!! I also get a lot of spam on 1 account. But also want to make use of the postmaster function. So you can set at user level if the account is enabled, exactly like you can do with a domain.

theTerran
Senior user
Senior user
Posts: 287
Joined: 2004-06-22 18:07
Location: Florida

Post by theTerran » 2004-07-29 16:32

The addition of more filter options is an enhancement I would LOVE to see added to hMailServer. It would be great to have the option to bounce, forward, delete, or automatically reply to messages based on criteria (filter settings) like sender address, sender domain, recipient address, recipient domain, other header information, etc.

Some things, like forwarding messages for an account (or anything specifically effecting that account), are nice to see on each account's page. Perhaps all filters could be defined as part of a master filter list, which can be administered by accessing the Global Filters page in hMailServer Administrator, but still show those defined for a specific account on each account's page.

While we're dreaming, I might as well ask for the moon! Wouldn't it be nice to have, not only a wealth of options for filtering, but also a snazzy GUI for defining or editing filters? You know, something to allow the selection of: which account (or all) the filter should be applied to; which header (or the entire message) should be searched for a match (or match on not found) of the specified text; what initial action, and subsequent actions if desired, should be performed; and so on.

Here's an example of a pretty slick GUI for filters in a mail client:

Image

That's from PocoMail, if anyone is interested. Yes, I'm an affiliate -- it's a great email client. I'll limit the shameless marketing to "If you want to learn more or purchase PocoMail through me, please PM me". Apologies for the plug, but hey, have to support their copyright!

jasond
Normal user
Normal user
Posts: 64
Joined: 2004-07-22 21:28
Location: Austin, TX
Contact:

Post by jasond » 2004-07-30 00:38

I did some testing and now I have to wonder about the feasability of this. If someone more in the know has an answer please post.

If I send mail to the 'bad' account using the hMail SMTP server it works great if there's no postmaster. hMail sends 550 and e-mail client can't send the message.

But if I send to my real SMTP server and it then sends it on to hMail, it doesn't work. I assume the real one accepts the message and then forwards it on. hMail sends a 550, but not to me; to the other SMTP. Obviously I won't be running an open relay, so the first scenario is never going to happen.

So is this hopeless? I might get an e-mail back from my SMTP saying the user doesn't exist, but will that help in reducing spam? Do spammers parse those return e-mails? Assuming that their return address is real....

Hope this doesn't rain on the parade, but it didn't seem to make sense after I thought about it more.

edit:
Actually if the spammer is using a built-in SMTP server in spamming software or whatever, then this *would* work, yes?!

Thoughts?

theTerran
Senior user
Senior user
Posts: 287
Joined: 2004-06-22 18:07
Location: Florida

Post by theTerran » 2004-07-30 01:20

Jason,

In my enthusiasm for added filtering capability, I kind of missed the point of your question, I think. Sounds to me like you're looking to diminish the occurrence of spam by "bouncing" messages -- which I assume means sending an "invalid address" sort of reply. If this reply comes from the (invalid) address to which the message was sent, then it will simply confirm the existence of the address to the spammer and could serve to increase, rather than reduce, the level of spam. If, on the other hand, this message comes from another account (e.g. postmaster@example.com), the effects could potentially be beneficial for that particular address -- but could serve to increase the spam traffic on your postmaster account (probably not desirable).

Let me tell you about a similar issue that we have, and see if we can find some common ground and possibly a common solution.

We also have a management requirement to handle email sent to invalid addresses on our domain. I've been working this over for a little while, and came up with a (logic only) solution which seems reasonable. There are a couple of other posts out there dealing with this, but I'm not sure that there's enough interest to make this work in hMailServer.

Here's my suggestion for a possible solution.

Givens:

1) busy domain with LOTS of email traffic
2) management requires a friendly response be sent to all invalid message deliveries (after being finally convinced that we could not afford the time required to have a person review all that junk every day)
3) IT staff (i.e. myself) wishes to assure that an escalating email bouncefest does not occur, and spam traffic is not increased as a result of implementing a solution

To successfully accomplish this, two things must happen:

1) invalid email must be sent a friendly response from some address (e.g. badaddress@example.com) letting the sender know that their message could not be delivered because the address was invalid (and providing whatever additional information is desired, such as alternative contact methods like phone number or website)
2) mail sent directly to the address from which these responses are sent must NOT be processed in this manner, but either silently deleted or sent a 550 response

From this simple requirement I have come up with a number of possibilities to make it work with hMailServer (any of which requires at least one modification to the application...). You can read some about this here.

I'm short on time at the moment, but will check back here tomorrow and continue the discussion.

Regards,

Daniel

jasond
Normal user
Normal user
Posts: 64
Joined: 2004-07-22 21:28
Location: Austin, TX
Contact:

Post by jasond » 2004-07-30 03:50

Daniel,

I recall seeing your post, but didn't make the connection then. I would love to have full-blown, fancy out the wazoo filtering, too. :) But I don't *need* it and didn't want to bug Martin too much, esp since I just got here. :)

To solve your problem, you need two things.

1. Bounce filter, like I mentioned. I don't think this is a true filter in the way we are talking about it. I think the term filter is usually used to describe what happens after the e-mail has been accepted from the server. The bounce 'filter' that we're talking about returns the 550 code during the server conversation. If whoever sends an e-mail address that bounces, they will get a 550, ending the conversation. From the sender's viewpoint, the e-mail failed. It doesn't indicate that the e-mail address exists. In fact it does the opposite: 550 user unknown. This is more efficient that receiving the e-mail and then deleting it, too.

2. A separate section to handle catch-alls. I don't have the docs in front of me, so I'm not sure the if the postmaster address in hMail is used for anything but catch-all. But what you need is the ability to say what to do with e-mails sent to invalid addresses. Options would be to:
a) bounce
b) deliver to the address you specified
c) reply with a template, where you would be able to specify the From address. That address could be set up as account that bounces e-mail.

Are we on the same wavelength?

theTerran
Senior user
Senior user
Posts: 287
Joined: 2004-06-22 18:07
Location: Florida

Post by theTerran » 2004-08-03 17:40

Jason --

Yes, we're definitely on the same wavelength. The important thing is for the address from which the template response is sent to not respond like other invalid addresses. Once that works, all else would be just different ways of solving the same problem.

I had not previously thought of using a "bounce filter" (send 550 error) to accomplish this, since by definition when an account is created, email will be accepted by the server for that valid address. Only invalid addresses are subject to either the catch-all setting or the 550 error. However, this would certainly be one method of accomplishing the goal, and would have the added bonus of greater efficiency/reducing load on the server.

Sorry for the delayed response -- went out of town and "tomorrow" turned into 5 days....

Regards,

Daniel

User avatar
Bram
Senior user
Senior user
Posts: 417
Joined: 2004-05-24 22:57
Location: The Netherlands
Contact:

Post by Bram » 2004-08-04 08:14

Added it to the tracker!! I hope Martin finds the time to implement it somewhere in the future :P

theTerran
Senior user
Senior user
Posts: 287
Joined: 2004-06-22 18:07
Location: Florida

Post by theTerran » 2004-08-04 15:26

RealDesign wrote:Added it to the tracker!! I hope Martin finds the time to implement it somewhere in the future :P
Hear, hear! Thanks for adding it.

Daniel

jasond
Normal user
Normal user
Posts: 64
Joined: 2004-07-22 21:28
Location: Austin, TX
Contact:

Post by jasond » 2004-08-04 20:03

Thanks for posting to tracker. I've been meaning too, but am too swamped right now. Like I have time to be posting either. :)

Post Reply