Hi,

No problem, my suggestion is as follows:

Configure DSPAM training using the email to retrain addresses. i.e 
retrain-as-spam@yourdomain.example and
retrain-as-ham@yourdomain.example on the DSPAM VM, you probably have 
postfix installed already..
Here is a example from one of my installs (master.cf)

  dspam-retrain unix - n n - - pipe flags=XRu user=dspam 
argv=/usr/local/bin/dspam-retrain-forward.pl
    --debug=no
    --client
    --user ${sender}
    --class=${nexthop}
    --source=error
    --full=yes
    --headers-only=no
    --bodies-only=yes
    --first-only=no
    --skip-first=no
    --bin-dir=/usr/bin

You then would need to be able to deliver retrain messages from the 
Dovecot VM to the DSPAM VM, this would probably
be best achieved using postfix as you are already using it.

Configure Dovecot antispam plugin to send messages to be retrained to 
the retrain addresses using the mailtrain backend.
Probably with something like the following.

>antispam_mail_sendmail = /usr/bin/mailx
>antispam_mail_spam = -s "retrain as spam" 
> retrain-as-s...@yourdoamin.example.com
>antispam_mail_notspam = -s "retrain as ham" 
> retrain-as-...@yourdoamin.example.com

Hope that makes it clearer.

Best Regards

Martin

On 2015-02-19 11:03, Орхан Касумов wrote:
> Thanks for your participation, but the link and example you provided
> talk about sa-learn, which is AFAIK SpamAssassin's training tool.
>
> Did you mean I should change the last two strings of this:
>
> antispam_backend = dspam
> antispam_signature = X-DSPAM-Signature
> antispam_signature_missing = error
> antispam_spam = SPAM
> antispam_trash = Trash
> ANTISPAM_DSPAM_BINARY = /USR/LOCAL/BIN/DSPAM
> ANTISPAM_DSPAM_ARGS = --SOURCE=ERROR;--SIGNATURE=%%S
>
> to this:
>
> antispam_backend = dspam
> antispam_signature = X-DSPAM-Signature
> antispam_signature_missing = error
> antispam_spam = SPAM
> antispam_trash = Trash
> ANTISPAM_MAIL_SENDMAIL = /USR/SBIN/SENDMAIL
> ANTISPAM_MAIL_SENDMAIL_ARGS = -F;%u...@example.com
> But such a config wouldn't tell the antispam plugin where DSPAM 
> server
> is...
> If I misunderstood you, please take a bit more time to explain your
> idea.< br>
> Thanks!
>
> Четверг, 19 февраля 2015, 9:31 UTC от Martin Wheldon
> <martin.whel...@greenhills-it.co.uk>:
>
>> Hi,
>>
>> No need to install DSPAM in the dovecot vm the dovecot antispam
>> plugin
>> supports
>> using sendmail to send the message to a retraining address.
>>
>> http://wiki2.dovecot.org/Plugins/Antispam [1]
>>
>> The following example should get you working.
>>
>> #=====================
>> # mailtrain plugin
>> #
>> # This plug can be used to train via an arbitrary program that
>> # receives the message on standard input. Since sendmail can be
>> # such a program, it can be used to send the message to another
>> # email address for training there.
>> #
>> # For example:
>> # (defaults to /usr/sbin/sendmail)
>> #antispam_mail_sendmail_args = --for;%u
>> antispam_mail_spam = --spam
>> antispam_mail_notspam = --ham
>> #antispam_mail_sendmail = /usr/sbin/sendmail
>> antispam_mail_sendmail = /usr/bin/sa-learn-pipe.sh
>> #antispam_mail_sendmail_args = -f;%u...@example.com # % expansion done
>>
>> by dovecot
>>
>> Best Regards
>>
>> Martin
>>
>> On 2015-02-19 06:58, Орхан Касумов wrote:
>> > Sorry, I should have mentioned: clients use IMAP.
>> > When setting up everything on a single VM, I achieve the
>> following
>> > result:
>> >
>> > - a SPAM folder is created (with auto-subscription) for each user
>> > - DSPAM is trained by dragging spam from Inbox into SPAM folder
>> or
>> > vice-versa (if good mail was mistreated as spam)
>> > - no HAM folder is used, everything happens between Inbox and
>> SPAM
>> > - no forwarding to spam-u...@domain.com [2] [7] or
>> > notspam-u...@domain.com [3] [8] is used, only drag'n'drop between
>> Inbox
>> > and SPAM.
>> >
>> > What I would like to achieve, is the same spam management
>> > capabilities, but with separate Postfix, Dovecot and DSPAM
>> servers.
>> > I already managed to separate Postfix and DSPAM on two different
>> VMs:
>> >
>> > - Postfix sends incoming mail to DSPAM via lmtp,
>> > - DSPAM checks mail and re-injects it back into Postfix via smtp
>> > - ma il is delivered with DSPAM headers
>> >
>> > Now I'm confused about configuring Dovecot for DSPAM training,
>> > because
>> > on Dovecot's VM I don't have anymore /usr/local/bin/dspam,
>> > so obviously I can't use in Dovecot's configs:
>> "antispam_dspam_binary
>> > = /usr/local/bin/dspam".
>> > Does it mean that I have to install DSPAM on Dovecot's VM also,
>> to
>> > run
>> > as a client (?) for separate DSPAM server?
>> > But this idea confuses me: I lose visibility of how many times a
>> mail
>> > will go back and forth between different VMs...
>> >
>> > That's why I was asking about best practice setup - I wonder how
>> > things are done in REAL setups,
>> > not in TEST setups described everywhere, with
>> Postfix-Dovecot-DSPAM
>> > mess on a single VM.
>> > I'd hardly believe that such a setup is used in reality, but you
>> can
>> > correct me, if I'm wrong.
>> >
>> > Среда, 18 февраля 2015, 23:07 -07:00 от Eric Broch
>> > <ebr...@whitehorsetc.com [4]>:
>> >
>> >> 1) If you're using IMAP clients you could set up ham/spam
>> folders
>> >> for each user into which they copy/move good/bad email. Every so
>> >> often copy (scp, unison, rsync, etc) the email into a folder for
>> >> each email user to the server running dspam and train there
>> using
>> >> bash scripts. The email folder should have the u...@domain.tld
>> [5] [1]
>> >> so that you can train DSPAM per user, if you want.
>> >>
>> >> 2) If you're clients are running POP3, create seperate IMAP
>> >> accounts for each user on the dspam host using dovecot. So each
>> user
>> >> will have one POP3 account on your mail server and an IMAP
>> account
>> >> on the dspam host. Users will copy/move good/bad mail to the
>> IMAP
>> >> ham/spam folder. You can train on each user's ham/spam folder,
>> or 3)
>> >> Each user forwards the ham/spam back to training accounts on the
>> >> dspam host of the following to the following addresses:
>> >>
>> >> Forward “false positives” to: notspam-john...@mydomain.com
>> [6] [2]
>> >> Likewise you can send missed spam to: spam-john...@mydomain.com
>> [7] [3]
>> >>
>> >> Eric
>> >>
>> >> On 2/18/2015 10:19 PM, Орхан Касумов wrote:
>> >>
>> >>> Hello, please share an advice!
>> >>>
>> >>> If I have separate Postfix and Dovecot VMs, should I:
>> >>>
>> >>> 1) install DSPAM as a completely separate 3rd VM (which I'd
>> >>> prefer),
>> >>> 2) or install it on Postfix VM,
>> >>> 3) or install it on Dovecot VM?
>> >>>
>> >>> The confusing point for me is DSPAM retraining via Dovecot
>> >>> antispam and sieve. When everything is on a single VM, I can
>> put
>> >>> in /usr/local/etc/dovecot/conf.d/90-plugin.conf:
>> >>>
>> >>> antispam_backend = dspam
>> >>> ...
>> >>> antispam_dspam_binary = /usr/local/bin/dspam
>> >>>
>> >>> Here the last statement implies that DSPAM is on the same VM
>> with
>> >>> Dovecot. But if I wanted to separate DSPAM completely, how
>> should
>> >>> I accomplish DSPAM retraining? Or it is not a recommended setup
>> -
>> >>> to have a dedicated DSPAM server?
>> >>>
>> >>> P.S. For some reason, all HowTos in the Internet describe mail
>> >>> system setup with Postfix, Dovecot and DSPAM on the same VM.
>> While
>> >>> it's useful as a working TEST setup, it gives no idea (and
>> doesn't
>> >>> even come close) on how to implement a REAL setup with separate
>> >>> Postfix, Dovecot and DSPAM components.
>> >>>
>> >>> Thanks in advance!
>> >>>
>> >>> --
>> >>> Орхан Касумов
>> >>>
>> >>>
>> >>
>> >
>> >
>>
> 
> ------------------------------------------------------------------------------
>> >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT
>> Server
>> >>> from Actuate! Instantly Supercharge Your Business Reports and
>> >>> Dashboards
>> >>> with Interactivity, Sharing, Native Excel Exports, App
>> Integration
>> >>> & more
>> >>> Get technology previously reserved for billion-dollar
>> >>> corporations, FREE
>> >>>
>> >>
>> >
>> >
>>
> 
> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
>> [8]
>> >>>
>> >>> _______________________________________________
>> >>> Dspam-user mailing list
>> >>> Dspam-user@lists.sourceforge.net [9]
>> >>> https://lists.sourceforge.net/lists/listinfo/dspam-user [10]
>> >>
>> >>
>> >
>> >
>>
> 
> ------------------------------------------------------------------------------
>> >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT
>> Server
>> >> from Actuate! Instantly Supercharge Your Business Reports and
>> >> Dashboards
>> >> with Interactivity, Sharing, Native Excel Exports, App
>> Integration
>> >> & more
>> >> Get technology previously reserved for billion-dollar
>> corporations,
>> >> FREE
>> >>
>> >
>> >
>>
> 
> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
>> [11]
>> >> [4]
>> >> _______________________________________________
>> >> Dspam-user mailing list
>> >> Dspam-user@lists.sourceforge.net [12] [5]
>> >> https://lists.sourceforge.net/lists/listinfo/dspam-user [13] [6]
>> >
>> >
>> >
>> > Links:
>> > ------
>> > [1]
>> >
>> >
>>
> 
> http://webmail.greenhills-it.co.uk//e.mail.ru/compose/?mailto=mailto%3au...@domain.tld
>> [14]
>> > [2]
>> >
>> >
>>
> 
> http://webmail.greenhills-it.co.uk//e.mail.ru/compose/?mailto=mailto%3anotspam%2dusern...@colton.com
>> [15]
>> > [3]
>> >
>> >
>>
> 
> http://webmail.greenhills-it.co.uk//e.mail.ru/compose/?mailto=mailto%3aspam%2dusern...@colton.com
>> [16]
>> > [4]
>> >
>> >
>>
> 
> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
>> [17]
>> > [5]
>> >
>> >
>>
> 
> http://webmail.greenhills-it.co.uk/compose?To=dspam%2du...@lists.sourceforge.net
>> [18]
>> > [6] https://lists.sourceforge.net/lists/listinfo/dspam-user [19]
>> > [7] mailto:spam-u...@domain.com [20]
>> > [8] mailto:notspam-u...@domain.com [21]
>>
>>
> 
> ------------------------------------------------------------------------------
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and
>> Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration
>> & more
>> Get technology previously reserved for billion-dollar corporations,
>> FREE
>>
> 
> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
>> [22]
>> _______________________________________________
>> Dspam-user mailing list
>> Dspam-user@lists.sourceforge.net [23]
>> https://lists.sourceforge.net/lists/listinfo/dspam-user [24]
>
>  !DSPAM:41,54e5c397249111496345500!
>
> Links:
> ------
> [1] http://wiki2.dovecot.org/Plugins/Antispam
> [2] 
> http://webmail.greenhills-it.co.uk/compose?To=spam%2du...@domain.com
> [3] 
> http://webmail.greenhills-it.co.uk/compose?To=notspam%2du...@domain.com
> [4] 
> http://webmail.greenhills-it.co.uk/compose?To=ebr...@whitehorsetc.com
> [5] http://webmail.greenhills-it.co.uk/compose?To=u...@domain.tld
> [6]
> 
> http://webmail.greenhills-it.co.uk/compose?To=notspam%2djohn...@mydomain.com
> [7] 
> http://webmail.greenhills-it.co.uk/compose?To=spam%2djohn...@mydomain.com
> [8]
> 
> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&amp;iu=/4140/ostg.clktrk
> [9]
> 
> http://webmail.greenhills-it.co.uk/compose?To=dspam%2du...@lists.sourceforge.net
> [10] https://lists.sourceforge.net/lists/listinfo/dspam-user
> [11]
> 
> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&amp;iu=/4140/ostg.clktrk
> [12]
> 
> http://webmail.greenhills-it.co.uk/compose?To=dspam%2du...@lists.sourceforge.net
> [13] https://lists.sourceforge.net/lists/listinfo/dspam-user
> [14]
> 
> http://webmail.greenhills-it.co.uk//e.mail.ru/compose/?mailto=mailto%3au...@domain.tld
> [15]
> 
> http://webmail.greenhills-it.co.uk//e.mail.ru/compose/?mailto=mailto%3anotspam%2dusern...@colton.com
> [16]
> 
> http://webmail.greenhills-it.co.uk//e.mail.ru/compose/?mailto=mailto%3aspam%2dusern...@colton.com
> [17]
> 
> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&amp;iu=/4140/ostg.clktrk
> [18]
> 
> http://webmail.greenhills-it.co.uk/compose?To=dspam%2du...@lists.sourceforge.net
> [19] https://lists.sourceforge.net/lists/listinfo/dspam-user
> [20] 
> http://webmail.greenhills-it.co.uk/compose?To=spam%2du...@domain.com
> [21] 
> http://webmail.greenhills-it.co.uk/compose?To=notspam%2du...@domain.com
> [22]
> 
> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&amp;iu=/4140/ostg.clktrk
> [23]
> 
> http://webmail.greenhills-it.co.uk/compose?To=dspam%2du...@lists.sourceforge.net
> [24] https://lists.sourceforge.net/lists/listinfo/dspam-user


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Dspam-user mailing list
Dspam-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspam-user

Reply via email to