• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Postfix Problem [gelöst]

Burner

Member
Hallo Forum!

Habe mir Mutt installiert und soweit eingerichtet das ich Mails empfangen kann (über "set pop_host= " etc.). Versenden geht wohl aber nur über MTA. Ich habe mir dazu Postfix installiert.
Das Versenden der Mails geht aber nur wenn ich nach dem schreiben der Mail Postfix neustarte.
postconf -n sieht so aus:
Code:
alias_maps = hash:/etc/aliases
biff = no
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
default_destination_concurrency_limit = 20
defer_transports = smtp
delay_warning_time = 1h
disable_dns_lookups = no
disable_mime_output_conversion = no
html_directory = /usr/share/doc/packages/postfix-doc/html
inet_interfaces = all
inet_protocols = all
local_destination_concurrency_limit = 2
luser_relay = $root
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command = 
mailbox_size_limit = 0
mailbox_transport = cyrus
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
message_strip_characters = \0
mydestination = $myhostname,localhost.$mydomain,$mydomain
mydomain = pirat.linux-notebook.de
myhostname = linux-notebook.burner-castle
mynetworks = 127.0.0.1, 192.168.178.45/24
mynetworks_style = subnet
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
relayhost = mx.freenet.de
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix-doc/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = 
smtp_use_tls = no
smtpd_client_restrictions = 
smtpd_helo_required = no
smtpd_helo_restrictions = 
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_use_tls = no
strict_8bitmime = no
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport
virtual_alias_domains = hash:/etc/postfix/virtual
virtual_alias_maps = hash:/etc/postfix/virtual

cat /etc/aliases sieht so aus:
Code:
root:	jensb
# Basic system aliases that MUST be present.
postmaster:	root
mailer-daemon:	postmaster
# amavis
virusalert:	root
# General redirections for pseudo accounts in /etc/passwd.
administrator:	root
daemon:	root
lp:	root
news:	root
uucp:	root
games:	root
man:	root
at:	root
postgres:	root
mdom:	root
amanda:	root
ftp:	root
wwwrun:	root
squid:	root
msql:	root
gnats:	root
nobody:	root
# "bin" used to be in /etc/passwd
bin:	root
# Further well-known aliases for dns/news/ftp/mail/fax/web/gnats.
newsadm:	news
newsadmin:	news
usenet:	news
ftpadm:	ftp
ftpadmin:	ftp
ftp-adm:	ftp
ftp-admin:	ftp
hostmaster:	root
mail:	postmaster
postman:	postmaster
post_office:	postmaster
# "abuse" is often used to fight against spam email
abuse:	postmaster
spam:	postmaster
faxadm:	root
faxmaster:	root
webmaster:	root
gnats-admin:	root
mailman:	root
mailman-owner:	mailman
# mlmmj needs only one alias to function; this is with a mailinglist in
# /var/spool/mlmmj/myownlist (remember full path):
# myownlist: "| /usr/bin/mlmmj-recieve -L /var/spool/mlmmj/myownlist"
# Majordomo can be used to have mailinglists on your site.
#majordomo:		"|/usr/lib/majordomo/wrapper majordomo"
#owner-majordomo:	root,
#majordomo-owner:	root,
# sample entry for a majordomo mailing-list called "test"
# read /usr/doc/packages/majordomo/README.linux for more information
# replace "test" with a new name and put the administrator into
# the "owner-test" alias instead of "root".
#
#test:			"|/usr/lib/majordomo/wrapper resend -l test test-outgoing"
#test-outgoing:		:include:/var/lib/majordomo/lists/test
#test-request:		"|/usr/lib/majordomo/wrapper majordomo -l test"
#test-approval:		owner-test,
#owner-test-outgoing:	owner-test,
#owner-test-request:	owner-test,
#owner-test:		root,
#
# if you have bulk_mailer installed, you can replace the above
# "test-outgoing" line with the following:
#test-outgoing:		"|/usr/bin/bulk_mailer owner-test@host.com /var/lib/majordomo/lists/test"

Habt ihr ne Ahnung was ich ändern muss damit Postfix immer gleich versendet?

Gruss Burner
 
OP
Burner

Burner

Member
mail.err sagt:
Code:
nss_ldap: could not search LDAP server - server is unavailable

Habe ne Test-Mail an ne Mail-addy von mir geschickt und mittels "tail -fn20 /var/log/mail" nachgeschaut
Code:
Sep  9 13:30:08 linux-notebook postfix/smtp[19029]: warning: database /etc/postfix/sasl_passwd.db is older than source file /etc/postfix/sasl_passwd
Sep  9 13:30:08 linux-notebook postfix/smtp[19029]: nss_ldap: could not search LDAP server - Server is unavailable
Sep  9 13:30:08 linux-notebook postfix/smtp[19029]: nss_ldap: could not search LDAP server - Server is unavailable
Sep  9 13:30:09 linux-notebook postfix/smtp[19029]: 5EF00A1ABC: to=<ne-andere@mail.de>, relay=mx.freenet.de[195.4.92.211]:25, delay=18, delays=17/0.64/0.55/0.35, dsn=2.0.0, status=sent (250 OK id=1MlLO2-0001Lq-U3)
Sep  9 13:30:09 linux-notebook postfix/qmgr[18942]: 5EF00A1ABC: removed
Sep  9 14:33:14 linux-notebook postfix/cleanup[21323]: warning: database /etc/postfix/sender_canonical.db is older than source file /etc/postfix/sender_canonical
Sep  9 14:33:14 linux-notebook postfix/cleanup[21323]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
Sep  9 14:33:14 linux-notebook postfix/cleanup[21323]: nss_ldap: could not search LDAP server - Server is unavailable
Sep  9 14:33:15 linux-notebook postfix/cleanup[21323]: nss_ldap: could not search LDAP server - Server is unavailable
Sep  9 14:33:15 linux-notebook postfix/pickup[18936]: 153FAA1ABC: uid=1000 from=<pirat>
Sep  9 14:33:15 linux-notebook postfix/trivial-rewrite[21352]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
Sep  9 14:33:15 linux-notebook postfix/trivial-rewrite[21352]: nss_ldap: could not search LDAP server - Server is unavailable
Sep  9 14:33:15 linux-notebook postfix/trivial-rewrite[21352]: nss_ldap: could not search LDAP server - Server is unavailable
Sep  9 14:33:15 linux-notebook postfix/cleanup[21323]: 153FAA1ABC: message-id=<20090909123314.GA20038@linux-notebook.Burner-Castle>
Sep  9 14:33:15 linux-notebook postfix/qmgr[18942]: 153FAA1ABC: from=<pirat@pirat.linux-notebook.de>, size=749, nrcpt=1 (queue active)
Sep  9 14:33:15 linux-notebook postfix/error[21380]: nss_ldap: could not search LDAP server - Server is unavailable
Sep  9 14:33:15 linux-notebook postfix/error[21380]: nss_ldap: could not search LDAP server - Server is unavailable
Sep  9 14:33:15 linux-notebook postfix/bounce[21408]: nss_ldap: could not search LDAP server - Server is unavailable
Sep  9 14:33:16 linux-notebook postfix/bounce[21408]: nss_ldap: could not search LDAP server - Server is unavailable
Sep  9 14:33:16 linux-notebook postfix/error[21380]: 153FAA1ABC: to=<mail@addy.de>, relay=none, delay=1.6, del

Gruss Burner
 

Tooltime

Advanced Hacker
Burner schrieb:
mail.err sagt:Code: Alles auswählennss_ldap: could not search LDAP server - server is unavailable
Naja, irgend jemand hat da wohl eine LDAP-Anbindung eingebaut und der Server ist nicht erreichbar.

Burner schrieb:
Das Versenden der Mails geht aber nur wenn ich nach dem schreiben der Mail Postfix neustarte.
Burner schrieb:
defer_transports = smtp
Wenn man postfix sagt, er soll keine Mails ausliefern, dann tut er das auch. Einfach diesen Parameter aus der main.cf entfernen.
 
OP
Burner

Burner

Member
Code:
defer_transports = smtp
genau das wars. Auskommentiert und neustart von Postfix. Jetzt sendet er sofort!

Das war warscheinlich ich als ich zuerst über yast versucht hatte Postfix einzurichten. Wie bekomme ich den aus der config?

Gruss Burner
 

Tooltime

Advanced Hacker
Burner schrieb:
Das war warscheinlich ich als ich zuerst über yast versucht hatte Postfix einzurichten.
Ganz am Anfang stellt das YaST-Mail-Modul dir die Frage, was für eine Internetverbindung du hast:

  • Permanent --> Mails sofort ausliefern
    Einwahl --> Mails landen im spooling-Verzeichnis, das versenden muss manuell angestoßen werden, oder der entsprechende Befehl steht in dem Einwahlscript.
    Keine Verbindung --> Keine Mails per Netzwerk ausliefern, nur lokale Postfächer.
Ich nehme an du hast an der Stelle Einwahl ausgewählt.
Abhilfe:

  • a) In YaST-Mail Internetverbindung auf Permanent stellen.
    b) Den Eintrag einfach aus der main.cf löschen und nicht auskommentieren.
Wobei Variante a) unter Umständen so nicht geht. Wenn YaST merkt das ein Konfigfile manuell verändert wurde (md5-Prüfsumme), fasst er es nicht mehr an, es könnte ja sein das diese Änderung nicht in sein Konfig-Schema passt. Früher hat YaST dann einfach seinen Vorschlag hinterlegt (main.cf --> main.cf.SuSEconfig), macht er heute so weit ich weiß nicht mehr.
 
OP
Burner

Burner

Member
Burner schrieb:
Das war warscheinlich ich als ich zuerst über yast versucht hatte Postfix einzurichten. Wie bekomme ich den aus der config?
Bezog sich eigentlich auf die LDAP Sache.
Hatte unter yast immer permanent eingestellt. Das mit dem LDAP kam als Postfix nach der config über yast eben nicht ausgelifert hatte. Bin dann unter yast über den Punkt "Erweitert" rein und habe aber dann abgebrochen als er unbedingt einen Virenscanner installieren wollte.
Will also nur noch das dieses LDAP Zeug wech kommt.

Tooltime schrieb:
b) Den Eintrag einfach aus der main.cf löschen und nicht auskommentieren.
OK. Wusste ich nicht. Wird nachgeholt.


Gruss Burner
 
Oben