PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Postfix an Cyrus IMAP - Transportproblem?!



magic_halli
15.11.06, 15:17
Hallo,

wie es scheint, gibt es bei mir ein lokales Transportproblem von Postfix zu cyrus?!?!
Fetchmail holt mir alle Mails von unserem Provider korrekt rein:


fetchmail -d0 -v -v -v -a -f /etc/fetchmailrc
fetchmail: WARNING: Running as root is discouraged.
fetchmail: 6.3.2 querying pop.kundenserver.de (protocol POP3) at Wed Nov 15 14:53:43 2006: poll started
fetchmail: POP3< +OK POP server ready H mimap5
fetchmail: POP3> CAPA
fetchmail: POP3< +OK Capability list follows
fetchmail: POP3< TOP
fetchmail: POP3< USER
fetchmail: POP3< UIDL
fetchmail: POP3< STLS
fetchmail: POP3< IMPLEMENTATION nemesis
fetchmail: POP3< .
fetchmail: POP3> STLS
fetchmail: POP3< +OK Begin TLS negotiation
fetchmail: Issuer Organization: Equifax
fetchmail: Unknown Issuer CommonName
fetchmail: Server CommonName: pop.kundenserver.de
fetchmail: pop.kundenserver.de key fingerprint: 30:AC:79:A3:51:86:A2:42:69:5A:F3:A2:5A:1D:2F:B6
fetchmail: POP3> CAPA
fetchmail: POP3< +OK Capability list follows
fetchmail: POP3< TOP
fetchmail: POP3< USER
fetchmail: POP3< UIDL
fetchmail: POP3< IMPLEMENTATION nemesis
fetchmail: POP3< .
fetchmail: POP3> USER m0815
fetchmail: POP3< +OK password required for user "m0815"
fetchmail: POP3> PASS *
fetchmail: POP3< +OK mailbox "m0815" has 1 messages (1553 octets) H mimap5 N
fetchmail: selecting or re-polling default folder
fetchmail: POP3> STAT
fetchmail: POP3< +OK 1 1553
fetchmail: 1 message for m0815 at pop.kundenserver.de (1553 octets).
fetchmail: POP3> LIST 1
fetchmail: POP3< +OK 1 1553
fetchmail: POP3> RETR 1
fetchmail: POP3< +OK 1553 octets
fetchmail: reading message m0815@pop.kundenserver.de:1 of 1 (1553 octets)
fetchmail: About to rewrite Return-Path: <extern@web.de>
Rewritten version is Return-Path: <extern@web.de>

fetchmail: About to rewrite From: ICH <extern@web.de>
Rewritten version is From: ICH <extern@web.de>

fetchmail: About to rewrite To: m.musterfrau@firma.de
Rewritten version is To: m.musterfrau@firma.de

fetchmail: passed through m.musterfrau@firma.de matching firma.de
fetchmail: SMTP< 220 v1 ESMTP Postfix
fetchmail: SMTP> EHLO v1.firmalocal
fetchmail: SMTP< 250-v1
fetchmail: SMTP< 250-PIPELINING
fetchmail: SMTP< 250-SIZE 10240000
fetchmail: SMTP< 250-VRFY
fetchmail: SMTP< 250-ETRN
fetchmail: SMTP< 250 8BITMIME
fetchmail: forwarding to localhost
fetchmail: SMTP> MAIL FROM:<extern@web.de> BODY=8BITMIME SIZE=1553
fetchmail: SMTP< 250 Ok
fetchmail: SMTP> RCPT TO:<m.musterfrau@firma.de>
fetchmail: SMTP< 250 Ok
fetchmail: SMTP> DATA
fetchmail: SMTP< 354 End data with <CR><LF>.<CR><LF>
#********fetchmail: SMTP>. (EOM)
fetchmail: SMTP< 250 Ok: queued as 3FE4C1F59B
fetchmail: not flushed
fetchmail: POP3> QUIT
fetchmail: POP3< +OK POP server signing off
fetchmail: SMTP> QUIT
fetchmail: SMTP< 221 Bye
fetchmail: 6.3.2 querying pop.kundenserver.de (protocol POP3) at Wed Nov 15 14:53:44 2006: poll completed
fetchmail: not swapping UID lists, no UIDs seen this query
fetchmail: Deleting fetchids file.
fetchmail: normal termination, status 0
fetchmail: Deleting fetchids file.


...danach soll Postfix die Mails eigentlich nur noch an cyrus weitergeben und cyrus diese dann in die lokalen Userpostfächer (/var/spool/imap/user) verteilen - das passiert aber irgendwie nicht!

Das maillog, nachdem ich von extern eine Mail geschickt habe, die für einen lokalen Benutzer bestimmt ist, sieht so aus:


Nov 15 14:53:44 v1 postfix/smtpd[18505]: connect from localhost[127.0.0.1]
Nov 15 14:53:44 v1 postfix/smtpd[18505]: 3FE4C1F59B: client=localhost[127.0.0.1]
Nov 15 14:53:44 v1 postfix/cleanup[18508]: 3FE4C1F59B: message-id=<34646354@web.de>
Nov 15 14:53:44 v1 postfix/qmgr[18266]: 3FE4C1F59B: from=<extern@web.de>, size=1857, nrcpt=1 (queue active)
Nov 15 14:53:44 v1 postfix/qmgr[18266]: 3FE4C1F59B: to=<musterfrau@firma.local>, orig_to=<m.musterfrau@firma.de>, relay=none, delay=0, status=deferred (delivery temporarily suspended: transport is unavailable)
Nov 15 14:53:44 v1 postfix/qmgr[18266]: warning: 3FE4C1F59B: flush service failure
Nov 15 14:53:44 v1 postfix/smtpd[18505]: disconnect from localhost[127.0.0.1]

Das deutet doch stark auf ein Transportproblem zwischen Postfix und cyrus hin, oder??? Ich weiß nimmer weiter :(

Zur Erklärung:
Ich habe vorher auf einem OpenExchange Server 4 das gleiche Szenario erfolgreich am Laufen gehabt. Nur musste ich jetzt auf einer Suse Linux 10.1-Maschine das gleiche nochmal einrichten. Hierbei treten eben solche Fehler auf.
Sämtliche config-Dateien für fetchmail, Postfix, cyrus und was sonst noch so nötig ist, sind analog denen auf dem OpenExchange-System (nur noch minimal auf das Suse10.1 angepasst). Was lediglich anders ist, ist die Rechner-IP:rolleyes: .
Von daher sollte es eigentlich klappen?

Wo könnten hier Ursachen für die nicht vorhande Kommunikation bzw. Weiterleitung der Mails von Postfix an cyrus liegen???

Hier noch meine master.cf: (In meiner main.cf ist alles gleich geblieben, bis auf den hostname - daher poste ich diese nicht mit.)


smtp inet n - n - - smtpd -o content_filter=procmail:spamfilter
#smtps inet n - n - - smtpd -o content_filter=procmail:spamfilter
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 oqmgr
#tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
#localhost:10025 inet n - n - - smtpd -o content_filter=
scache unix - - n - 1 scache
#================================================= ===================
# 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/local/bin/maildrop -d ${recipient}
cyrus unix - n n - - pipe
flags=R user=cyrus argv=/usr/lib/cyrus/bin/deliver -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
procmail unix - n n - - pipe
flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}



Gruß und Danke.

Edit: Mails von intern nach extern schicken funktioniert!

Roger Wilco
15.11.06, 23:06
postconf -n

magic_halli
16.11.06, 07:11
postconf -n ergibt::



alias_maps = hash:/etc/aliases
biff = no
broken_sasl_auth_clients = yes
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
default_destination_concurrency_limit = 10
defer_transports =
disable_dns_lookups = no
disable_mime_output_conversion = no
fallback_transport = cyrus
home_mailbox = /var/spool/imap/user
html_directory = /usr/share/doc/packages/postfix/html
inet_interfaces = all
inet_protocols = all
local_transport = local
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command = /usr/lib/cyrus/bin/deliver
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 = $mydomain
masquerade_exceptions = root
message_size_limit = 10240000
mydestination = $mydomain, $myhostname, localhost.$mydomain
mydomain = firma.local
myhostname = v1
mynetworks_style = subnet
myorigin = $mydomain
newaliases_path = /usr/sbin/sendmail
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
recipient_canonical_maps = hash:/etc/postfix/recipient_canonical
relayhost = auth.smtp.kundenserver.de
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 = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_use_tls = no
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = no
smtpd_sasl_local_domain = $myhostname
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_use_tls = no
strict_8bitmime = no
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_domains = hash:/etc/postfix/virtual
virtual_alias_maps = hash:/etc/postfix/virtual


...außerdem steht im /var/log/mail jetzt drin:


Nov 16 07:33:47 v1 postfix/qmgr[4661]: warning: connect to transport procmail: Operation not permitted
Nov 16 07:33:53 v1 postfix/smtpd[5656]: connect from localhost[127.0.0.1]
Nov 16 07:33:53 v1 postfix/smtpd[5656]: 76AFA1F5AF: client=localhost[127.0.0.1]
Nov 16 07:33:53 v1 postfix/cleanup[5657]: 76AFA1F5AF: message-id=<36493807@web.de>
Nov 16 07:33:53 v1 postfix/qmgr[4661]: 76AFA1F5AF: from=<extern@web.de>, size=1847, nrcpt=1 (queue active)
Nov 16 07:33:53 v1 postfix/local[5658]: warning: connect #1 to subsystem private/cyrus: Operation not permitted
Nov 16 07:33:53 v1 postfix/smtpd[5656]: disconnect from localhost[127.0.0.1]


...und in /var/log/audit/audit.log steht zu den Prozessnummern: (Tipp im Netz gefunden, hier mal nachzuschauen)


type=APPARMOR msg=audit(1163658933.620:125): REJECTING w access to /var/spool/postfix/private/cyrus (local(5658) profile /usr/lib/postfix/local active /usr/lib/postfix/local)
type=APPARMOR msg=audit(1163658934.696:126): REJECTING w access to /var/spool/postfix/public/flush (qmgr(4661) profile /usr/lib/postfix/qmgr active /usr/lib/postfix/qmgr)
type=APPARMOR msg=audit(1163658947.700:127): REJECTING w access to /var/spool/postfix/private/procmail (qmgr(4661) profile /usr/lib/postfix/qmgr active /usr/lib/postfix/qmgr)

magic_halli
16.11.06, 09:51
Mir ist grade nochwas aufgefallen.
Ich kann in der main.cf den Eintrag 'program_directory = /usr/lib/postfix' nicht hinzufügen!!!
Ich habe ihn zwar reingeschrieben, allerdings erscheint er beim Kommando 'postconf' überhaupt nicht!

Da stimmt doch was nicht, oder???

Roger Wilco
16.11.06, 18:57
Dein AppArmor verhindert, dass Postfix Mails in seine Queue schreiben kann. Entweder du erstellst einen richtigen Regelsatz dafür oder du deaktivierst AppArmor.

magic_halli
17.11.06, 07:54
Danke, genau das war´s. Habe AppArmor erstmal deaktiviert - und lasse ihn wahrscheinlich auch erstmal in dem Zustand...


Gruß

alanna1048
04.01.07, 21:51
Hallo ihr - ich habe dasselbe Problem und auch bei mir steht in /var/log/audit/audit.log:

type=APPARMOR msg=audit(1167946809.161:97): REJECTING w access to /var/spool/postfix/private/cyrus (local(437$
type=APPARMOR msg=audit(1167946811.221:98): REJECTING w access to /var/spool/postfix/public/flush (qmgr(3499)$
type=APPARMOR msg=audit(1167946811.961:99): REJECTING w access to /var/spool/postfix/public/flush (qmgr(3499)$
type=APPARMOR msg=audit(1167946812.013:100): REJECTING w access to /var/spool/postfix/public/flush (qmgr(3499$
$(3499) profile /usr/lib/postfix/qmgr active /usr/lib/postfix/qmgr)

Jetzt meine Frage - wie deaktiviere ich AppArmor - ist das der Dienst aaeventd? Der ist bei mir bereits deaktiviert... dann ist es bei mir wohl ein anderes Problem?

Roger Wilco
05.01.07, 01:58
Am einfachsten deaktivierst du AppArmor über YaST.