# I can't use dspam (solved)

## 22decembre

I am trying to use dspam to filter my mail. I have postfix and dovecot well setup. No problem, I receive mails.

To setup dspam, I followed this howto (in french) : http://nyrodev.info/fr/posts/242/Serveur_de_mail_postfix_dovecot_dspam_clamav_Serveur_Web_sur_Debian_Lenny

this are my config files :

/etc/dspam/dspam.conf

```

#

# DSPAM Home: Specifies the base directory to be used for DSPAM storage

#

Home /var/spool/dspam

StorageDriver /usr/lib64/dspam/libmysql_drv.so

#

# Trusted Delivery Agent: Specifies the local delivery agent DSPAM should call 

# when delivering mail as a trusted user. Use %u to specify the user DSPAM is 

# processing mail for. It is generally a good idea to allow the MTA to specify 

# the pass-through arguments at run-time, but they may also be specified here.

#

#TrustedDeliveryAgent "/usr/libexec/dovecot/deliver -d %u"

DeliveryHost 127.0.0.1

DeliveryPort 10026

DeliveryIdent localhost

DeliveryProto SMTP

#

# Quarantine Agent: DSPAM's default behavior is to quarantine all mail it 

# thinks is spam. If you wish to override this behavior, you may specify

# a quarantine agent which will be called with all messages DSPAM thinks is

# spam. Use %u to specify the user DSPAM is processing mail for.

#

QuarantineAgent   "/usr/libexec/dovecot/deliver -d %u -m spam"

#

# OnFail: What to do if local delivery or quarantine should fail. If set

# to "unlearn", DSPAM will unlearn the message prior to exiting with an

# un successful return code. The default option, "error" will not unlearn

# the message but return the appropriate error code. The unlearn option

# is use-ful on some systems where local delivery failures will cause the

# message to be requeued for delivery, and could result in the message

# being processed multiple times. During a very large failure, however, 

# this could cause a significant load increase.

#

OnFail error

#

# Trusted Users: Only the users specified below will be allowed to perform

# administrative functions in DSPAM such as setting the active user and

# accessing tools. All other users attempting to run DSPAM will be restricted;

# their uids will be forced to match the active username and they will not be

# able to specify delivery agent privileges or use tools.

#

Trust root

Trust dspam

#

# Debugging: Enables debugging for some or all users. IMPORTANT: DSPAM must

# be compiled with debug support in order to use this option. DSPAM should

# never be running in production with debug active unless you are 

# troubleshooting problems.

#

# DebugOpt: One or more of: process, classify, spam, fp, inoculation, corpus

#   process     standard message processing

#   classify    message classification using --classify

#   spam        error correction of missed spam

#   fp          error correction of false positives

#   inoculation message inoculations (source=inoculation)

#   corpus      corpusfed messages (source=corpus)

#

#Debug *

#Debug bob bill

#

#DebugOpt process spam fp

#

# ClassAlias: Alias a particular class to spam/nonspam. This is useful if

# classifying things other than spam.

#

#ClassAliasSpam badstuff

#ClassAliasNonspam goodstuff

#

# Training Mode: The default training mode to use for all operations, when

# one has not been specified on the commandline or in the user's preferences.

# Acceptable values are: 

#     toe     Train on Error (Only)

#     teft    Train Everything (Trains on every message)

#     tum     Train Until Mature (Train only tokens without enough data)

#     notrain Do not train or store signatures (large ISP systems, post-train)

#

TrainingMode teft

#

# TestConditionalTraining: By default, dspam will retrain certain errors

# until the condition is no longer met. This usually accelerates learning.

# Some people argue that this can increase the risk of errors, however.

#

TestConditionalTraining on

#

# Features: Specify features to activate by default; can also be specified

# on the commandline. See the documentation for a list of available features.

# If _any_ features are specified on the commandline, these are ignored.

#

#Feature noise

Feature whitelist

# Training Buffer: The training buffer waters down statistics during training.

# It is designed to prevent false positives, but can also dramatically reduce

# dspam's catch rate during initial training. This can be a number from 0

# (no buffering) to 10 (maximum buffering). If you are paranoid about false

# positives, you should probably enable this option.

#

#Feature tb=5

#

# Algorithms: Specify the statistical algorithms to use, overriding any

# defaults configured in the build. The options are:

#    naive       Naive-Bayesian (All Tokens)

#    graham      Graham-Bayesian ("A Plan for Spam")

#    burton      Burton-Bayesian (SpamProbe)

#    robinson    Robinson's Geometric Mean Test (Obsolete)

#    chi-square  Fisher-Robinson's Chi-Square Algorithm

#

# You may have multiple algorithms active simultaneously, but it is strongly

# recommended that you group Bayesian algorithms with other Bayesian

# algorithms, and any use of Chi-Square remain exclusive.

#

# NOTE: For standard "CRM114" Markovian weighting, use 'naive', or consider

#       using 'burton' for slightly better accuracy

#

# Don't mess with this unless you know what you're doing

#

#Algorithm chi-square

#Algorithm naive

Algorithm graham burton

#

# Tokenizer: Specify the tokenizer to use. The tokenizer is the piece

# responsible for parsing the message into individual tokens. Depending on

# how many resources you are willing to trade off vs. accuracy, you may

# choose to use a less or more detailed tokenizer:

#   word    uniGram (single word) tokenizer

#           Tokenizes message into single individual words/tokens

#           example: "free" and "viagra"

#   chain   biGram (chained tokens) tokenizer (default)

#           Single words + chains adjacent tokens together

#           example: "free" and "viagra" and "free viagra"

#   sbph    Sparse Binary Polynomial Hashing tokenizer

#           Creates sparse token patterns across sliding window of 5-tokens

#           example: "the quick * fox jumped" and "the * * fox jumped"

#   osb     Orthogonal Sparse biGram

#           Similar to SBPH, but only uses the biGrams

#           example: "the * * fox" and "the * * * jumped"

#

Tokenizer chain

#

# PValue: Specify the technique used for calculating Probability Values, 

# overriding any defaults configured in the build. These options are:

#    bcr         Bayesian Chain Rule (Graham's Technique - "A Plan for Spam")

#    robinson    Robinson's Technique (used in Chi-Square) 

#    markov      Markovian Weighted Technique (for Markovian discrimination)

#

# Unlike the "Algorithms" property, you may only have one of these defined. 

# Use of the chi-square algorithm automatically changes this to robinson.

#

# Don't mess with this unless you know what you're doing.

#

#PValue robinson

#PValue markov

PValue bcr

#

# Preferences: Specify any preferences to set by default, unless otherwise

# overridden by the user (see next section) or a default.prefs file.

# If user or default.prefs are found, the user's preferences will override any

# defaults.

#

Preference "spamAction=quarantine"

Preference "signatureLocation=message"   # 'message' or 'headers'

Preference "showFactors=on"

#Preference "spamAction=tag"

#Preference "spamSubject=SPAM"

#

# Overrides: Specifies the user preferences which may override configuration

# and commandline defaults. Any other preferences supplied by an untrusted user

# will be ignored.

#

AllowOverride trainingMode

AllowOverride spamAction spamSubject

AllowOverride statisticalSedation

AllowOverride enableBNR

AllowOverride enableWhitelist

AllowOverride signatureLocation

AllowOverride showFactors

AllowOverride optIn optOut

AllowOverride whitelistThreshold

# --- MySQL ---

#

# Storage driver settings: Specific to a particular storage driver. Uncomment

# the configuration specific to your installation, if applicable.

#

MySQLServer       /var/run/mysqld/mysqld.sock

MySQLUser            dspam

MySQLPass       MjY4mtqKyu3RrCn5

MySQLDb              dspam

MySQLCompress      false

MySQLConnectionCache   3

Notifications   off

#

# Purge configuration: Set dspam_clean purge default options, if not otherwise

# specified on the commandline

#

#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

#

# Purge configuration for SQL-based installations using purge.sql

#

PurgeSignature   off # Specified in purge.sql

PurgeNeutral   90

PurgeUnused    off # Specified in purge.sql

PurgeHapaxes   off # Specified in purge.sql

PurgeHits1S    off # Specified in purge.sql

PurgeHits1I    off # Specified in purge.sql

#

# Local Mail Exchangers: Used for source address tracking, tells DSPAM which

# mail exchangers are local and therefore should be ignored in the Received:

# header when tracking the source of an email. Note: you should use the address

# of the host as appears between brackets [ ] in the Received header.

#

LocalMX 127.0.0.1

#

# Logging: Disabling logging for users will make usage graphs unavailable to

# them. Disabling system logging will make admin graphs unavailable.

#

SystemLog on

UserLog   on

#

# TrainPristine: for systems where the original message remains server side 

# and can therefore be presented in pristine format for retraining. This option

# will cause DSPAM to cease all writing of signatures and DSPAM headers to the 

# message, and deliver the message in as pristine format as possible. This mode

# REQUIRES that the original message in its pristine format (as of delivery) 

# be presented for retraining, as in the case of webmail, imap, or other 

# applications where the message is actually kept server-side during reading, 

# and is preserved. DO NOT use this switch unless the original message can be 

# presented for retraining with the ORIGINAL HEADERS and NO MODIFICATIONS.

#

# NOTE: You can't use this setting with dspam_trian; if you're going to use it,

#       wait until after you train any corpora.

#

#TrainPristine on

#

# Opt: in or out; determines DSPAM's default filtering behavior. If this value

# is set to in, users must opt-in to filtering by dropping a .dspam file in

# /var/dspam/opt-in/user.dspam (or if you have homedirs configured, a .dspam

# folder in their home directory).  The default is opt-out, which means all 

# users will be filtered unless a .nodspam file is dropped in 

# /var/dspam/opt-out/user.nodspam

#

Opt out

#

# TrackSources: specify which (if any) source addresses to track and report

# them to syslog (mail.info). This is useful if you're running a firewall or

# blacklist and would like to use this information. Spam reporting also drops

# RABL blacklist files (see http://www.nuclearelephant.com/projects/rabl/). 

#

TrackSources spam virus nonspam

#

# Broken MTA Options: Some MTAs don't support the proper functionality

# necessary. In these cases you can activate certain features in DSPAM to

# compensate. 'returnCodes' causes DSPAM to return an exit code of 99 if

# the message is spam, 0 if not, or a negative code if an error has occured.

# Specifying 'case' causes DSPAM to force the input usernames to lowercase.

# Spceifying 'lineStripping' causes DSPAM to strip ^M's from messages passed

# in.

#

#Broken returnCodes

#Broken case

#Broken lineStripping

#

# MaxMessageSize: You may specify a maximum message size for DSPAM to process.

# If the message is larger than the maximum size, it will be delivered 

# without processing. Value is in bytes.

#

#MaxMessageSize 4194304

#

# Virus Checking: If you are running clamd, DSPAM can perform stream-based

# virus checking using TCP. Uncomment the values below to enable virus

# checking. 

#

# ClamAVResponse: reject (reject or drop the message with a permanent failure)

#                 accept (accept the message and quietly drop the message)

#                 spam   (treat as spam and quarantine/tag/whatever)

#

ClamAVPort   3310

ClamAVHost   127.0.0.1

ClamAVResponse spam

# -- CLIENT / SERVER --

#

# Daemonized Server: If you are running DSPAM as a daemonized server using

# --daemon, the following parameters will override the default. Use the

# ServerPass option to set up accounts for each client machine. The DSPAM

# server will process and deliver the message based on the parameters 

# specified. If you want the client machine to perform delivery, use

# the --stdout option in conjunction with a local setup. 

#

#ServerPort      127.0.0.1

#ServerPort      100

ServerQueueSize   32

ServerPID              /var/run/dspam/dspam.pid

#

# ServerMode specifies the type of LMTP server to start. This can be one of:

#     dspam: DSPAM-proprietary DLMTP server, for communicating with dspamc

#  standard: Standard LMTP server, for communicating with Postfix or other MTA

#      auto: Speak both DLMTP and LMTP; auto-detect by ServerPass.IDENT

#

ServerMode standard

# If supporting DLMTP (dspam) mode, dspam clients will require authentication 

# as they will be passing in parameters. The idents below will be used to

# determine which clients will be speaking DLMTP, so if you will be using

# both LMTP and DLMTP from the same host, be sure to use something other

# than the server's hostname below (which will be sent by the MTA during a 

# standard LMTP LHLO).

# 

ServerPass.Relay1   "secret"

#ServerPass.Relay2   "password"

# If supporting standard LMTP mode, server parameters will need to be specified

# here, as they will not be passed in by the mail server. The ServerIdent

# specifies the 250 response code ident sent back to connecting clients and

# should be set to the hostname of your server, or an alias.

#

# NOTE: If you specify --user in ServerParameters, the RCPT TO will be

#       used only for delivery, and not set as the active user for processing.

#

ServerParameters   "--deliver=innocent -d %u"

ServerIdent      "localhost.localdomain"

# If you wish to use a local domain socket instead of a TCP socket, uncomment

# the following. It is strongly recommended you use local domain sockets if

# you are running the client and server on the same machine, as it eliminates

# much of the bandwidth overhead.

#

ServerDomainSocketPath  "/var/run/dspam/dspam.sock"

#

# Client Mode: If you are running DSPAM in client/server mode, uncomment and

# set these variables. A ClientHost beginning with a / will be treated as

# a domain socket.

#

ClientHost   "/var/run/dspam/dspam.sock"

ClientIdent   "secret@Relay1"

#

#ClientHost   127.0.0.1

#ClientPort   100

ClientIdent   "secret@Relay1"

# RABLQueue: Touch files in the RABL queue

# If you are a reporting streamlined blackhole list participant, you can

# touch ip addresses within the directory the rabl_client process is watching.

#

#RABLQueue   /var/spool/rabl

# DataSource: If you are using any type of data source that does not include

# email-like headers (such as documents), uncomment the line below. This

# will cause the entire input to be treated like a message "body"

#

#DataSource      document

# ProcessorWordFrequency: By default, words are only counted once per message.

# If you are classifying large documents, however, you may wish to count once

# per occurrence instead.

#

#ProcessorWordFrequency  occurrence

# ProcessorURLContext: By default, a URL context is generated for URLs, which

# records their tokens as separate from words found in documents. To use

# URL tokens in the same context as words, turn this feature off. 

#

ProcessorURLContext on

# ProcessorBias: Bias causes the filter to lean more toward 'innocent', and

# usually greatly reduces false positives. It is the default behavior of

# most Bayesian filters (including dspam). 

#

# NOTE: You probably DONT want this if you're using Markovian Weighting, unless

# you are paranoid about false positives.

#

ProcessorBias on

# StripRcptDomain: Cut the domain (including the at sign)  from recipients.

# This is particularly useful if the recipient name is equal to real user

# accounts as recipients with domains tend to cause permission issues with

# dspam-web.

#

StripRcptDomain off
```

I have the correct socket /var/run/dspam/dspam.sock and dspam is listenning on.

/etc/postfix/master.cf

```
#

# Postfix master process configuration file.  For details on the format

# of the file, see the master(5) manual page (command: "man 5 master").

#

# Do not forget to execute "postfix reload" after editing this file.

#

# ==========================================================================

# service type  private unpriv  chroot  wakeup  maxproc command + args

#               (yes)   (yes)   (yes)   (never) (100)

# ==========================================================================

smtp      inet  n       -       n       -       -       smtpd -o content_filter=lmtp:unix:/var/run/dspam/dspam.sock

#  -o smtpd_sasl_auth_enable=yes

#  -o smtpd_sasl_type=dovecot

#  -o smtpd_sasl_path=private/auth

#  -o smtpd_sasl_security_options=noanonymous

#  -o smtpd_recipient_restrictions=permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination

#smtp      inet  n       -       n       -       -       smtpd

# le demon qui reçoit les messages filtrés par dspam

127.0.0.1:10026 inet    n       -       -       -       -       smtpd

      -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

#628      inet  n       -       n       -       -       qmqpd

pickup    fifo  n       -       n       60      1       pickup

cleanup   unix  n       -       n       -       0       cleanup

qmgr      fifo  n       -       n       300     1       qmgr

#qmgr     fifo  n       -       n       300     1       oqmgr

tlsmgr    unix  -       -       n       1000?   1       tlsmgr

rewrite   unix  -       -       n       -       -       trivial-rewrite

bounce    unix  -       -       n       -       0       bounce

defer     unix  -       -       n       -       0       bounce

trace     unix  -       -       n       -       0       bounce

verify    unix  -       -       n       -       1       verify

flush     unix  n       -       n       1000?   0       flush

proxymap  unix  -       -       n       -       -       proxymap

proxywrite unix -       -       n       -       1       proxymap

smtp      unix  -       -       n       -       -       smtp

# When relaying mail as backup MX, disable fallback_relay to avoid MX loops

relay     unix  -       -       n       -       -       smtp

   -o smtp_fallback_relay=

#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5

showq     unix  n       -       n       -       -       showq

error     unix  -       -       n       -       -       error

retry     unix  -       -       n       -       -       error

discard   unix  -       -       n       -       -       discard

local     unix  -       n       n       -       -       local

virtual   unix  -       n       n       -       -       virtual

lmtp      unix  -       -       n       -       -       lmtp

anvil     unix  -       -       n       -       1       anvil

scache    unix  -       -       n       -       1       scache

#

# ====================================================================

# Interfaces to non-Postfix software. Be sure to examine the manual

# pages of the non-Postfix software to find out what options it wants.

#

# Many of the following services use the Postfix pipe(8) delivery

# agent.  See the pipe(8) man page for information about ${recipient}

# and other message envelope options.

# ====================================================================

#

# maildrop. See the Postfix MAILDROP_README file for details.

# Also specify in main.cf: maildrop_destination_recipient_limit=1

#

#maildrop  unix  -       n       n       -       -       pipe

#  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}

#

# ====================================================================

#

# The Cyrus deliver program has changed incompatibly, multiple times.

#

#old-cyrus unix  -       n       n       -       -       pipe

#  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}

#

# ====================================================================

#

# Cyrus 2.1.5 (Amos Gouaux)

# Also specify in main.cf: cyrus_destination_recipient_limit=1

#

#cyrus     unix  -       n       n       -       -       pipe

#  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}

#

# ====================================================================

#

# See the Postfix UUCP_README file for configuration details.

#

#uucp      unix  -       n       n       -       -       pipe

#  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)

#

# ====================================================================

#

# Other external delivery methods.

#

#ifmail    unix  -       n       n       -       -       pipe

#  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)

#

#bsmtp     unix  -       n       n       -       -       pipe

#  flags=Fq. user=bsmtp argv=/usr/sbin/bsmtp -f $sender $nexthop $recipient

#

#scalemail-backend unix -       n       n       -       2       pipe

#  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store

#  ${nexthop} ${user} ${extension}

#

#mailman   unix  -       n       n       -       -       pipe

#  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py

#  ${nexthop} ${user}

dovecot    unix    -       n       n       -       -       pipe

        flags=DRhu user=dovecot:dovecot argv=/usr/libexec/dovecot/deliver -d %u

#bogofilter   unix   -   n   n   -   -   pipe

#    user=bogofilter argv=/usr/local/bin/bogofilter.sh -f ${sender} -- ${recipient}

```

mail.log :

```
Aug  7 17:12:07 einstein dspam[569]: bailing on error -2

Aug  7 17:12:07 einstein dspam[569]: received invalid result (! DSR_ISSPAM || DSR_INNOCENT) : -2

Aug  7 17:12:07 einstein dspam[569]: process_message returned error -2.  delivering.

Aug  7 17:12:07 einstein dspam[569]: Received error on greeting: 

Aug  7 17:12:07 einstein dspam[569]: Delivery failed completely

Aug  7 17:12:07 einstein postfix/master[22301]: warning: process /usr/lib64/postfix/smtpd pid 898 exit status 1

Aug  7 17:12:07 einstein dspam[569]: bailing on error -2

Aug  7 17:12:07 einstein dspam[569]: received invalid result (! DSR_ISSPAM || DSR_INNOCENT) : -2

Aug  7 17:12:07 einstein dspam[569]: process_message returned error -2.  delivering.

Aug  7 17:12:07 einstein dspam[569]: Received error on greeting: 

Aug  7 17:12:07 einstein dspam[569]: Delivery failed completely

Aug  7 17:12:07 einstein postfix/master[22301]: warning: process /usr/lib64/postfix/smtpd pid 899 exit status 1

Aug  7 17:12:07 einstein postfix/lmtp[856]: B02AD1EBC3: to=<stephane@22decembre.eu>, relay=einstein.22decembre.eu[/var/run/dspam/dspam.sock], delay=15792, delays=15728/1.5/0/62, dsn=4.3.0, status=deferred (host einstein.22decembre.eu[/var/run/dspam/dspam.sock] said: 421 4.3.0 <stephane@22decembre.eu> Error occured during delivery (in reply to end of DATA command))

Aug  7 17:12:07 einstein postfix/lmtp[854]: A983E3622A: to=<stephane@22decembre.eu>, relay=einstein.22decembre.eu[/var/run/dspam/dspam.sock], delay=10460, delays=10396/1.5/0/62, dsn=4.3.0, status=deferred (host einstein.22decembre.eu[/var/run/dspam/dspam.sock] said: 421 4.3.0 <stephane@22decembre.eu> Error occured during delivery (in reply to end of DATA command))

Aug  7 17:12:07 einstein postfix/lmtp[846]: D196036218: to=<stephane@22decembre.eu>, relay=einstein.22decembre.eu[/var/run/dspam/dspam.sock], delay=14905, delays=14841/2.5/0.17/61, dsn=4.3.0, status=deferred (host einstein.22decembre.eu[/var/run/dspam/dspam.sock] said: 421 4.3.0 <stephane@22decembre.eu> Error occured during delivery (in reply to end of DATA command))

Aug  7 17:12:58 einstein postfix[910]: fatal: usage: postfix [-c config_dir] [-Dv] command

Aug  7 17:13:07 einstein postfix/smtpd[912]: connect from unknown[127.0.0.1]

Aug  7 17:13:07 einstein postfix/smtpd[912]: warning: SASL: Connect to /var/spool/postfix/private/auth failed: No such file or directory

Aug  7 17:13:07 einstein postfix/smtpd[912]: fatal: no SASL authentication mechanisms

Aug  7 17:13:07 einstein postfix/smtpd[913]: connect from unknown[127.0.0.1]

Aug  7 17:13:07 einstein postfix/smtpd[913]: warning: SASL: Connect to /var/spool/postfix/private/auth failed: No such file or directory

Aug  7 17:13:07 einstein postfix/smtpd[913]: fatal: no SASL authentication mechanisms

Aug  7 17:13:08 einstein dspam[569]: Received error on greeting: 

Aug  7 17:13:08 einstein dspam[569]: Delivery failed completely

Aug  7 17:13:08 einstein postfix/master[22301]: warning: process /usr/lib64/postfix/smtpd pid 912 exit status 1

Aug  7 17:13:08 einstein postfix/master[22301]: warning: /usr/lib64/postfix/smtpd: bad command startup -- throttling

Aug  7 17:13:08 einstein dspam[569]: Received error on greeting: 

Aug  7 17:13:08 einstein dspam[569]: Delivery failed completely

Aug  7 17:13:08 einstein postfix/master[22301]: warning: process /usr/lib64/postfix/smtpd pid 913 exit status 1

Aug  7 17:13:10 einstein postfix/lmtp[848]: D7CBC34E5C: to=<stephane@22decembre.eu>, relay=einstein.22decembre.eu[/var/run/dspam/dspam.sock], delay=11160, delays=11035/2.5/0.17/122, dsn=4.3.0, status=deferred (host einstein.22decembre.eu[/var/run/dspam/dspam.sock] said: 421 4.3.0 <stephane@22decembre.eu> Error occured during delivery (in reply to end of DATA command))

Aug  7 17:13:10 einstein postfix/lmtp[859]: C43C42198D: to=<stephane@22decembre.eu>, relay=einstein.22decembre.eu[/var/run/dspam/dspam.sock], delay=15477, delays=15353/1.5/0/123, dsn=4.3.0, status=deferred (host einstein.22decembre.eu[/var/run/dspam/dspam.sock] said: 421 4.3.0 <stephane@22decembre.eu> Error occured during delivery (in reply to end of DATA command))

Aug  7 17:13:29 einstein dspam[569]: bailing on error -2

Aug  7 17:13:29 einstein dspam[569]: received invalid result (! DSR_ISSPAM || DSR_INNOCENT) : -2

Aug  7 17:13:29 einstein dspam[569]: process_message returned error -2.  delivering.

Aug  7 17:14:08 einstein postfix/smtpd[943]: connect from unknown[127.0.0.1]

Aug  7 17:14:08 einstein postfix/smtpd[943]: warning: SASL: Connect to /var/spool/postfix/private/auth failed: No such file or directory

Aug  7 17:14:08 einstein postfix/smtpd[943]: fatal: no SASL authentication mechanisms

Aug  7 17:14:09 einstein postfix/master[22301]: warning: process /usr/lib64/postfix/smtpd pid 943 exit status 1

Aug  7 17:14:09 einstein postfix/master[22301]: warning: /usr/lib64/postfix/smtpd: bad command startup -- throttling

Aug  7 17:14:09 einstein dspam[569]: Received error on greeting: 

Aug  7 17:14:09 einstein dspam[569]: Delivery failed completely
```

The mailing list archive here : http://www.mail-archive.com/dspam-users@lists.nuclearelephant.com/msg02477.html says it's a problem with virtual users, but I use system users and dspam has its database well done and able to connect.

Any idea ?

----------

## magic919

I'd sort out the SASL problem, to clean up the logs.

Then if you can strip all the comments out of the configs it'll be easier to see just what you have set.

You can switch on debug in an effort to resolve too.

----------

## 22decembre

I have just fixed some part of problem today (it seems). But not sure… (didn't use a usual solution but an other one…)

I'll see if I am clear…

----------

## 22decembre

So, actually, it seems fixed.

I don't use dspam as a daemon, but as a postfix transport. But I use the settings from the tutorial (so, it's configured like a daemon, but not launched !).

After pass through dspam as a postfix transport, the mail is requeue to postix smtpd daemon through a loopback connection.

Everything is fine. The dovecot-antispam plugin works too.

----------

## niterain

 *22decembre wrote:*   

> So, actually, it seems fixed.
> 
> I don't use dspam as a daemon, but as a postfix transport. But I use the settings from the tutorial (so, it's configured like a daemon, but not launched !).
> 
> After pass through dspam as a postfix transport, the mail is requeue to postix smtpd daemon through a loopback connection.
> ...

 

Can you post your setup, I am having problems with dovecot-antispam, and postfix as well.

----------

