PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : amavis + postfix problem



DustPuppy
20.09.03, 01:06
hallo

ich habe ein problem mit postfix und amavis...
es wird in eine endlos schleife gerissen weil anscheinend bei mir die option

smtpd -o content_filter=

ignoriert wird. Kennt irgendjemand eine lösung ?

postfix version 2.0.14-1
amavis-ng version 0.1.6.5-1

hier meine konfigs
(teil)
master.cf:

...
localhost:10025 inet n - n - - smtpd -o content_filter=
amavis unix - n n - 10 pipe user=amavis argv=/usr/bin/amavis ${sender} ${recipient}
...
main.cf:

...
content_filter = amavis:
...

DustPuppy
20.09.03, 01:18
achja es funktioniert wenn ich an den
smtpd -o content_filter=amavis:

hänge (der für ausgehende mails) aber da es nur für ausgehende mails funktioniert
habe ich nicht viel davon auser das es viren ausfiltert die ich sende.

DustPuppy
20.09.03, 23:56
push

Doh!
21.09.03, 02:23
Original geschrieben von Linuxschrotter
hallo

ich habe ein problem mit postfix und amavis...
es wird in eine endlos schleife gerissen weil anscheinend bei mir die option

smtpd -o content_filter=

ignoriert wird. Kennt irgendjemand eine lösung ?

postfix version 2.0.14-1
amavis-ng version 0.1.6.5-1

hier meine konfigs
(teil)
master.cf:

...
localhost:10025 inet n - n - - smtpd -o content_filter=
amavis unix - n n - 10 pipe user=amavis argv=/usr/bin/amavis ${sender} ${recipient}
...
main.cf:

...
content_filter = amavis:
...

Wie kommst Du denn eigentlich zu der Erkenntnis? Logfileeinträge wären mal fein.

DustPuppy
21.09.03, 15:37
weil wenn ich den content_filter=amavis: auskommentiere die mails ankommen und zwar mit diesen header:


X-Original-To: juergen@localhost.homelinux.net
Delivered-To: juergen@localhost.homelinux.net
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id 81E421C794C4; Tue, 16 Sep 2003 18:40:55 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id 378941C794D9; Tue, 16 Sep 2003 18:39:31 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id 9C74F1C794DC; Tue, 16 Sep 2003 18:38:37 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id EA5B71C794C8; Tue, 16 Sep 2003 18:37:21 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id 5588B1C794C8; Tue, 16 Sep 2003 18:32:49 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id DC7F41C794C9; Tue, 16 Sep 2003 18:13:43 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id 5C86B1C79D5E; Tue, 16 Sep 2003 18:06:02 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id 62DA11C79D50; Tue, 16 Sep 2003 18:05:44 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id 5D5D51C79D53; Tue, 16 Sep 2003 18:05:19 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id EA31F1C79D54; Tue, 16 Sep 2003 18:04:55 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id E27A51C79D46; Tue, 16 Sep 2003 18:04:31 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id BA9A61C79D46; Tue, 16 Sep 2003 18:04:08 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id D86181C79D4F; Tue, 16 Sep 2003 18:03:43 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id 8BAC01C79D35; Tue, 16 Sep 2003 18:00:01 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id 528371C79D35; Tue, 16 Sep 2003 17:59:51 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id A64571C79D35; Tue, 16 Sep 2003 17:59:40 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id 186601C79D46; Tue, 16 Sep 2003 17:59:29 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id D5B3F1C79D54; Tue, 16 Sep 2003 17:59:17 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id 4552C1C79D50; Tue, 16 Sep 2003 17:59:06 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id B9A7B1C79D50; Tue, 16 Sep 2003 17:58:55 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id 5997C1C79D50; Tue, 16 Sep 2003 17:58:44 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id F3D541C79D4F; Tue, 16 Sep 2003 17:58:34 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id 6903D1C79D53; Tue, 16 Sep 2003 17:58:23 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.
Received: by jbreibert.homelinux.net (Postfix, from userid 104)


auserdem habe ich ja schon geschrieben das wenn ich aus der main.cf

content_filter=amavis:

auskomentiere und in der master.cf
den dienst smtp explezit mit -o content_filter=amavis:
eintrage es funktioniert aber eben nur für mails die ich selbst sende.

Jasper
21.09.03, 17:15
Original geschrieben von Linuxschrotter
weil wenn ich den content_filter=amavis: auskommentiere die mails ankommen und zwar mit diesen header:


X-Original-To: juergen@localhost.homelinux.net
Delivered-To: juergen@localhost.homelinux.net
Received: by jbreibert.homelinux.net (Postfix, from userid 104)
id 81E421C794C4; Tue, 16 Sep 2003 18:40:55 +0200 (CEST)
X-Scanned-By: AMaViS-ng at a badly configured site.


wohin schickt amavis die gescannten mails? wahrscheinlich nicht an localhost:10025. wenn diese per mail lokal zugestellt werden, greift dein smtpd auf port 10025 nicht.

-j

Doh!
21.09.03, 18:02
Original geschrieben von Linuxschrotter
X-Scanned-By: AMaViS-ng at a badly configured site.


Also Amavis merkt ja scho selbst, dass irgendwas in Deiner Config falsch ist. Bitte poste mal Deine main.cf und master.cf ohne kommentare

DustPuppy
21.09.03, 19:33
hallo das ist der header den amavis hinzufügen soll... den kann ich genau so in "this sux" umbennen.

DustPuppy
21.09.03, 19:36
main.cf

juergen@jbreibert:~$ cat /etc/postfix/main.cf
# $Header: /home/cvsroot/gentoo-x86/net-mail/postfix/files/main.cf,v 1.3 2002/05
#/04 03:55:29 woodchip Exp $
#
# Global Postfix configuration file. This file lists only a subset
# of all 100+ parameters. See the sample-xxx.cf files for a full list.
#
# The general format is lines with parameter = value pairs. Lines
# that begin with whitespace continue the previous line. A value can
# contain references to other $names or ${name}s.
#

# SOFT BOUNCE
#
# The soft_bounce parameter provides a limited safety net for
# testing. When soft_bounce is enabled, mail will remain queued that
# would otherwise bounce. This parameter disables locally-generated
# bounces, and prevents the SMTP server from rejecting mail permanently
# (by changing 5xx replies into 4xx replies). However, soft_bounce
# is no cure for address rewriting mistakes or mail routing mistakes.
soft_bounce = no

# LOCAL PATHNAME INFORMATION
#
# The queue_directory specifies the location of the Postfix queue.
# This is also the root directory of Postfix daemons that run chrooted.
# See the files in examples/chroot-setup for setting up Postfix chroot
# environments on different UNIX systems.

queue_directory = /var/spool/postfix

# The command_directory parameter specifies the location of all
# postXXX commands. The default value is $program_directory.

command_directory = /usr/sbin

# The daemon_directory parameter specifies the location of all Postfix
# daemon programs (i.e. programs listed in the master.cf file). The
# default value is $program_directory. This directory must be owned
# by root.
#
daemon_directory = /usr/lib/postfix

# QUEUE AND PROCESS OWNERSHIP
#
# The mail_owner parameter specifies the owner of the Postfix queue
# and of most Postfix daemon processes. Specify the name of a user
# account THAT DOES NOT SHARE A GROUP WITH OTHER ACCOUNTS AND THAT
# OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
# don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
#
mail_owner = postfix

# The default_privs parameter specifies the default rights used by
# the local delivery agent for delivery to external file or command.
# These rights are used in the absence of a recipient user context.
# DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
#
default_privs = nobody

# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostname of this
# mail system. The default is to use the fully-qualified domain name
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.

myhostname = jbreibert.homelinux.net

#myhostname = virtual.domain.name

# The mydomain parameter specifies the local internet domain name.
# The default is to use $myhostname minus the first component.
# $mydomain is used as a default value for many other configuration
# parameters.
#
mydomain = homelinux.net
#durch eure domain ersetzen (teil nach ersten punkt)

# SENDING MAIL
#
# The myorigin parameter specifies the domain that locally-posted
# mail appears to come from. The default is to append $myhostname,
# which is fine for small sites. If you run a domain with multiple
# machines, you should (1) change this to $mydomain and (2) set up
# a domain-wide alias database that aliases each user to
# user@that.users.mailhost.
#
myorigin = $myhostname
#(der teil der hinter den '@' steht)
#myorigin = $mydomain

# RECEIVING MAIL

# The inet_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on. By default,
# the software claims all active interfaces on the machine. The
# parameter also controls delivery of mail to user@[ip.address].
#
#inet_interfaces = all
#inet_interfaces = $myhostname
inet_interfaces = $myhostname, localhost
#von wo der server mails entgegen nimmt da wir das system nur lokal verwenden sollte es nur von localen rechner empfangen.

# The mydestination parameter specifies the list of domains that this
# machine considers # in the specified order.
#
# If you're connected via UUCP, see also the default_transport parameter.
#
relayhost = mail.gmx.at
#hier die smtpaddr. eures isp eintragen
# relayhost = gateway.my.domain
# relayhost = uucphost
# relayhost = [an.ip.add.ress]

# REJECTING UNKNOWN LOCAL USERS
#
# The local_recipient_maps parameter specifies optional lookup tables
# with all users that are local with respect to $mydestination and
# $inet_interfaces. If this parameter is defined, then the SMTP server
# will rejectspool_directory = /var/mail
# mail_spool_directory = /var/spool/mail

# The mailbox_command parameter specifies the optional external
# command to use instead of mailbox delivery. The command is run as
# the recipient with proper HOME, SHELL and LOGNAME environment settings.
# Exception: delivery for root is done as $default_user.
#
# Other environment variables of interest: USER (recipient username),
# EXTENSION (address extension), DOMAIN (domain part of address),
# and LOCAL (the address localpart).
#
# Unlike other Postfix configuration parameters, the mailbox_command
# parameter is not subjected to $parameter substitutions. This is to
# make it easier to specify shell syntax (see example below).
#
# Avoid shell meta characters because they will force Postfix to run
# an expensive shell process. Procmail alone is expensive enough.
#
# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN
# ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER.
#
#mailbox_command = /some/where/procmail
#mailbox_command = /some/where/procmail -a "$EXTENSION"

# The mailbox_transport specifies the optional transport in master.cf
# to use after processing aliases and .forward files. This parameter
# has precedence over the mailbox_command, fallback_transport and
# luser_relay parameters.
#
# Specify a string of the form transport:nexthop, where transport is
# the name of a mail delivery transport defined in master.cf. The
# :nexthop part is optional. For more details see the sample transport
# configuration file.
#
#mailbox_transport = lmtp:unix:/file/name
#mailbox_transport = cyrus

# The fallback_transport specifies the optional transport in master.cf
# to use for recipients that are not found in the UNIX passwd database.
# This parameter has precedence over the luser_relay parameter.
#
# Specify a string of the form transport:nexthop, where transport is
# the name of a mail delivery transport defined in master.cf. The
# :nexthop part is optional. For more details see the sample transport
# configuration file.
#
#fallback_transport = lmtp:unix:/file/name
#fallback_transport = cyrus
#fallback_transport =

# The luser_relay parameter specifies an optional destination address
# for unknown recipients. By default, mail for unknown local recipients
# is bounced.
#
# The following expansions are done on luser_relay: $user (recipient
# username), $shell (recipient shell), $home (recipient home directory),
# $recipient (full recipient address), $extension (recipient address
# extension), $domain (recipient domain), $local (entire recipient
# localpart), $recipient_delimiter. Specify ${name?value} or
# ${name:value} to expand value only when $name does (does not) exist.
#
# luser_relay = $user@other.host
# luser_relay = $local@other.host
# luser_relay = admin+$local

# JUNK MAIL CONTROLS
#
# The controls listed here are only a very small subset. See the file
# sample-smtpd.cf for an elaborate list of anti-UCE controls.

# The header_checks parameter restricts what may appear in message
# headers. This requires that POSIX or PCRE regular expression support
# is built-in. Specify "/^header-name: stuff you do not want/ REJECT"
# in the pattern file. Patterns are case-insensitive by default. Note:
# specify only patterns ending in REJECT (reject entire message) or
# IGNORE (silently discard this header). Patterns ending in OK are
# mostly a waste of cycles.
#
#header_checks = regexp:/etc/postfix/filename
#header_checks = pcre:/etc/postfix/filename

# The relay_domains parameter restricts what clients this mail system
# will relay mail from, or what destinations this system will relay
# mail to. See the smtpd_recipient_restrictions restriction in the
# file sample-smtpd.cf.
#
# By default, Postfix relays mail
# - from trusted clients whose IP address matches $mynetworks,
# - from trusted clients matching $relay_domains or subdomains thereof,
# - from untrusted clients to destinations that match $relay_domains
# or subdomains thereof, except addresses with sender-specified routing.
# The default relay_domains value is $mydestination.
#
# In addition to the above, the Postfix SMTP server by default accepts mail
# that Postfix is final destination for:
# - destinations that match $inet_interfaces,
# - destinations that match $mydestination
# - destinations that match $virtual_maps.
# These destinations do not need to be listed in $relay_domains.
#
# Specify a list of hosts or domains, /file/name patterns or type:name
# lookup tables, separated by commas and/or whitespace. Continue
# long lines by starting the next line with whitespace. A file name
# is replaced by its contents; a type:name table is matched when a
# (parent) domain appears as lookup key.
#
# NOTE: Postfix will not automatically forward mail for domains that
# list this system as their primary or backup MX host. See the
# permit_mx_backup restriction in the file sample-smtpd.cf.
#
#relay_domains = $mydestination

# The mynetworks parameter specifies the list of networks that are
# local to this machine. The list is used by the anti-UCE software
# to distinguish local clients from strangers. See permit_mynetworks
# and smtpd_recipient_restrictions in the file sample-smtpd.cf file.
#
# The default is a list of all networks attached to the machine: a
# complete class A network (X.0.0.0/8), a complete class B network
# (X.X.0.0/16), and so on. If you want stricter control, specify a
# list of network/mask patterns, where the mask specifies the number
# of bits in the network part of a host address. You can also specify
# the absolute pathname of a pattern file instead of listing the
# patterns here.
#
#mynetworks = 168.100.189.0/28, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks

# FAST ETRN SERVICE
#
# Postfix maintains per-destination logfiles with information about
# deferred mail, so that mail can be flushed quickly with the SMTP
# "ETRN domain.name" command, or by executing "sendmail -qRdomain.name".
#
# By default, Postfix maintains deferred mail logfile information
# only for destinations that Postfix is willing to relay to (as
# specified in the relay_domains parameter). For other destinations,
# Postfix attempts to deliver ALL queued mail after receiving the
# SMTP "ETRN domain.name" command, or after execution of "sendmail
# -qRdomain.name". This can be slow when a lot of mail is queued.
#
# The fast_flush_domains parameter controls what destinations are
# eligible for this "fast ETRN/sendmail -qR" service.
#
#fast_flush_domains = $relay_domains
#fast_flush_domains =

# SHOW SOFTWARE VERSION OR NOT
#
# The smtpd_banner parameter specifies the text that follows the 220
# code in the SMTP server's greeting banner. Some people like to see
# the mail version advertised. By default, Postfix shows no version.
#
# You MUST specify $myhostname at the start of the text. That is an
# RFC requirement. Postfix itself does not care.
#
#smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)

# PARALLEL DELIVERY TO THE SAME DESTINATION
#
# How many parallel deliveries to the same user or domain? With local
# delivery, it does not make sense to do massively parallel delivery
# to the same user, because mailbox updates must happen sequentially,
# and expensive pipelines in .forward files can cause disasters when
# too many are run at the same time. With SMTP deliveries, 10
# simultaneous connections to the same domain could be sufficient to
# raise eyebrows.
#
# Each message delivery transport has its XXX_destination_concurrency_limit
# parameter. The default is $default_destination_concurrency_limit.

local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 10

# DEBUGGING CONTROL
#
# The debug_peer_level parameter specifies the increment in verbose
# logging level when an SMTP client or server host name or address
# matches a pattern in the debug_peer_list parameter.
#
debug_peer_level = 2

# The debug_peer_list parameter specifies an optional list of domain
# or network patterns, /file/name patterns or type:name tables. When
# an SMTP client or server host name or address matches a pattern,
# increase the verbose logging level by the amount specified in the
# debug_peer_level parameter.
#
# debug_peer_list = 127.0.0.1
# debug_peer_list = some.domain

# The debugger_command specifies the external command that is executed
# when a Postfix daemon program is run with the -D option.
#
# Use "command .. & sleep 5" so that the debugger can attach before
# the process marches on. If you use an X-based debugger, be sure to
# set up your XAUTHORITY environment variable before starting Postfix.
#
debugger_command =
PATH=/usr/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5

# Other configurable parameters.


canonical_maps=db:/etc/postfix/canonical.db
#damit postfix die canonical.db verwendet um die addr. zu maskieren.
canonical_maps=hash:/etc/postfix/canonical
#ich weiss nicht warum aber es ist auf die reihnvollge zu achten !
#Es m

postmap = db:/etc/postfix/transport.db
# damit postfix die von uns erzeugte transport.db verwendet.
defer_transports=smtp
#damit postfix bei allen in der als smtp transport.db deklarierten hosts nicht
#automatisch versendet sondern auf ein "postfix flush" wartet.
home_mailbox = .maildir/
content_filter = amavis:
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_pass
smtp_sasl_security_options = noanonymous
#content_filter = amavis:

DustPuppy
21.09.03, 19:38
#
# Postfix master process configuration file. Each logical line
# describes how a Postfix daemon program should be run.
#
# A logical line starts with non-whitespace, non-comment text.
# Empty lines and whitespace-only lines are ignored, as are comment
# lines whose first non-whitespace character is a `#'.
# A line that starts with whitespace continues a logical line.
#
# The fields that make up each line are described below. A "-" field
# value requests that a default value be used for that field.
#
# Service: any name that is valid for the specified transport type
# (the next field). With INET transports, a service is specified as
# host:port. The host part (and colon) may be omitted. Either host
# or port may be given in symbolic form or in numeric form. Examples
# for the SMTP server: localhost:smtp receives mail via the loopback
# interface only; 10025 receives mail on port 10025.
#
# Transport type: "inet" for Internet sockets, "unix" for UNIX-domain
# sockets, "fifo" for named pipes.
#
# Private: whether or not access is restricted to the mail system.
# Default is private service. Internet (inet) sockets can't be private.
#
# Unprivileged: whether the service runs with root privileges or as
# the owner of the Postfix system (the owner name is controlled by the
# mail_owner configuration variable in the main.cf file). Only the
# pipe, virtual and local delivery daemons require privileges.
#
# Chroot: whether or not the service runs chrooted to the mail queue
# directory (pathname is controlled by the queue_directory configuration
# variable in the main.cf file). Presently, all Postfix daemons can run
# chrooted, except for the pipe, virtual and local delivery daemons.
# The proxymap server can run chrooted, but doing so defeats most of
# the purpose of having that service in the first place.
# The files in the examples/chroot-setup subdirectory describe how
# to set up a Postfix chroot environment for your type of machine.
#
# Wakeup time: automatically wake up the named service after the
# specified number of seconds. A ? at the end of the wakeup time
# field requests that wake up events be sent only to services that
# are actually being used. Specify 0 for no wakeup. Presently, only
# the pickup, queue manager and flush daemons need a wakeup timer.
#
# Max procs: the maximum number of processes that may execute this
# service simultaneously. Default is to use a globally configurable
# limit (the default_process_limit configuration parameter in main.cf).
# Specify 0 for no process count limit.
#
# Command + args: the command to be executed. The command name is
# relative to the Postfix program directory (pathname is controlled by
# the daemon_directory configuration variable). Adding one or more
# -v options turns on verbose logging for that service; adding a -D
# option enables symbolic debugging (see the debugger_command variable
# in the main.cf configuration file). See individual command man pages
# for specific command-line options, if any.
#
# In order to use the "uucp" message tranport below, set up entries
# in the transport table.
#
# In order to use the "cyrus" message transport below, configure it
# in main.cf as the mailbox_transport.
#
# SPECIFY ONLY PROGRAMS THAT ARE WRITTEN TO RUN AS POSTFIX DAEMONS.
# ALL DAEMONS SPECIFIED HERE MUST SPEAK A POSTFIX-INTERNAL PROTOCOL.
#
# DO NOT SHARE THE POSTFIX QUEUE BETWEEN MULTIPLE POSTFIX INSTANCES.
#
# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - - - - smtpd
#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
proxymap unix - - n - - proxymap
smtp unix - - - - - 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

#
# 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=DRhu user=vmail argv=/usr/local/bin/maildrop -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
#tlsmgr fifo - - n 300 1 tlsmgr
#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 - - smtpd -o content_filter=
amavis unix - n n - 10 pipe user=amavis argv=/usr/bin/amavis ${sender} ${recipient}

DustPuppy
21.09.03, 19:45
; Configuration file for amavis-ng

[global]
;; antivir = "/usr/lib/AntiVir/antivir";
;; Which MTA to use. Specify one.

; mail-transfer-agent = Courier
; mail-transfer-agent = DebugMTA
; mail-transfer-agent = Exim
; mail-transfer-agent = EximPerl
mail-transfer-agent = Postfix
; mail-transfer-agent = Sendmail
; mail-transfer-agent = SMTP
; mail-transfer-agent = Milter
; mail-transfer-agent = Maildrop
;; PMilter is experimental
; mail-transfer-agent = PMilter

;; Which virus scanner to use. Use more than one if you desire

; virus-scanner = FSAV
; virus-scanner = AVP
; virus-scanner = FSP
virus-scanner = hbEDV
; virus-scanner = Sophos
; virus-scanner = Sophie
; virus-scanner = Bitdefender
; virus-scanner = FPROT
; virus-scanner = MKS
; virus-scanner = NAI
; virus-scanner = NVC
; virus-scanner = Panda
; virus-scanner = CLAM
; virus-scanner = CLAMD
; virus-scanner = Trend
; virus-scanner = OpenAntiVirus

;; Extractor modules.
;; "Mail" should definitely be used, it is used for decoding MIME
;; attachments
;;
;; It is not recommended to use the "Text" extractor any more.
;; Convert::UUlib is buggy and most of its work is done by
;; MIME::Parser (which is used by the "Mail" extractor) already.

;; This default setup uses only DFSG-free archivers
extractors=Mail, GZIP, BZIP2, ARC, Zip, Tar, ZOO, TNEF, ARJ, COMPRESS, ZOO

;; lha, rar, are DFSG-non-free and disabled by default.
; extractors=Mail, GZIP, BZIP2, LHA, ARC, Zip, Tar, ZOO, RAR, TNEF, ARJ, COMPRESS, ZOO

;; Who should be notified?

; notifiers=Sender, Recipients, Admin

;; What should be inserted into the message's headers if it is let
;; through? This does not work for the Milter or Courier interfaces.

x-header = true
x-header-tag = X-Scanned-By
x-header-line = AMaViS-ng at a badly configured site.

umask = 002

[MIME]

;; Ignore MIME message extracting errors?

ignore errors = no

;; What to do if such error occues?
;; freeze - default behaviour, message will be frozen
;; drop+notify - drop message, notify sender

error action = drop+notify

[paths]

;; Where should mails be unpacked to?

unpack dir = /tmp/

;; Where should infected mail be stored? (Only the actual mail, not
;; the unpacked attachments)

quarantine dir = /var/spool/amavis-ng/quarantine

;; If problems occur, put message into this directory

problem dir = /var/spool/amavis-ng/problems

;; Should the unpacking directory be removed afterwards? Set to 'no'
;; only for debugging purposes

cleanup = yes

[Logging]

;; Use syslog? Facility (e.g. mail|info) or "no"

syslog = mail|info
syslog loglevel = 3

;; Log to which file? And atwhat level?

logfile = /var/log/amavis-ng/amavis-ng.log
logfile loglevel = 7

[Notify]

;; Which domains should be considered local? Recipients are notified
;; about mail that was stopped only if they are local. The domain name
;; is matches against this Perl regular expression, case-insensitively

; local domain = .*example\.com

;; What address will appear in the From:-header of warning messages

; mail from = postmaster@example.com

;; Who is the mail admin? Comma separated list if multiple admins

admin = root@localhost

[Exim]

;; Location and arguments of the binary

; exim = /usr/sbin/exim
; args = -oMr no-scan -i -f

[Courier]

;; Location and arguments of the binary

; sendmail = /usr/sbin/sendmail
; args =

[Sendmail]

;; Location and arguments of the binary

; sendmail = /usr/sbin/sendmail
; args = -i -C /etc/mail/sendmail.cf.orig -f

[Postfix]

;; Location and arguments of the binary

postfix = /usr/sbin/sendmail
args = -i -f

[Qmail]

; qmail-queue = /usr/sbin/qmail-queue

[SMTP]

input address = localhost
input port = 10025

output address = localhost
output port = 10026

;; SMTP session timeout.
;; unset: accept message immediately
;; =0: no timeout. Response is sent to client after processing
;; >0: timeout is set to n seconds. After n seconds, processing
;; is aborted if it has not been finished.

session timeout = 240

pidfile = /var/run/amavis-ng/amavisd.pid

[Milter]

;; Currently, an external C program amavis-milter is needed for Milter
;; support.
;;
;; This is the socket AMaViS will listen on. amavis-milter will
;; connect to this socket if it wants a message to be checked.

; amavis socket = /var/run/amavis-ng/socket.amavis

;; This is the socket amavs-milter will listen on.

; milter socket = /var/run/amavis-ng/socket.milter

;; The path to amavis-milter

; amavis-milter = /usr/sbin/amavis-milter

;; amavis-milter pid file

; amavis-milter pidfile = /var/run/amavis-ng/amavis-milter.pid

;; Debug options for amavis-milter (should not be needed in normal
;; operation)

; amavis-milter debug = 3
; amavis-milter logfile = /var/log/amavis-ng/amavis-milter.log

;; The AMaViS pid file

; pidfile = /var/run/amavis-ng/amavisd.pid
; daemon = yes

;; For sending out messages

; sendmail = /usr/sbin/sendmail
; args = -i -f

[Maildrop]

; sendmail = /usr/sbin/sendmail
; args =

[DebugMTA]

; input file = /dev/stdin
; output file = /dev/stdout

[external]

;; Free (un)compression programs
bzip2 = /usr/bin/bzip2
arj = /usr/bin/arj
nomarch = /usr/bin/nomarch
gzip = /bin/gzip
unzoo = /usr/bin/unzoo

;; lha, unrar are non-free.
; lha = /usr/bin/lha
; unrar = /usr/bin/unrar

;; For arc zoo, unarj, there are free alternatives whcih are enabled
;; above.
; arc = /usr/bin/arc
; zoo = /usr/bin/zoo
; unarj = /usr/bin/unarj

[security]

;; Resource limits for unpacking each message

;; How many levels of unpacking do we do?

; maxlevels = 20

;; How many files do we want to write?

; maxfiles = 1000

;; How much diskspace do we want to consume?

; maxspace = 30M

;; If amavis is run as UID root, drop root privileges to uid, gid.

uid = amavis
gid = amavis

[FSAV]

; fsav = /usr/bin/fsav

[AVP]

; avp = /usr/bin/avp

[Sophos]

; sweep = /usr/bin/sweep

[hbEDV]

antivir = /usr/bin/antivir

[Sophie]

; socket = /var/run/sophie

[NAI]

; uvscan = /usr/bin/uvscan

[NVC]

; nvc = /usr/bin/nvccmd

[Bitdefender]

; bitdefender = /usr/bin/bdc

[Panda]

; panda = /usr/bin/pavcl

[CLAM]

; clamscan = /usr/bin/clamscan

[CLAMD]

; socket = localhost:3310

[FPROT]

; fprot = /usr/bin/f-prot

[Trend]

; vscan = /usr/bin/vscan

[OpenAntiVirus]

; socket = localhost:8127

[NOD32]

; nod32 = /usr/bin/nod32
juergen@jbreibert:~$

Jasper
21.09.03, 20:19
Original geschrieben von Linuxschrotter

[Postfix]

;; Location and arguments of the binary

postfix = /usr/sbin/sendmail
args = -i -f


damit kommen deine mails niemals nicht an dem smtpd auf port 10025 vorbei. konfiguriere amavis für smtp, oder füge die option '-o content_filter=' für den local-daemon von postfix hinzu. nachteilhierbei ist, dass lokale eingereichte mails nicht gescannt werden. besser ist die smtp-variante.

-j

DustPuppy
22.09.03, 04:30
also du meinst das die mails wieder an port 25 statt an 10025 geschickt werden ??? In was muss ich den das comando umändern in der amavis.conf ????

Doh!
22.09.03, 09:18
Mach mal folgendes:

telnet localhost 25

und

telnet localhost 10025

Beide Male müsste sich der Mailserver melden. Falls nicht, liegt da der Haken

Jasper
22.09.03, 10:30
Original geschrieben von Linuxschrotter
also du meinst das die mails wieder an port 25 statt an 10025 geschickt werden ??? In was muss ich den das comando umändern in der amavis.conf ????

nein, die mails werden nicht per smtp verschickt. wenn du lokal mails mit 'mail' oder 'sendmail' verschickst, werden die direkt in die queue gepackt. kein smtp, keine ports. der bei postfix dafür zuständige daemon ist 'local'.

so wie ich das sehe, geht deine mail folgenden weg (genau stehts im logfile):

- mail kommt per smtp auf port 25 rein
- mail wird an amavis weitergeleitet, weil content_filter gesetzt ist
- amavis scannt und schickt die mail lokal per 'sendmail' kommando an postfix zurück
- postfix schickt die mail wieder an amavis weil content_filter immer noch gesetzt ist
- etc. pp.

für das problem gibt es mehrere lösungen:

1. nimm content_filter aus der main.cf raus und definiere den content_filter nur für den smtpd auf port 25
2. stelle amavis auf smtpd um und mache das reinject über port 10025
3. starte den 'local' daemon mit -o content_filter='

welche davon für dich geeignet ist, hängt davon ob ob lokale mails gescannt werden sollen. wenn nur per smtp reinkommende mails gescannt werden sollen, ist variante 1. die beste.

-j