This is a discussion on Re: override regular transport? within the mailing.postfix.users forums, part of the Mail Servers and Related category; On 23/05/05 00:43 -0700, email builder wrote: <snip> > I also need user-configurable filters ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On 23/05/05 00:43 -0700, email builder wrote:
<snip> > I also need user-configurable filters with possible delivery to more than > just a quarantine directory, which only something like procmail or Maildrop > used as LDA will give me as far as I know. If there was a way to kick off > Maildrop as a content filter, um, maybe that'd work, um... maybe? Seems very > strange and maybe will slow postfix a lot. > > > I hope this simplifies the problem statement slightly. > > It's close, but I need a little more than just a firewall for spam and virii, > but I am *certainly* interested to hear how you think it would be better > done. If I were to JUST implement a "firewall" as you suggest, how is that > best done? Is that something that amavis (wrapped around SA/clamav) can do? > Can amavis redirect those quarantined mails to *per-user* spam and virus > folders? > Yes. See the address extensions which amavisd-new can add. > > I would use a content_filter which accept mail via SMTP, filters > > according to whatever rules are specified, rewrites the envelop > > recipients to ${user}+${extension}@${myhostname}.${original_doma in} > > and reinjects via smtpd. Unclassified/unfiltered mail is reinjected > > unchanged. > > $myhostname.$original_domain is in virtual_mailbox_maps (or > > mydestination) as needed. > > $original_domain is in relay_domains only. > > I see. Re-written mails are the ones that are stopped at the server, NOT the > ones getting relayed. I assume amavis has functionality to do that kind of > envelope recipient re-writing? > Yes. > > I hope this helps you in figuring out a solution. > > Yes and no. I CERTAINLY appreciate your help. This is a good second > solution for us, but we'd also like user-configurable filters too... > Here is what I would do: Start with amavisd-new (and rip out code), or use Todd Bennett's SMTP proxy framework and add code to do the following: 1> Look up a list of keywords from a database of some sort, using the recipient address as a key. 2> For each keyword, do a defined action. 3> For each action, either rewrite the envelop sender, or add a special header to the message, or both. 4> Relay the message back to Postfix. 5> If the envelop sender is rewritten to a host in mydestination, you can use maildrop/procmail filters based on your custom header to filter the mail to appropriate mailboxes. If you only need delivery to one folder, just use address extensions and let Postfix/local handle mail delivery. Devdas Bhagat |
![]() |
| Thread Tools | |
| Display Modes | |
|
|