pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Does mail/dspam play nice with postfix?



On Sat, Dec 29, 2007 at 09:26:44AM -0800, Charlie Root wrote:
[...]
> >>Anyone got any clue-by-fours for me?
> >
> >Personally I use a transport, e.g.:
> >
> >dspam-relearn-spam     unix - n  n      -       10      pipe
> > flags=Ru user=dspam argv=/usr/pkg/bin/dspam --user ${user} --class=spam 
> > --source=error
> >dspam-relearn-innocent     unix - n  n      -       10      pipe
> > flags=Ru user=dspam argv=/usr/pkg/bin/dspam --user ${user} 
> > --class=innocent --source=error
> >
> >That way I avoid any limitations of postfix on |cmd aliases, and I can
> >use a non-root user for the actual dspam command.
> 
> That make sense, by itself.  But I'm still not sure how the user sends 
> messages to this service for relearning.  Maybe I need a bigger clue-by- 
> four.  (A clue-by-eight?)
> 
> Do you add a [pair of] aliases to /etc/mail/aliases{,.db} specifying 
> /path/to/the/pipes ?

Well, I use a transport_maps entry.  What I currently have in this
configuration (which I did almost 4 years ago now I think;  I was still
quite the newbie with Postfix at the time, and Postfix configuration was
slightly different in those areas) is a regex map that transforms
spam-${USER}@my.domain.tld into ${USER}@spam.dspam and then a transport
entry for the spam.dspam domain that gets it into dspam.

It might very well be over-designed for the task, but I have a lot of
other transformations so I think at the time it was the best way to get
that processed at the time I wanted it.

Excerpt from main.cf:

canonical_maps = regex:Dspam
transport_maps = TransportDspam

Contents of "Dspam":

/^spam-([[:alnum:]]+)@eve-team.com$/    ${1}@spam.dspam
/^notspam-([[:alnum:]]+)@eve-team.com$/ ${1}@notspam.dspam

Contents of "TransportDspam":

spam.dspam      dspam-relearn-spam
notspam.dspam   dspam-relearn-innocent

IIRC, the need for the canonicalisation of the address that way is so I
could use ${USER} in the master.cf entry.

-- 
Quentin Garnier - cube%cubidou.net@localhost - cube%NetBSD.org@localhost
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.

Attachment: pgpECVq_C1umb.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index