lokaler Mailserver auf Basis Ubuntu 6.06

lokari

lokari

Ubuntu 6.06 LTS
Hallo zusammen,

wie bereits hier erwähnt, bastle ich seit gestern an einem lokalen Mailserver auf Basis von Ubuntu 6.06 LTS.

Die wichtigsten Komponenten sind installiert. Um eine gute Diskussionsbasis zu starten hier erstmal die Software um die's geht:

  • postfix (base,doc) Version 2.2.10-1ubuntu0.1
  • courier (base,doc,authdaemon,maildrop,ssl) Version 0.47-13ubuntu5.1
  • courier-imap(-ssl) Version 3.0.8-13ubuntu5.1
  • postgrey Version 1.24.1
  • amavisd-new (+milter) 1:2.3.3-3
  • spamassassin Version 3.1.0a-2ubuntu1.1
  • clamav (+bvase, daemon) Version 0.88.2-1ubuntu1

Soweit so gut. Ich hab das ganze auch schon mal so weit hinbekommen, dass Empfang und Versand (über SMTP-Relay) von Mails funktioniert.

Was mir nun fehlt ist eine überprüfung der Integration von Antivirus und Antispam, die ich nach einigen Anleitungen im Netz und nach bestem Wissen mal gemacht habe. Ebenfalls bin ich noch sehr planlos was maildrop angeht. Bisher konnt ich noch nichts hilfreiches ergooglen - hat da evtl. jemand einen Tipp?

Zudem sammle ich seit einiger Zeit brav spam-mails um SA ordentlich "trainieren" zu können. Leider weiß ich auch hier noch nicht wie *seufz*.

Ich danke Euch schon gleich mal aufrichtigst für Eure Hilfe :hilfe2: :)

Ciao,
Frank

EDIT: Mailbenachrichtigung aktiviert
 
Zuletzt bearbeitet:
Zeig doch mail deine Postfix main.cf und master.cf

um spamassassin was zum lernen zu geben sa-learn benutzen oder auch mal richtig googeln oder auf die homepage von spamassassin gehen.

mfg frank
 
Hi Frank,

hier mal der bisherige Stand der beiden Configs wie gewünscht...

main.cf (hab die domain/host-namen teilweise anonymisiert mit $domain und ähnlichem - darauf also nicht allzusehr achten bitte)

Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.$mydomain.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost, localhost.localdomain, localhost, $mydomain.org, $mydomain.dyndns.xx
relayhost = smtp-relay-server.domain.de
mynetworks = 192.168.88.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
mailbox_command = /usr/bin/maildrop

content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings

und master.cf

Code:
#
# Postfix master process configuration file.  For details on the format
# of the file, see the Postfix master(5) manual page.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       -       -       -       smtpd
#submission inet n      -       -       -       -       smtpd
#       -o smtpd_etrn_restrictions=reject
#       -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps    inet  n       -       -       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n      -       -       -       -       smtpd
#  -o smtpd_etrn_restrictions=reject
#  -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#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
smtp      unix  -       -       -       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       -       -       -       smtp
        -o fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     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
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
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}

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

da gibt's sicher noch einiges zu tun und einiges zu optimieren - bin für jeden Tipp dankbar.
 
wollte den Thread mal wieder hoch holen nachdem das Problem bisher noch nicht behoben sondern nur verschoben wurde.
 
Hi,

also ich hab hier nen debian sarge mit postfix, courier und amavis laufen.

folgendes zum sa-learn. das musst du eigentlich als benutzer des amavis dienstes lernen, ist hier bei mir amavis. mit diesem benutzer musst du das sa-learn ausführen. die gelernten sachen liegen dann glaube ich bei mir in /var/lib/amavis/.spamassin.

achja. spamassassin ist in amavis eingebunden genauso wie ein antivirenscanner, sofern einer installiert ist. amavis erkennt die eigentlich von alleine. sieht man aber alles in den logs wenn man amavis startet.

so kommen wir jetzt zu postfix im zusammenspiel mit amavis. postfix horcht auf 2 ports. einmal auf 25 und auf 10025 so wie du es auch gemacht hast. amavis sollte auf port 10024 laufen. jetzt sollte man postfix nur noch sagen das er die mails die auf port 25 ankommen an 10024 weiterleitet. amavis leitet sie dann nach dem scanne an port 10025 zurück und postfix legt die mails dann ab.

in meiner main.cf hab ich dafür noch:
content_filter = smtp-amavis:[127.0.0.1]:10024

und hier die relevanten einträge aus der master.cf

PHP:
smtp-amavis     unix    -       y       -       -       5       smtp
            -o smtp_data_done_timeout=1200
            -o smtp_send_xforward_command=yes
            -o disable_dns_lookups=yes
#
127.0.0.1:10025 inet    n       y       -       -       10       smtpd
            -o content_filter=
            -o local_recipient_maps=
            -o relay_recipient_maps=
            -o smtpd_restriction_classes=
            -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 smtpd_error_sleep_time=0
            -o smtpd_soft_error_limit=1001
            -o smtpd_hard_error_limit=1000
            -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks

und nun noch kurz was zu maildrop. du brauchst maildrop nicht unbedingt. maildrop ist aber für das ablegen der mails in das "richtige" verzeichnis zuständig. ich glaube da konnte man noch irgendwie filtern oder sowas. kannst ja mal auf die syscp seite schauen. da wird auch einiges zu maildrop gesagt.

ansonsten viel erfolg
Mfg Frank
 

Ähnliche Themen

lokaler Mailserver

Zurück
Oben