OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Problems with local delivery after installing DSPAM

From: Anders Bruun Olsen (andersbruun-olsen.net)
Date: Mon Sep 06 2004 - 09:34:19 CDT


Hi,

On my Postfix 2.1.4 installation I had a fully working system using
amavisd-new+spamassassin+clamav and delivered to maildirs using maildrop
1.5.3. I decided to replace spamassassin with DSPAM, but after setting
it up my mailman mailinglists don't work correctly (mails sent to them
end up trying to be delivered by maildrop instead of piping them to
mailman, which of course fails.
Also aliases that forward to addresses not local end up trying to be
delivered locally.

If I requeue (postsuper -r) those messages that should be delivered to
external adresses, they are delivered correctly, but adresses that are
local but should be piped to mailman still get stuck with maildrop
(correctly) claiming invalid user.

Anybody able to help me solve (and understand) these problems?

--- Outtake from main.cf ---
# Process info
mail_owner = postfix
setgid_group = postdrop

# Hostnames
myhostname = elmer.skumleren.net
mydomain = skumleren.net
myorigin = $mydomain
mydestination = $myhostname, localhost.$mydomain, $mydomain

# Login banner
smtpd_banner = $myhostname ESMTP NO UCE (NO SPAM PLEASE)

# Delivery of mails
local_recipient_maps = unix:passwd.byname $alias_maps
unknown_local_recipient_reject_code = 450
recipient_limit =1
message_size_limit = 10280000
home_mailbox = .maildir/

# Who to allow relaying from
mynetworks_style = host

# Aliases and virtual stuff
virtual_alias_domains = hash:/etc/mail/virtual
virtual_alias_maps = hash:/etc/mail/virtual
alias_maps = hash:/usr/local/mailman/data/aliases, hash:/etc/mail/aliases
alias_database = hash:/usr/local/mailman/data/aliases, hash:/etc/mail/aliases
local_transport = maildrop
local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 10
transport_maps = regexp:/etc/mail/transport_regexp

max_use = 10

# SMTP Auth
smtpd_sasl_auth_enable = yes
smtpd_sasl2_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain =

# TLS setup
smtpd_use_tls = yes
smtpd_tls_auth_only = yes
smtpd_tls_key_file = /etc/ssl/mail-cert/server.key
smtpd_tls_cert_file = /etc/ssl/mail-cert/server.crt
smtpd_tls_CAfile = /etc/ssl/cacert.crt
smtpd_tls_loglevel = 0
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

# Restrictions all around
smtpd_sender_restriction = reject_unknown_sender_domain,
                                reject_non_fqdn_sender

smtpd_recipient_restrictions = permit_mynetworks,
                                permit_sasl_authenticated,
                                reject_non_fqdn_recipient,
                                reject_unauth_destination,
                                check_policy_service inet:127.0.0.1:10023

smtpd_client_restrictions = reject_rbl_client relays.ordb.org,
                                reject_rbl_client bl.spamcop.net

# Mailman specific stuff
owner_request_special = no

# DSPAM stuff
dspam_destination_recipient_limit = 1
dspam-add_destination_recipient_limit = 1
dspam-fp_destination_recipient_limit = 1
---

--- Outtake from master.cf ---
smtp inet n - n - - smtpd
    -o content_filter=smtp-amavis:[127.0.0.1]:10024

local unix - n n - - local
    -o content_filter=
    -o myhostname=localhost
    -o local_recipient_maps=
    -o relay_recipient_maps=
    -o mynetworks=127.0.0.0/8
    -o mynetworks_style=host
    -o smtpd_restriction_classes=
    -o smtpd_client_restrictions=
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject

maildrop unix - n n - - pipe
  flags=DRhu user=mail argv=/usr/bin/maildrop -d ${user} -f ${sender} ${extension}

smtp-amavis unix - - n - 2 lmtp
    -o smtp_data_done_timeout=1200
    -o disable_dns_lookups=yes
    -o smtp_send_xforward_command=yes

127.0.0.1:10025 inet n - n - - smtpd
    -o content_filter=dspam:dummy
    -o local_recipient_maps=
    -o relay_recipient_maps=
    -o smtpd_restriction_classes=
    -o smtpd_client_restrictions=
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o mynetworks=127.0.0.0/8
    -o strict_rfc821_envelopes=yes
    -o cleanup_service_name=pre-cleanup
    -o smtpd_error_sleep_time=0
    -o smtpd_soft_error_limit=1001
    -o smtpd_hard_error_limit=1000

127.0.0.1:10026 inet n - n - - smtpd

dspam unix - n n - 10 pipe
  flags=Rhq user=dspam argv=/usr/bin/dspam --mode=teft --deliver=innocent,spam --feature=chained,noise -f ${sender} --user ${user}

cleanup unix n - n - 0 cleanup
    -o header_checks=
    -o mime_header_checks=
    -o nested_header_checks=
    -o body_checks=

pre-cleanup unix n - n - 0 cleanup
    -o canonical_maps=
    -o sender_canonical_maps=
    -o recipient_canonical_maps=
    -o masquerade_domains=
    -o virtual_alias_maps=
    -o always_bcc=
    -o sender_bcc_maps=
    -o recipient_bcc_maps=

dspam-add unix - n n - - pipe
    flags=Rhq user=dspam argv=/usr/bin/dspam --mode=teft --user ${user}${nexthop} --class=spam --source=error

dspam-fp unix - n n - - pipe
    flags=Rhq user=dspam argv=/usr/bin/dspam --mode=teft --user ${user}${nexthop} --class=innocent --source=error
---

--
Anders
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/O d-- s:+ a-- C++ UL+++$ P++ L+++ E- W+ N(+) o K? w O-- M- V
PS+ PE Y+ PGP+ t 5 X R+ tv+ b++ DI+++ D+ G e- h !r y?
------END GEEK CODE BLOCK------
PGPKey: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8BFECB41