OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: redirect to junk mail

From: jeff donovan (donovanbeth.k12.pa.us)
Date: Mon Oct 15 2007 - 09:12:30 CDT


On Oct 15, 2007, at 9:55 AM, mouss wrote:

> jeff donovan wrote:
>> Greetings
>> I am trying to setup a trainable junkmail mailbox for SpamAssassin
>> and I am having trouble getting the messages delivered to the
>> correct mailbox.
>> i have 3 systems.
>> MX
>> relay
>> Imap
>> the MX system picks up message for my domain , and send to amavis
>> for filter.
>> content_filter = smtp-amavis:[127.0.0.1]:10024
>> then amavis send to an internal relay
>> $forward_method = 'smtp:my.smtp.relay';
>> then my relay does an ldap lookup and delivers the message to the
>> appropriate imap server.
>> this works fine. The problem is getting messages back to the
>> primary MX so I can train the Bayes filter. I need to allow
>> clients to " redirect to junkmailmydomain "
>> I have a local account on the MX named junkmail and not junkmail.
>> messages sent to that address loop.
>> How can i have messages for that username bypass the content
>> filter and be delivered to the local system?
>
> passing these messages through the standard MX is risky (you would
> need to make sure nobody poisons your bayes by sending crafted
> messages...).
>
> it is better to run an smtpd on another port and use it. This will
> also solve your loop issue easily as you can disable the content
> filter for this port. if you have no preference for ports, you can
> use 587 (the standard submission port). for this, just enable the
> submission service in master.cf. adjust its options as you like.
>
> Note that forwarding messages may or may not work as a training
> method (different MUAs forward mail differently. In principle, you
> need a "bounce/resend" method, but very few MUAs implement this).
>
> A more robust method would be to ask users to move messages to
> special folders (Junk/Trash for missed or confirmed spam, and Junk/
> Error for false Positives) and then have a script on the imap
> server to copy (rsync or scp) the messages and run the training
> commands (ssh or have a cron on the MX).
>
> but you would avoid all this trouble if you put your Bayes in sql
> and install SA on the IMAP so that you can run sa-learn from there.

I have 3 imap servers - each can run their own bayes, however I would
like everyone to have the same filtering level and share the same
database.

I have been using a single mailbox that all the users can send to,
then " I " have been doing the physical drop into the correct bayes
mailbox. -- it works. But I thought that was a crazy work around, and
that I just had not set it up correctly.
So using a transport map to deliver local with out filter isn't the
way to go eh?