Postfix lässt den Server (2GB RAM) abstürzen - was tun?

Postfix, QMail, Sendmail, Dovecot, Cyrus, Courier, Anti-Spam
cibnet
Posts: 7
Joined: 2003-09-15 21:08
Location: Clarholz

Postfix lässt den Server (2GB RAM) abstürzen - was tun?

Post by cibnet » 2005-05-24 19:55

Hallo,

ich habe ein Problem mit Postfix standardinstallation bei Strato. Server mit 2GB RAM hängt sich auf weil postfix prozesse proxymap startet die sich so aufblähen dass Sie den Arbeitsspeicher und den SWAP speicher voll schreiben. Danach geht nichts mehr. Ich weiß nicht wo ich suchen soll.

Kennt einer den Prozess proxymap? Wofür ist er gut? Ich helfe mir jetzt damit dass ich Postfix per <Cron alle 5min. neu starte. Aber sofort nach neustart kommen die Prozesse proxymap und werden dann nach 5min. 2 GB groß.

User avatar
Joe User
Project Manager
Project Manager
Posts: 11578
Joined: 2003-02-27 01:00
Location: Hamburg

Re: Postfix lässt den Server (2GB RAM) abstürzen - was tun?

Post by Joe User » 2005-05-24 20:13

Code: Select all

postconf -n

cibnet
Posts: 7
Joined: 2003-09-15 21:08
Location: Clarholz

Konfiguration

Post by cibnet » 2005-05-24 20:25

So sieht die Konfig aus:


alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter =
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
defer_transports =
disable_dns_lookups = no
inet_interfaces = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command =
mailbox_size_limit = 0
mailbox_transport =
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains =
masquerade_exceptions = root
message_size_limit = 10240000
mydestination = $myhostname, localhost.$mydomain
myhostname = meinedomain.com
newaliases_path = /usr/bin/newaliases
program_directory = /usr/lib/postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relayhost =
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_sasl_auth_enable = no
smtp_use_tls = no
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_use_tls = no
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550

lufthansen
Posts: 390
Joined: 2002-09-24 17:31
Location: NRW

Re: Postfix lässt den Server (2GB RAM) abstürzen - was tun?

Post by lufthansen » 2005-05-24 21:22

cat master.cf

lufthansen
Posts: 390
Joined: 2002-09-24 17:31
Location: NRW

Re: Postfix lässt den Server (2GB RAM) abstürzen - was tun?

Post by lufthansen » 2005-05-24 21:25

also wenn ich mein Postfix buch von peer heinlein (kann ich nur empfehlen) dann ist das um einen zentralen lookup table zu nutzen.
wenn du das nicht brauchst würde ich es mal auskommentieren und gucken ob alles funzt ...

cibnet
Posts: 7
Joined: 2003-09-15 21:08
Location: Clarholz

master.cf

Post by cibnet » 2005-05-24 21:37

Habe proxymap auskommentiert, dann funktioniert kein versand.

Das ist die master.cf

# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#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
cleanup unix n - n - 0 cleanup
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 - 0 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
#localhost:10025 inet n - n - - smtpd -o content_filter=
#
# 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}
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/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=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
vscan unix - n n - 10 pipe
user=vscan argv=/usr/sbin/amavis ${sender} ${recipient}
procmail unix - n n - - pipe
flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}

lufthansen
Posts: 390
Joined: 2002-09-24 17:31
Location: NRW

Re: Postfix lässt den Server (2GB RAM) abstürzen - was tun?

Post by lufthansen » 2005-05-24 21:42

ist das ein proxymap prozesse oder mehrer ?
wenn es mehere sind kann du in der master nen limit setzten, auch wenn das nicht die lösung des problems ist, vllt aber ne gute überganslösung.
zu not würde ich das debugging in postfix mal einschalten.

lufthansen
Posts: 390
Joined: 2002-09-24 17:31
Location: NRW

Re: Postfix lässt den Server (2GB RAM) abstürzen - was tun?

Post by lufthansen » 2005-05-24 21:43

grep -i proxy -R /etc/postfix/

cibnet
Posts: 7
Joined: 2003-09-15 21:08
Location: Clarholz

grep ...

Post by cibnet » 2005-05-24 22:35

Wenn ich in der master ein Limit setze bringt das auch nichts, weil dann wird ein Prozess eben 2GB groß.


grep -i proxy -R /etc/postfix/

/etc/postfix/main.cf.default:local_recipient_maps = proxy:unix:passwd.byname $alias_maps
/etc/postfix/main.cf.default:proxy_interfaces =
/etc/postfix/main.cf.default: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
/etc/postfix/main.cf:# See also the proxy_interfaces parameter, for network addresses that
/etc/postfix/main.cf:# are forwarded to us via a proxy or network address translator.
/etc/postfix/main.cf:# The proxy_interfaces parameter specifies the network interface
/etc/postfix/main.cf:# proxy or network address translation unit. This setting extends
/etc/postfix/main.cf:# You must specify your proxy/NAT addresses when your system is a
/etc/postfix/main.cf:#proxy_interfaces =
/etc/postfix/main.cf:#proxy_interfaces = 1.2.3.4
/etc/postfix/main.cf:# to access the passwd file via the proxymap service, in order to
/etc/postfix/main.cf:#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
/etc/postfix/postfix-files:$daemon_directory/proxymap:f:root:-:755
/etc/postfix/master.cf:# The proxymap server can run chrooted, but doing so defeats most of
/etc/postfix/master.cf:proxymap unix - - n - 0 proxymap
/etc/postfix/post-install: # Add missing proxymap service to master.cf.
/etc/postfix/post-install: grep '^proxymap.*proxymap' $config_directory/master.cf >/dev/null || {
/etc/postfix/post-install: echo Editing $config_directory/master.cf, adding missing entry for proxymap service
/etc/postfix/post-install:proxymap unix - - n - - proxymap

lufthansen
Posts: 390
Joined: 2002-09-24 17:31
Location: NRW

Re: Postfix lässt den Server (2GB RAM) abstürzen - was tun?

Post by lufthansen » 2005-05-24 23:13

dann setzt mal in der master.cf hinter den proxy command eintrag ein " -D" und starte neu. und guck was die logs sagen.

cibnet
Posts: 7
Joined: 2003-09-15 21:08
Location: Clarholz

Logs

Post by cibnet » 2005-05-24 23:55

mit der option -D sehe ich keinen Unterschied. Wofür ist diese option?

lufthansen
Posts: 390
Joined: 2002-09-24 17:31
Location: NRW

Re: Postfix lässt den Server (2GB RAM) abstürzen - was tun?

Post by lufthansen » 2005-05-25 12:01

schlatet das debugging für proxymap ein.