Re: [dspam-users] Simple Relay setup

From: North Country Boy <northcountryboy79@hotmail.com>
Date: Tue Jan 17 2006 - 06:23:38 EST

Hi there,

I have read the relay.txt extensivley but it appears to be configured for
the users to exist in the virtual_uids table. When a user does not exist I
get the following error in the mail log

query error: Column 'uid' cannot be null: see sql.errors for more details
bailing on error -2
received invalid result (! DSR_ISSPAM || DSR_INNOCENT) : -2

I just want a dumb mail relay that forwards all e-mails addressed to our
domains. Any that are classified as spam should be put into a quarenteen
that I can manage.

I also followed the wiki
http://dspamwiki.expass.de/Installation/Postfix/RelayStepByStep but exactly
the same error.

There must be something simple, I have dspam working but for individual
users.

Many thanks
ncb

>From: LedHed <ledhed@ledhed.net>
>To: North Country Boy <northcountryboy79@hotmail.com>
>CC: dspam-users@lists.nuclearelephant.com
>Subject: Re: [dspam-users] Simple Relay setup
>Date: Mon, 16 Jan 2006 10:58:08 -0800
>
>North Country Boy wrote:
>
>>Hi all
>>
>>I am hoping somebody could steer me in the right direction. I am trying
>>to configure postfix+dspam+clamav as a mail gateway that will accept mail
>>addressed to
>>
>>3 possible domain names, filter for spam then deliver to the internal mail
>>server. The mail administrator will be responsible for identifying spam
>>therefore
>>
>>the quarantine is only to be accessed by him, however end users can still
>>forward mails into dspam that slip through.
>>
>>From what I have read this seems possible.
>>
>>So far on my journey, I have configured postfix which relays correctly for
>>the 3 domains and delivers to the internal mail server. I have also
>>configured mysql.
>>
>>I then compiled dspam with the following
>>
>>./configure --prefix=/usr/local/dspam
>> --with-storage-driver=mysql_drv
>> --with-mysql-libraries=/usr/local/mysql/lib
>> --with-mysql-includes=/usr/local/mysql/include
>> --enable-preferences-extension
>> --enable-daemon
>> --enable-large-scale
>> --enable-clamav
>> --enable-virtual-users
>>
>>I then configured postfix to accept the dspam as a content filter by
>>adding the following lines to the postfix master.cf
>>
>>smtp inet n - n - - smtpd -o
>>content_filter=lmtp:unix:/tmp/dspam.sock
>>
>>localhost:10026 inet n - n - - smtpd
>> -o content_filter=
>> -o
>>receive_override_options=no_unknown_recipient_checks,no_header_body_checks
>>
>> -o smtpd_helo_restrictions=
>> -o smtpd_client_restrictions=
>> -o smtpd_sender_restrictions=
>> -o smtpd_recipient_restrictions=permit_mynetworks,reject
>> -o mynetworks=127.0.0.0/8
>> -o smtpd_authorized_xforward_hosts=127.0.0.0/8
>>
>>my relay_recipients is as follows
>>@domain1.com x
>>@doman2.com x
>>@domain3.com x
>>
>>
>>My dspam.conf looks like the following;
>>Home /usr/local/dspam/var/dspam
>>StorageDriver /usr/local/dspam/lib/libmysql_drv.so
>>TrustedDeliveryAgent "/usr/bin/procmail"
>>DeliveryHost 127.0.0.1
>>DeliveryPort 10026
>>DeliveryIdent localhost
>>DeliveryProto SMTP
>>OnFail error
>>Trust root
>>Trust mail
>>Trust mailnull
>>Trust smmsp
>>Trust daemon
>>Debug *
>>TrainingMode teft
>>TestConditionalTraining on
>>Feature chained
>>Feature tb=5
>>Feature whitelist
>>Algorithm graham burton
>>PValue graham
>>Preference "spamAction=quarantine"
>>Preference "signatureLocation=message" # 'message' or 'headers'
>>Preference "showFactors=on"
>>AllowOverride trainingMode
>>AllowOverride spamAction spamSubject
>>AllowOverride statisticalSedation
>>AllowOverride enableBNR
>>AllowOverride enableWhitelist
>>AllowOverride signatureLocation
>>AllowOverride showFactors
>>AllowOverride optIn optOut
>>AllowOverride whitelistThreshold
>>MySQLServer /tmp/mysql.sock
>>#MySQLPort
>>MySQLUser dspam
>>MySQLPass sqlpass
>>MySQLDb dspam
>>MySQLCompress true
>>HashRecMax 100000
>>HashAutoExtend on
>>HashMaxExtents 0
>>HashExtentSize 50000
>>HashMaxSeek 100
>>HashConnectionCache 10
>>Notifications off
>>PurgeSignatures 14 # Stale signatures
>>PurgeNeutral 90 # Tokens with neutralish probabilities
>>PurgeUnused 90 # Unused tokens
>>PurgeHapaxes 30 # Tokens with less than 5 hits (hapaxes)
>>PurgeHits1S 15 # Tokens with only 1 spam hit
>>PurgeHits1I 15 # Tokens with only 1 innocent hit
>>LocalMX 127.0.0.1
>>SystemLog on
>>UserLog on
>>Opt out
>>ServerPID /var/run/dspam.pid
>>ServerMode auto
>>ServerParameters "--deliver=innocent"
>>ServerIdent "localhost.localdomain"
>>ServerDomainSocketPath "/tmp/dspam.sock"
>>ProcessorBias on
>>
>>Using this configuration, I managed to get dspam working but only for full
>>e-mail addresses that I manually add into the virtual_uids table in mysql.
>>eg northcountryboy79@domain1.com. As I mentioned earlier I need this to
>>work for <anything>@domain<1,2,3>.com, I dont want to manage an entire
>>database of e-mail addresses on this gateway. I tried to add @domain1.com
>>to the virtual_uids table but it doesnt work.
>>
>>Does anybody have any ideas on what I have missed? I am sure there must
>>be some ISP out there who uses exactly the same config, albeit with more
>>domains :-)
>>
>>
>>Many thanks in advance
>>NCB
>>
>>_________________________________________________________________
>>The new MSN Search Toolbar now includes Desktop search!
>>http://toolbar.msn.co.uk/
>>
>>
>>
>Read the relay.txt in the Docs directory. The key is setting postfix up to
>use DSpam as a virtual_transport.
>
> -LedHed

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters!
http://www.msn.co.uk/newsletters
Received on Tue Jan 17 06:25:46 2006

This archive was generated by hypermail 2.1.8 : Wed Jan 18 2006 - 00:00:01 EST