Postfix -> DSPAM -> Cyrus IMAPd

Scott M. Likens damm at yazzy.org
Tue May 31 15:11:07 EDT 2005


Since I use Postfix + DSPAM + Cyrus, I'll chime in.

On Debian sid, with DSPAM built by me.

damm at desolation> ls -l /usr/local/bin/dspam                             
     ~ -r-xr-sr-x  1 dspam mail 1515934 May 11 16:32
/usr/local/bin/dspam

damm at desolation> ls -l                                   
/var/run/cyrus/socket total 0
srwxrwxrwx  1 root root 0 May 31 10:46 lmtp
srwxrwxrwx  1 root root 0 May 31 10:46 notify
damm at desolation>                                         
/var/run/cyrus/socket

from main.cf

mailbox_command = sed '1{/^From /d;}' | /usr/local/bin/dspam
--deliver=innocent --user $USER -- -d %u

from dspam.conf

TrustedDeliveryAgent "/usr/sbin/cyrdeliver"     # Cyrus

UntrustedDeliveryAgent "/usr/sbin/cyrdeliver $u"

of course I built with dspam with /usr/sbin/cyrdeliver.

Trust root
Trust mail
Trust mailnull
Trust smmsp
Trust daemon
Trust nobody

config.status from dspam

dspam config.status 3.4.6
configured by ./configure, generated by GNU Autoconf 2.59,
  with options \"'--prefix=/usr/local' '--enable-broken-return-codes'
'--enable-daemon' '--with-mysql=/usr'
'--with-mysql-includes=/usr/include/mysql'
'--with-mysql-libraries=/usr/lib'
'--with-delivery-agent=/usr/bin/cyrdeliver'
'--with-storage-driver=mysql_drv' '--with-logdir=/var/log/dspam'
'--enable-feature=chained,whitelist,noise'
'--enable-preferences-extension' '--enable-neural-networking'
'--enable-long-usernames' '--enable-virtual-users'
'--enable-domain-scale' '--with-dspam-owner=dspam'
'--with-dspam-group=mail' '--enable-parse-to-header' 'CC=gcc'\"

hope that helps some.


On Tue, 31 May 2005 12:48:37 -0500
"Gerald D. Anderson" <gander at vte.com> wrote:

> Greetings all,
> 
>   I'm having a problem that makes me think I'm just over looking
> something silly, but for the life of me, I can't figure out what.   I
> am sending emails from postfix to dspam as a mailbox_command:
> 
> /mailbox_command = /usr/bin/dspam --deliver=innocent --user $USER/
> 
> This seems to be working fine.  Then I have dspam set up to use cyrus
> imap as the LDA:
> 
> /TrustedDeliveryAgent "/usr/lib/cyrus/deliver %u"
> 
> #
> # Untrusted Delivery Agent: Specifies the local delivery agent and
> arguments # DSPAM should use when delivering mail and running in
> untrusted user mode. # Because DSPAM will not allow pass-through
> arguments to be specified to # untrusted users, all arguments should
> be specified here. Use %u to specify # the user DSPAM is processing
> mail for. This configuration parameter is only
> # necessary if you plan on allowing untrusted processing.
> #
> UntrustedDeliveryAgent "/usr/lib/cyrus/deliver %u"/
> 
> When dspam does this, I'm getting permission denied from lmtp:
> 
> /status=bounced (Command died with status 255: "/usr/bin/dspam
> --deliver=innocent --user $USER". Command output: couldn't connect to
> lmtpd: Permission denied_ 421 4.3.0 deliver: couldn't connect to
> lmtpd_ 14536: [5/31/2005 6:27:16] Delivery agent returned error, exit
> code: 75, command line: /usr/lib/cyrus/deliver gander
> 
> /By default, dspam runs as UID dspam, and is set 4711 :
> 
> /-rws--x--x  1 dspam dspam 163152 May 29 10:34 /usr/bin/dspam/
> 
> The permissions on the lmtp socket:
> 
> /srwxrwxrwx   1 root  root   0 May 29 10:04 lmtp
> 
> 
> /I have tried setting dspam to setuid root:root, and setuid cyrus:mail
> with no effect.  There is something here that I am definitely not
> understanding.  Has anybody seen this, or see something stupid that
> I'm doing?
> 
> I appreciate any help at all!
> 
> Thanks,
> 
> Gerald
> 
> 
> P.S.  My cyrus.conf just to make sure:
> 
> 
> /# $Header:
> /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/files/cyrus.conf,v 1.4
> 2004/07/18 04:02:23 dragonheart Exp $
> 
> # Standard standalone server configuration.
> 
> START {
>   # Do not delete this entry!
>   recover       cmd="ctl_cyrusdb -r"
> 
>   # This is only necessary if using idled for IMAP IDLE.
>   #idled                cmd="idled"
> }
> 
> # UNIX sockets start with a slash and are put into /var/imap/socket.
> SERVICES {
>   # Add or remove based on preferences.
>   imap          cmd="imapd" listen="imap2" prefork=0
>   pop3          cmd="pop3d" listen="pop-3" prefork=0
> 
>   # Don't forget to generate the needed keys for SSL or TLS
>   # (see doc/html/install-configure.html).
>   #imaps                cmd="imapd -s" listen="imaps" prefork=0
>   #pop3s                cmd="pop3d -s" listen="pop3s" prefork=0
> 
>   sieve         cmd="timsieved" listen="sieve" prefork=0
> 
>   # at least one LMTP is required for delivery
>   #lmtp         cmd="lmtpd" listen="lmtp" prefork=0
>   lmtpunix      cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0
> 
>   # this is only necessary if using notifications
>   #notify       cmd="notifyd" listen="/var/imap/socket/notify"
> proto="udp" prefork=1
> }
> 
> EVENTS {
>   # This is required.
>   checkpoint    cmd="ctl_cyrusdb -c" period=30
> 
>   # This is only necessary if using duplicate delivery suppression.
>   delprune      cmd="ctl_deliver -E 3" period=1440
> 
>   # This is only necessary if caching TLS sessions.
>   tlsprune      cmd="tls_prune" period=1440/
> 
> 
> 
> 
> 
> ---
> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
> 
> !DSPAM:429ca78d68157228818858!
> 
> 


-- 
"What does one want when one is engaged in the sexual act?
That everything around you give you its utter attention
Think only of you, care only for you...
Every man wants to be a tyrant when he fornicates"

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list