[Postfixbuch-users] amavisd-new nur bei kommenden Mails

Christian Anton mail at christiananton.de
Di Mai 31 14:58:28 CEST 2005


Hallo Liste,

ich bin neu auf dieser Liste und habe gleich meine erste Frage:

Ich benutze auf einem Rootserver seit einiger Zeit ein Postfix-Setup mit
amavisd-new, virtuellen Benutzern in mySQL, mailman, greylisting (gld)
und cyrus-imapd. Alles funktioniert seit Monaten hervorragend. Meine
Benutzer benutzen SMTPAuth, um relayen zu dürfen. Allerdings möchte ich
nun, dass amavisd-new, den ich über content_filter eingebunden habe, nur
bei eingehenden Mails verwendet wird. Alle emails, die von einem
sasl_authenticated user kommt, soll ohne über den amavisd-new geschleift
zu werden, zugestellt werden. Leider habe ich keine Ahnung, wie ich das
handhaben muss. Ich schicke hier mal Teile meiner main.cf und master.cf,
IP-Adressen, Hostnamen etc. habe ich geändert.

main.cf:

myhostname = mail.test.org
mydomain = test.org
myorigin = $mydomain
inet_interfaces = 20.20.20.20/24, 127.0.0.1
mynetworks = localhost, localhost.$mydomain

mydestination = $myhostname, localhost.$mydomain, $mydomain,
mail.$mydomain, mysql:/etc/postfix/mysql-mydestination.cf,
hash:/etc/postfix/mydestination

virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf,
hash:/etc/postfix/virtual-mailman
#, hash:/home/mailman/data/virtual-mailman

sender_canonical_maps = hash:/etc/postfix/sender-canonical,
mysql:/etc/postfix/mysql-canonical.cf

transport_maps = hash:/etc/postfix/transport

mailbox_transport = cyrus

alias_database = hash:/etc/mail/aliases

owner_request_special = no
recipient_delimiter = +
unknown_local_recipient_reject_code = 550

local_destination_concurrency_limit = 2
alias_maps = hash:/etc/mail/aliases, hash:/home/mailman/data/aliases
smtpd_banner = $myhostname ESMTP the really cool Mailserver

smtpd_sasl_auth_enable = yes

smtpd_client_restrictions =
        permit_mynetworks,
        permit_sasl_authenticated,
        reject_rbl_client bl.spamcop.net,
        reject_rbl_client dul.dnsbl.sorbs.net,
        reject_rbl_client sbl-xbl.spamhaus.org,
        reject_rbl_client list.dsbl.org,
        reject_rbl_client opm.blitzed.org

smtpd_recipient_restrictions =
        check_recipient_access hash:/etc/postfix/recipient_access,
        permit_sasl_authenticated,
        permit_mynetworks,
        reject_unauth_destination,
        reject_non_fqdn_recipient,
        reject_unknown_recipient_domain,
        reject_invalid_hostname,
        check_client_access mysql:/etc/postfix/mysql-clients.cf
        check_recipient_access mysql:/etc/postfix/mysql-recipients.cf
        reject_unlisted_recipient,
        check_policy_service inet:127.0.0.1:2525,
        permit_auth_destination,
        reject

smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_helo_required = yes

smtpd_use_tls = yes
smtpd_tls_key_file = /var/imap/server.pem
smtpd_tls_cert_file = /var/imap/server.pem
smtpd_tls_CAfile = /var/imap/server.pem

smtpd_helo_required = yes

smtpd_sender_restrictions=
        reject_non_fqdn_sender,
        reject_unknown_sender_domain

# Content-Filter stuff for amavisd-new
content_filter = smtp-amavis:[127.0.0.1]:10024

maximal_queue_lifetime = 3d
smtpd_timeout = 300
message_size_limit = 51200000

-------------------------------------------------------------------------------------------------------

master.cf:

# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       15       smtpd
    -o cleanup_service_name=pre-cleanup


ssmtp     inet  n       -       n       -       15      smtpd
        -o smtpd_tls_wrappermode=yes
        -o smtpd_sasl_auth_enable=yes
        -o cleanup_service_name=pre-cleanup

#submission     inet    n       -       n       -       -       smtpd
#  -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628      inet  n       -       n       -       -       qmqpd
pickup    fifo  n       -       n       60      1       pickup
    -o cleanup_service_name=pre-cleanup

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

qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       n       300     1       nqmgr
#tlsmgr   fifo  -       -       n       300     1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.

# Great Interfaces to the really nice amavisd-new software
smtp-amavis unix -      -       n       -       2       smtp
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes
    -o disable_dns_lookups=yes

localhost:10025 inet n - n - 10 smtpd
        -o content_filter=
        -o local_recipient_maps=
        -o mynetworks=127.0.0.0/8
        -o smtpd_helo_restrictions=
        -o smtpd_client_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o strict_rfc821_envelopes=yes

pre-cleanup  unix n     -       n       -       0       cleanup
        -o virtual_alias_maps=

ondemand    unix -     -        n      -        -       smtp
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
old-cyrus unix  -       n       n       -       -       pipe
  flags=R user=cyrus argv=/usr/lib/cyrus/deliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
cyrus     unix  -       n       n       -       -       pipe
  user=cyrus argv=/usr/lib/cyrus/deliver -e -r ${sender} -m ${extension}
${user}

cyrus-ondemand     unix  -       n       n       -       -       pipe
  user=cyrus argv=/usr/lib/cyrus/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=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop
$recipient

------------------------------------------------------------------------------------

Ich würde mich über einen Tip freuen.


Vielen Dank im Voraus

Christian Anton



Mehr Informationen über die Mailingliste Postfixbuch-users