[Postfixbuch-users] Diverse Probleme mit Postfix - Amavis und mySql

Matthias Ebner rainier.wulfcastle at web.de
Fr Feb 21 19:41:37 CET 2003


Hallo,

Nach langem Lesen und nachforschen, hab ich Gestern damit begonnen, einen
neuen Postfix Server (den ersten) aufzusetzen.

Die Basis ist ein aktuelles Debian Woody Stable.

Folgende Probleme konnte ich leider noch nicht lösen:

- Amavis Fehler in den logfiles.
- Courier kann die Userdaten beim login nicht prüfen.
- Das Telnet von Remotemaschinen klappt.
  Wenn ich jedoch direkt auf der Linux Konsole per Telnet auf 127.0.0.1
25/10025
  gehe, klappt dies ebenfalls. nicht jedoch bei "localhost" dort hängt die
Verbindung fest.

Anbei die wichtigsten Dateien.

Die Konfig wurde nach dem Howto auf
http://www.marlow.dk/tech/postfix.html durchgeführt.


Master.cf
===========================================================================
# service type        private        unpriv        chroot        wakeup
maxproc        command + args
#                 (yes)        (yes)        (yes)        (never)        (50)
# ==========================================================================
smtp          inet        n        -        -        -        -       smtpd
localhost:10025 inet  n -       n       -       -
smtpd -o content_filter=
#628          inet        n        -        -        -        -        qmqpd
pickup        fifo        n        -        -        60        1
pickup
cleanup       unix        n        -        -        -        0
cleanup
qmgr          fifo        n        -        -        300        1
qmgr
#qmgr         fifo        n        -        -        300        1
nqmgr
rewrite       unix        -        -        -        -        -
trivial-rewrite
bounce        unix        -        -        -        -        0
bounce
defer         unix        -        -        -        -        0
bounce
flush         unix        n        -        -     1000?        0
flush
smtp          unix        -        -        -        -        -        smtp
showq         unix        n        -        -        -        -        showq
error         unix        -        -        -        -        -        error
local         unix        -        n        n        -        -        local
virtual       unix        -        n        n        -        -
virtual
lmtp          unix        -        -        n        -        -        lmtp
amavis        unix  -       n       n       -                 5        pipe
   user=amavis argv=/usr/sbin/amavis ${sender} ${recipient}
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
# The Cyrus deliver program has changed incompatibly.
#
cyrus  unix - n  n    -     -   pipe
  flags=R user=cyrus argv=/usr/sbin/cyrdeliver -e -m ${extension} ${user}
uucp          unix        -        n        n        -        -        pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
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/lib/bsmtp/bsmtp -d -t$nexthop -f$sender
$recipient
scalemail-backend unix        -        n        n        -        2
pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
${nexthop} ${user} ${extension}

# only used by postfix-tls
#smtps          inet        n        -        n        -    -  smtpd -o
#smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#587          inet        n        -        n        -      -    smtpd -o
#smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes


Die main.cf
============================================================================
=================
daemon_directory = /usr/lib/postfix
program_directory = /usr/lib/postfix
default_privs = nobody
mail_owner = postfix

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
setgid_group = postdrop
biff = no
append_dot_mydomain = no

myhostname = srv002.intern.syneha.de
mydomain = intern.syneha.de
myorigin = $myhostname
mydestination = $myhostname, localhost.intern.syneha.de, localhost,
$transport_maps

home_mailbox = Maildir/

relayhost = smtp.1und1.com

alias_maps                = mysql:/etc/postfix/mysql-aliases.cf
relocated_maps            = mysql:/etc/postfix/mysql-relocated.cf
transport_maps            = mysql:/etc/postfix/mysql-transport.cf
virtual_maps              = mysql:/etc/postfix/mysql-virtual.cf

local_recipient_maps      = $alias_maps $virtual_mailbox_maps
unix:passwd.byname

virtual_mailbox_base      = /home/vmail
virtual_mailbox_maps      = mysql:/etc/postfix/mysql-virtual-maps.cf
virtual_uid_maps          = mysql:/etc/postfix/mysql-virtual-uid.cf
virtual_gid_maps          = mysql:/etc/postfix/mysql-virtual-gid.cf

#Smtp_auth fuer eingehende Verbindungen
smtpd_sasl_auth_enable                 = yes
broken_sasl_auth_clients               = yes
smtpd_sasl_security_options            = noanonymous

#Smtp_auth fuer ausgehende Verbindungen
smtp_sasl_auth_enable                  = yes
smtp_sasl_password_maps                = hash:/etc/postfix/smtp_auth
smtp_sasl_security_options             = noanonymous
relayhost                              = smtp.1und1.com

smtpd_recipient_restrictions           = permit_mynetworks,
                                         permit_sasl_authenticated,
                                         reject_maps_rbl,
                                         check_relay_domains,
                                         reject

maps_rbl_domains = rbl.maps.vix.com
                   relays.mail-abuse.org
                   relays.ordb.org
                   spamhaus.relays.osirusoft.com
                   spews.relays.osirusoft.com

content_filter = amavis:

============================================================================
====================

Die /etc/pam.d/smtp

============================================================================
===================
auth    optional        pam_mysql.so server=localhost db=postfix
user=postfix passwd=postfix table=user usercolumn=email passwdcolumn=clear
crypt=n

account required        pam_mysql.so server=localhost db=postfix
user=postfix passwd=postfix table=users usercolumn=email passwdcolumn=clear
crypt=n

============================================================================
=====================

/etc/postfix/sasl/smtpd.conf
============================================================================
===================
pwcheck_method: PAM


============================================================================
====================

Mail.log
============================================================================
====================
Feb 21 21:12:28 srv002 postfix/postfix-script: refreshing the Postfix mail
system
Feb 21 21:12:28 srv002 postfix/master[339]: reload configuration
Feb 21 21:12:47 srv002 imaplogin: Connection, ip=[::ffff:127.0.0.1]
Feb 21 21:13:29 srv002 courierpop3login: Connection, ip=[::ffff:127.0.0.1]
Feb 21 21:13:39 srv002 courierpop3login: Disconnected, ip=[::ffff:127.0.0.1]
Feb 21 21:17:22 srv002 postfix/smtpd[1032]: connect from
unknown[192.168.1.5]
Feb 21 21:17:34 srv002 postfix/smtpd[1032]: 88495407C:
client=unknown[192.168.1.5]
Feb 21 21:18:02 srv002 postfix/cleanup[1033]: 88495407C:
message-id=<20030221201734.88495407C at srv002.intern.syneha.de>
Feb 21 21:18:02 srv002 postfix/qmgr[1005]: 88495407C:
from=<tester at testserver.de>, size=405, nrcpt=1 (queue active)
Feb 21 21:18:02 srv002 amavis[1045]: All virus scanners failed!
Feb 21 21:18:02 srv002 amavis[1045]: do_exit:959 - ending execution with 75
Feb 21 21:18:02 srv002 postfix/pipe[1043]: 88495407C: to=<mail at domain.de>,
relay=amavis, delay=28, status=deferred (temporary failure)
Feb 21 21:18:05 srv002 postfix/smtpd[1032]: disconnect from
unknown[192.168.1.5]
Feb 21 21:29:08 srv002 postfix/qmgr[1005]: 881614079:
from=<tester at testserver.de>, size=404, nrcpt=1 (queue active)
Feb 21 21:29:08 srv002 postfix/qmgr[1005]: 6B694407B:
from=<tester at ts?estserver.de>, size=408, nrcpt=1 (queue active)
Feb 21 21:29:08 srv002 postfix/qmgr[1005]: 3993F407A:
from=<tester at testserver.de>, size=430, nrcpt=1 (queue active)
Feb 21 21:29:09 srv002 amavis[1098]: All virus scanners failed!
Feb 21 21:29:09 srv002 amavis[1098]: do_exit:959 - ending execution with 75
Feb 21 21:29:09 srv002 postfix/pipe[1095]: 881614079:
to=<postmaster at srv002.intern.syneha.de>, relay=amavis, delay=4138,
status=deferred (temporary failure)
Feb 21 21:29:09 srv002 amavis[1103]: All virus scanners failed!
Feb 21 21:29:09 srv002 amavis[1103]: do_exit:959 - ending execution with 75
Feb 21 21:29:09 srv002 postfix/pipe[1096]: 6B694407B: to=<mail at domain.de>,
relay=amavis, delay=3461, status=deferred (temporary failure)
Feb 21 21:29:09 srv002 amavis[1107]: All virus scanners failed!
Feb 21 21:29:09 srv002 amavis[1107]: do_exit:959 - ending execution with 75
Feb 21 21:29:09 srv002 postfix/pipe[1101]: 3993F407A: to=<mail at domain.de>,
relay=amavis, delay=3139, status=deferred (temporary failure)
============================================================================
====================

Die Datenbank wie auf http://www.marlow.dk/tech/postfix.html

Die Courierdateien.

/etc/courier/imapd
============================================================================
=================
AUTHMODULES="authdaemon"

IMAP_CAPABILITY="IMAPrev1 CHILDREN NAMESPACE THREAD=ORDERBYSUBJECT
THREAD=REFERENCES
SORT AUTH=CRAM-MD5 AUTH=CRAM-SHA1 IDLE"

IMAPSTART=YES
============================================================================
===================

/etc/courier/pop3d
============================================================================
====================
AUTHOMODULES="authdaemon"

POP§AUTH="LOGIN CRAM-MD5 CRAM-SHA1"

POP3DSTART=YES
============================================================================
==================

/etc/courier/authdaemonrc
============================================================================
===================
authmodulelist="authmysql authpam"
============================================================================
===================

/etc/courier/authmysqlrc
============================================================================
==================
MYSQL_SERVER		localhost
MYSQL_USERNAME		postfix
MYSQL_PASSWORD		postfix
MYSQL_PORT			0
MYSQL_OPT			0
MYSQL_DATABASE		postfix
MYSQL_USER_TABLE		users
MYSQL_LOGIN_FIELD		email
MYSQL_CLEAR_PWFIELD	clear
MYSQL_UID_FIELD		uid
MYSQL_GID_FIELD		gid
MYSQL_HOME_FIELD		homedir
MYSQL_MAILDIR_FIELD	maildir
============================================================================
===================

SASL Library:
/etc/postfix/sasl/smtpd.conf
============================================================================
==================
pwcheck_method: PAM
============================================================================
=================


Würd mich über Tipps freuen.
Vermutlich nur eine Kleinigkeit.

Vielen Dank.

mfg

Matthias



Mehr Informationen über die Mailingliste Postfixbuch-users