[Postfixbuch-users] maildrop und virtuelle User (ohne mysql)

Thomas Grieder postfix at moonsmile.ch
Mo Sep 5 13:35:48 CEST 2005


Hallo

Ich möchte mit maildrop (Standalone Packet aus debian stable (sarge))
Mails Filtern und direkt in definierte Unterverzeichnisse eines
virtuellen Benutzers ausliefern.

Leider scheitere ich schon beim Ausliefern ohne irgendwelche Filter:

Sep  5 13:30:30 moon postfix/pipe[30287]: B914B817A:
to=<user2 at domain2.tld>, relay=maildrop, delay=2618, status=deferred
(temporary failure. Command output: /usr/bin/maildrop: Invalid user
specified. )

Leider habe ich nichts brauchbares im Internet gefunden. Dort wird
überall mit mysql gearbeitet. Das wird aber in maildrop in debian stable
nicht unterstützt. Und ich habe die Benutzer sowieso in hash Tabellen.

Die virtuellen Benutzer sind in der transport Tabelle definiert:

user1 at domain1.tld	virtual:
user2 at domain2.tld	maildrop:

Für einen Benutzer habe ich zum testen maildrop aktiviert.

Die Verzeichnise (maildir) der Benutzer sind in einer hash Tabelle
"mailbox" definiert:

user1 at domain1.tld	domain1.tld/mail/user1/
user2 at domain2.tld	domain2.tld/mail/user2/

main.cf:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
biff = no
config_directory = /etc/postfix
content_filter = vscan:localhost:10024
header_checks = pcre:/etc/postfix/header_checks.pcre
home_mailbox = Maildir/
local_recipient_maps = $alias_maps $virtual_uid_maps
mailbox_size_limit = 0
message_size_limit = 20480000
mydestination = $myhostname     localhost.$myhostname   $mydomain
localhost       lists.domain1.tld
mydomain = domain1.tld
myhostname = mail.domain1.tld
mynetworks = 127.0.0.0/8,192.168.0.0/24
myorigin = /etc/mailname
recipient_canonical_maps = hash:/etc/postfix/recipient_canonical,
hash:/etc/postfix/lummerland/recipient_canonical
recipient_delimiter = +
sender_canonical_maps = hash:/etc/postfix/sender_canonical,
hash:/etc/postfix/lummerland/sender_canonical
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/saslpasswd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/ssl/capub.crt
smtp_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtp_tls_key_file = /etc/postfix/ssl/smtpd.key
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP
smtpd_recipient_restrictions = permit_mynetworks,
reject_non_fqdn_recipient,   reject_non_fqdn_sender,
reject_non_fqdn_hostname,   reject_invalid_hostname,
reject_unknown_sender_domain,   reject_unknown_recipient_domain,
check_helo_access hash:/etc/postfix/helo_access,   check_sender_access
hash:/etc/postfix/access,   permit_sasl_authenticated,
permit_mynetworks,   check_policy_service inet:127.0.0.1:60000,
permit_mx_backup,   reject_unauth_destination,   permit
smtpd_sasl_auth_enable = no
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/ssl/capub.crt
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
soft_bounce = no
transport_maps = hash:/etc/postfix/transport,
hash:/etc/postfix/transport_mailbase
virtual_gid_maps = static:5001
virtual_mailbox_base = /srv
virtual_mailbox_domains = domain2.tld, domain3.tld, domain4.tld
virtual_mailbox_maps = hash:/etc/postfix/mailbox
virtual_minimum_uid = 5000
virtual_transport = virtual
virtual_uid_maps = static:5001

master.cf:

smtp      inet  n       -       -       -       30      smtpd
#628      inet  n       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
#qmgr     fifo  n       -       -       300     1       oqmgr
qmgr      fifo  n       -       -       300     1       qmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       -       -       30      smtp
relay     unix  -       -       -       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
# Zum scannen von Viren und Spam
vscan     unix  -       -       n       -       10      smtp

#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop  unix  -       n       n       -       -       pipe
  flags=R user=mailsystem argv=/usr/bin/maildrop -V6 -d ${recipient}
#
# The Cyrus deliver program has changed incompatibly, multiple times.
cyrus     unix  -       n       n       -       -       pipe
  flags=R user=cyrus argv=/usr/sbin/cyrdeliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
#cyrus     unix  -       n       n       -       -       pipe
#  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -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

localhost:10025 inet    n       n       n       -       10      smtpd
  -o content_filter=
  -o local_recipient_maps=
  -o relay_recipient_maps=
  -o smtpd_restriction_classes=
  -o smtpd_client_restrictions=
  -o smtpd_helo_restricitons=
  -o smtpd_sender_restrictions=
  -o smtpd_recipient_restrictions=permit_mynetworks,reject
  -o mynetworks=127.0.0.0/8
  -o strict_rfc821_envelopes=yes
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache
discard   unix  -       -       -       -       -       discard

Danke für eure Hilfe.
Thomas



Mehr Informationen über die Mailingliste Postfixbuch-users