[Postfixbuch-users] Mailman mir Postfix und virtuellen Domains und User

Steffen Hartwig postfix at sthartwig.de
Mi Okt 28 09:06:14 CET 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Guten Morgen,

ich würde gerne bei meinem Postfix mit Dovecot, wobei die Domains und
Benutzer in einer MySQL-Datenbank gespeicher sind, mailman installieren.
System ist Debian Lenny mit allen aktuellen Updates.

Wenn ich eine Mail an die Liste senden möchte, kommt folgende
Fehlermeldung, welche an den Absender zurück geht:

jugend at lists.example.org
SMTP error from remote mail server after RCPT TO:<jugend at lists.example.org>:
host sender.example.com [...]: 550-relay refused, invalid receipient
(Callout verification failed:
550-550 5.1.1 <jugend at lists.example.org>: Recipient address rejected:
550 User unknown in virtual mailbox table)

Fehlermeldung im Log:

Oct 28 09:03:14 sthartwig postfix/smtpd[12922]: connect from
sender.example.com[...]
Oct 28 09:03:14 sthartwig postfix/smtpd[12922]: NOQUEUE: reject: RCPT
from sender.example.org[...]: 550 5.1.1 <jugend at lists.example.org>:
Recipient address rejected: User unknown in virtual mailbox table;
from=<sender at example.com> to=<jugend at lists.example.org> proto=SMTP
helo=<sender.example.com>
Oct 28 09:03:14 sthartwig postfix/smtpd[12922]: disconnect from
sender.example.com[...]


Folgende Konfigurationen habe ich:

postconf -n

- -----------------------<----------------------
alias_database = hash:/var/lib/mailman/data/aliases, hash:/etc/aliases
alias_maps = hash:/var/lib/mailman/data/aliases, hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = amavis:[127.0.0.1]:10024
disable_vrfy_command = yes
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
mailbox_size_limit = 0
message_size_limit = 115343360
mydestination = mail.example.org, localhost.example.org, localhost
myhostname = mail.example.org
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
owner_request_special = no
proxy_read_maps = $local_recipient_maps $mydestination
$virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps
$virtual_mailbox_domains $relay_recipient_maps $relay_domains
$canonical_maps $sender_canonical_maps $recipient_canonical_maps
$relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
readme_directory = /usr/share/doc/postfix
receive_override_options = no_address_mappings
recipient_delimiter = +
relayhost =
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relayhost
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_relayhost_auth
smtp_sasl_security_options = noanonymous
smtp_sender_dependent_authentication = yes
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination,
reject_invalid_hostname, reject_non_fqdn_sender,
reject_non_fqdn_recipient, reject_unknown_sender_domain,
reject_unknown_recipient_domain,reject_rbl_client ix.dnsbl.manitu.net,
check_client_access hash:/etc/postfix/access_client, permit
smtpd_data_restrictions = reject_unauth_pipelining, permit
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination, permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/ssl/certs/mail.sthartwig.de.crt
smtpd_tls_key_file = /etc/ssl/private/mail.sthartwig.de.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
strict_rfc821_envelopes = yes
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_alias_domains =
virtual_alias_maps = hash:/var/lib/mailman/data/aliases,
proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf,
mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_transport = dovecot
virtual_uid_maps = static:5000
- ----------------------->----------------------

/etc/postfix/master.cf

- ----------------------<-----------------------
smtp      inet  n       -       -       -       -       smtpd
smtps     inet  n       -       -       -       -       smtpd
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628      inet  n       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       -       -       -       smtp
        -o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache

#mailman unix  -       n       n       -       -       pipe
#   flags=FR user=list
#   argv=/var/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${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 -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}
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=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}

amavis unix - - - - 2 smtp -o smtp_data_done_timeout=1200 -o
smtp_send_xforward_command=yes

127.0.0.1:10025 inet n - - - - smtpd -o content_filter= -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
receive_override_options=no_unknown_recipient_checks,no_header_body_checks
- -o smtpd_bind_address=127.0.0.1
- ---------------------->-----------------------

/etc/mailman/mm_cfg.py
- ----------------------<-----------------------
from Defaults import *
MAILMAN_SITE_LIST = 'mailman'
DEFAULT_URL_PATTERN = 'https://%s/mailman/'
PRIVATE_ARCHIVE_URL = '/cgi-bin/mailman/private'
IMAGE_LOGOS         = '/images/mailman/'
DEFAULT_EMAIL_HOST = 'lists.example.org'
DEFAULT_URL_HOST   = 'lists.example.org'
DEFAULT_SERVER_LANGUAGE = 'de'
USE_ENVELOPE_SENDER    = 0              # Still used?
DEFAULT_SEND_REMINDERS = 0
MTA='Postfix'
DEB_LISTMASTER = 'postmaster at sthartwig.de'
POSTFIX_STYLE_VIRTUAL_DOMAIN = ['lists.example.org']


- ---------------------->-----------------------

In der MySQL-Tabelle für den Transport habe ich bei domain:
lists.example.org eingegeben und bei transport: mailman:

Wenn ich in der Tabelle für die Weiterleitung bei source und bei
destination: jugend at lists.example.org eingeben, landet die Mail bei
Mailman in den Moderationsanträge. Nur möchte ich ja nicht bei allen
Listen entsprechende Weiterleitungen in der MySQL-Tabelle eintragen,
dies sollte doch eigentlich die Datei /var/lib/mailman/data/aliases
erledigen, oder?

DNS habe ich überprüft:

;; QUESTION SECTION:
;lists.example.org.			IN	A

;; ANSWER SECTION:
lists.example.org.		450307	IN	A	192.168.100.194

;; QUESTION SECTION:
;lists.example.org.			IN	MX

;; ANSWER SECTION:
lists.example.org.		604800	IN	MX	10 mail.example.org.

;; QUESTION SECTION:
;mail.example.org.			IN	A

;; ANSWER SECTION:
mail.example.org.		604757	IN	A	192.168.100.100

Könntes Ihr mir bitte die Augen öffnen?

Vielen, vielen, vielen herzlichen Dank im Voraus.

- --
Mit freundlichen Grüßen

Steffen Hartwig
Fachinformatiker Systemintegration
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrn+20ACgkQd8o8z0oymatrVwCgxNJm84sfZNd6wdgeld/We7u4
eSIAn04mxBaj+fK9znIb+b7VpnwglqYf
=2FHY
-----END PGP SIGNATURE-----



Mehr Informationen über die Mailingliste Postfixbuch-users