PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Systemmail bei Postfix



tha_dude
22.04.05, 14:25
Hallo,

habe eine Frage zur Auslieferung der lokalen systemmeldung wie beispielsweise von debconf oder anderen Programmen, die normalerweise in /var/mail/mail landen. Mit exim habe ich diese noch bekommen. Seitdem ich Postfix unter Debian installiert habe, habe ich keine Mail mehr bekommen. Alles andere funktioniert aber einwandfrei. Wie kann ich diese Mail an mein lokales Benutzerpostfach in ~/Maildir/ verschieben? Bzw. wie kann ich diese Meldungen überhaupt bekommen?

Hier meine postconf -n:


alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
biff = no
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
home_mailbox = Maildir/
local_transport = local
luser_relay = mcfly@dyndns-domain.org
mailbox_size_limit = 0
masquerade_domains = $mydomain
mydestination = sub.dyndns-domain.org, mcfly, dom.local, localhost
mydomain = sub.dyndns-domain.org
myhostname = sub.dyndns-domain.org
mynetworks = 127.0.0.0/8
myorigin = sub.dyndns-domain.org
recipient_delimiter = +
relayhost = oeffentlicher-relay-server
sender_canonical_maps = hash:/etc/postfix/canonical.db
smtp_always_send_ehlo = yes
smtp_sasl_security_options = noanonymous
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_timeout = 600s

LKH
22.04.05, 15:45
Hi,

steht denn in der /etc/aliases, wer die Mails bekommen soll (root, postmaster etc.?). Wenn nichts drinsteht, schau mal, ob es ein Postfach für "nobody" gibt.

LKH

tha_dude
22.04.05, 15:47
# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: mcfly
clamav: root

Terran Marine
22.04.05, 19:36
Nabend,

nach Änderung in der /etc/aliases muss noch postaliases /etc/aliases aufgerufen, sofern das bei dir zutrifft.

Der hast bei dir einen content-Filter eingestellt (amavis), dieser läuft auch und ist richtig konfiguriert ?

Ich würde mal ne Mail abschicken und mir parallel das Log ansehen, und das ganze am besten hier posten ;)

Grüße
Terran

tha_dude
22.04.05, 19:59
Nabend,

das Problem bestand schon vor der Installation von amavis.
Es betrifft auch wirklich nur die systemmails, nicht die mails, die ich an root schicke, ohne die Angabe einer Domain - die kommen an.
Vielleicht liegt es ja auch nicht unbedingt am MTA, sondern vieleicht an den cronjobs, aber da habe ich keine Ahnung.
Kann ich denn so eine Systemmail provozieren? Beispielsweise durch die Installation eines Programms.

Ich weiß nicht, ob das in diesem Fall was bringt, aber hier mal das Log von gerade eben:



Apr 22 20:41:27 mcfly postfix/smtpd[29479]: connect from localhost 127.0.0.1]
Apr 22 20:41:27 mcfly postfix/smtpd[29479]: D850E184097: client=localhost[127.0.0.1]
Apr 22 20:41:27 mcfly postfix/cleanup[29482]: D850E184097: message-id=<200504221815.dfaa2a802553@www.linuxforen.de>
Apr 22 20:41:27 mcfly postfix/qmgr[27680]: D850E184097: from=<www-data@web3.kemm.de>, size=2721, nrcpt=1 (queue active)
Apr 22 20:41:27 mcfly amavis[20669]: (20669-05) ESMTP::10024 /var/lib/amavis/amavis-20050422T151241-20669: <www-data@web3.kemm.de> -> <sub.dyndns-domain.org> Received: SIZE=2721 BODY=8BITMIME from sub.dyndns-domain.org([127.0.0.1]) by localhost (sub.dyndns-domain.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20669-05 for <mcfly@sub.dyndns-domain.org>; Fri, 22 Apr 2005 20:41:27 +0200 (CEST)
Apr 22 20:41:28 mcfly amavis[20669]: (20669-05) Checking: <www-data@web3.kemm.de> -> <mcfly@sub.dyndns-domain.org>
Apr 22 20:41:28 mcfly amavis[20669]: (20669-05) spam_scan: hits=0 tests=
Apr 22 20:41:28 mcfly amavis[20669]: (20669-05) FWD via SMTP: [127.0.0.1]:10025 <www-data@web3.kemm.de> -> <mcfly@sub.dyndns-domain.org>
Apr 22 20:41:28 mcfly postfix/smtpd[29486]: connect from localhost[127.0.0.1]
Apr 22 20:41:28 mcfly postfix/smtpd[29486]: F14DB184098: client=localhost[127.0.0.1]
Apr 22 20:41:29 mcfly postfix/cleanup[29482]: F14DB184098: message-id=<200504221815.dfaa2a802553@www.linuxforen.de>
Apr 22 20:41:29 mcfly postfix/smtpd[29486]: disconnect from localhost[127.0.0.1]
Apr 22 20:41:29 mcfly amavis[20669]: (20669-05) Passed, <www-data@web3.kemm.de> -> <mcfly@sub.dyndns-domain.org>, Message-ID: <200504221815.dfaa2a802553@www.linuxforen.de>, Hits: 0
Apr 22 20:41:29 mcfly amavis[20669]: (20669-05) TIMING [total 1077 ms] - SMTP EHLO: 5 (0%), SMTP pre-MAIL: 1 (0%), SMTP pre-DATA-flush: 8 (1%), SMTP DATA: 36 (3%), body hash: 1 (0%), mime_decode: 35 (3%), get-file-type: 82 (8%), decompose_part: 2 (0%), parts: 0 (0%), AV-scan-1: 5 (1%), SA msg read: 4 (0%), SA parse: 13 (1%), SA check: 733 (68%), fwd-connect: 77 (7%), fwd-mail-from: 3 (0%), fwd-rcpt-to: 8 (1%), write-header: 14 (1%), fwd-data: 1 (0%), fwd-data-end: 36 (3%), fwd-rundown: 3 (0%), unlink-1-files: 9 (1%), rundown: 1 (0%)
Apr 22 20:41:29 mcfly postfix/smtp[29483]: D850E184097: to=<mcfly@sub.dyndns-domain.org>, relay=127.0.0.1[127.0.0.1], delay=2, status=sent (250 2.6.0 Ok, id=20669-05, from MTA: 250 Ok: queued as F14DB184098)
Apr 22 20:41:29 mcfly postfix/qmgr[27680]: F14DB184098: from=<www-data@web3.kemm.de>, size=3214, nrcpt=1 (queue active)
Apr 22 20:41:29 mcfly postfix/qmgr[27680]: D850E184097: removed
Apr 22 20:41:29 mcfly postfix/local[29487]: F14DB184098: to=<mcfly@sub.dyndns-domain.org>, relay=local, delay=1, status=sent (delivered to maildir)
Apr 22 20:41:29 mcfly postfix/qmgr[27680]: F14DB184098: removed
Apr 22 20:41:49 mcfly postfix/smtpd[29479]: disconnect from localhost[127.0.0.1]

tha_dude
22.04.05, 20:11
Hier mal eine komplette Aktion: Versand an root - ohne Domain - und anschließender Empfang:




Apr 22 21:07:52 mcfly postfix/smtpd[30123]: connect from localhost[127.0.0.1]
Apr 22 21:07:53 mcfly postfix/smtpd[30123]: 1304B184097: client=localhost[127.0.0.1]
Apr 22 21:07:53 mcfly postfix/cleanup[30126]: 1304B184097: message-id=<20050422.urz.91793400@mcfly>
Apr 22 21:07:53 mcfly postfix/smtpd[30123]: disconnect from localhost[127.0.0.1]
Apr 22 21:07:53 mcfly postfix/qmgr[27680]: 1304B184097: from=<mcfly@sub.dyndns-domain.org>, size=590, nrcpt=1 (queue active)
Apr 22 21:07:53 mcfly amavis[29581]: (29581-01) ESMTP::10024 /var/lib/amavis/amavis-20050422T210753-29581: <mcfly@sub.dyndns-domain.org> -> <root@sub.dyndns-domain.org> Received: SIZE=590 BODY=8BITMIME from sub.dyndns-domain.org([127.0.0.1]) by localhost (sub.dyndns-domain.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29581-01 for <root@sub.dyndns-domain.org>; Fri, 22 Apr 2005 21:07:53 +0200 (CEST)
Apr 22 21:07:53 mcfly imaplogin: LOGIN: DEBUG: ip=[::ffff:127.0.0.1], command=LOGIN
Apr 22 21:07:53 mcfly imaplogin: LOGIN: DEBUG: ip=[::ffff:127.0.0.1], username=mcfly
Apr 22 21:07:53 mcfly amavis[29581]: (29581-01) Checking: <mcfly@sub.dyndns-domain.org> -> <root@sub.dyndns-domain.org>
Apr 22 21:07:53 mcfly imaplogin: LOGIN, user=mcfly, ip=[::ffff:127.0.0.1], protocol=IMAP
Apr 22 21:07:53 mcfly amavis[29581]: (29581-01) white_black_list: whitelisted sender <mcfly@sub.dyndns-domain.org>
Apr 22 21:07:53 mcfly amavis[29581]: (29581-01) FWD via SMTP: [127.0.0.1]:10025 <mcfly@sub.dyndns-domain.org> -> <root@sub.dyndns-domain.org>
Apr 22 21:07:53 mcfly postfix/smtpd[30133]: connect from localhost[127.0.0.1]
Apr 22 21:07:53 mcfly postfix/smtpd[30133]: 6855A184098: client=localhost[127.0.0.1]
Apr 22 21:07:53 mcfly postfix/cleanup[30126]: 6855A184098: message-id=<20050422.urz.91793400@mcfly>
Apr 22 21:07:53 mcfly postfix/smtpd[30133]: disconnect from localhost[127.0.0.1]
Apr 22 21:07:53 mcfly amavis[29581]: (29581-01) Passed, <mcfly@sub.dyndns-domain.org> -> <root@sub.dyndns-domain.org>, Message-ID: <20050422.urz.91793400@mcfly>, Hits: -
Apr 22 21:07:53 mcfly amavis[29581]: (29581-01) TIMING [total 331 ms] - SMTP EHLO: 12 (4%), SMTP pre-MAIL: 1 (0%), mkdir tempdir: 1 (0%), create email.txt: 1 (0%), SMTP pre-DATA-flush: 12 (4%), SMTP DATA: 34 (10%), body hash: 2 (1%), mkdir parts: 2 (1%), mime_decode: 42 (13%), get-file-type: 39 (12%), decompose_part: 4 (1%), parts: 0 (0%), AV-scan-1: 5 (1%), fwd-connect: 80 (24%), fwd-mail-from: 4 (1%), fwd-rcpt-to: 8 (2%), write-header: 10 (3%), fwd-data: 1 (0%), fwd-data-end: 53 (16%), fwd-rundown: 3 (1%), unlink-1-files: 15 (4%), rundown: 1 (0%)
Apr 22 21:07:53 mcfly postfix/smtp[30127]: 1304B184097: to=<root@sub.dyndns-domain.org>, orig_to=<root>, relay=127.0.0.1[127.0.0.1], delay=0, status=sent (250 2.6.0 Ok, id=29581-01, from MTA: 250 Ok: queued as 6855A184098)
Apr 22 21:07:53 mcfly postfix/qmgr[27680]: 6855A184098: from=<mcfly@sub.dyndns-domain.org>, size=1081, nrcpt=1 (queue active)
Apr 22 21:07:53 mcfly postfix/qmgr[27680]: 1304B184097: removed
Apr 22 21:07:53 mcfly imaplogin: LOGOUT, user=mcfly, ip=[::ffff:127.0.0.1], headers=0, body=0, time=0
Apr 22 21:07:53 mcfly postfix/local[30134]: 6855A184098: to=<mcfly@sub.dyndns-domain.org>, orig_to=<root@sub.dyndns-domain.org>, relay=local, delay=0, status=sent (delivered to maildir)
Apr 22 21:07:53 mcfly postfix/qmgr[27680]: 6855A184098: removed
Apr 22 21:07:55 mcfly imaplogin: LOGIN: DEBUG: ip=[::ffff:127.0.0.1], command=LOGIN
Apr 22 21:07:55 mcfly imaplogin: LOGIN: DEBUG: ip=[::ffff:127.0.0.1], username=mcfly
Apr 22 21:07:56 mcfly imaplogin: LOGIN, user=mcfly, ip=[::ffff:127.0.0.1], protocol=IMAP
Apr 22 21:07:56 mcfly imaplogin: LOGOUT, user=mcfly, ip=[::ffff:127.0.0.1], headers=27, body=0, time=0

Terran Marine
22.04.05, 20:12
to=<mcfly@sub.dyndns-domain.org>, relay=local, delay=1, status=sent (delivered to maildir)
[/CODE]

Sieht doch schonmal nicht schlecht aus,

maildir ist standardmäßig in /var/mail/Benutzername.

Finden sich darin keine Mails ?

Grüße
Terran

tha_dude
22.04.05, 20:23
Maildir ist bei mir jetzt im jew. /HOME/.../Maildir - Verzeichnis des Benutzers.
unter /var/log/mail bzw ...mcfly befinden sich nur noch die mails von früher, als noch exim lief. Die sind aber noch von 2004 und da müssten seitdem schon eineige mehr drin sein.

Terran Marine
22.04.05, 20:31
Maildir ist bei mir jetzt im jew. /HOME/.../Maildir - Verzeichnis des Benutzers.
unter /var/log/mail bzw ...mcfly befinden sich nur noch die mails von früher, als noch exim lief. Die sind aber noch von 2004 und da müssten seitdem schon eineige mehr drin sein.

Irgendwie, Irgendwo ( Irgendwann ... ) legt postfix ja die Mail ab,

such doch mal per find nach aktuellen Dateien, muss sich ja was finden lassen.

Grüße
Terran

tha_dude
22.04.05, 21:42
tja, habe jetzt ne weile gesucht, aber ich bin mittlerweile der meinung, dass die einfach gelöscht werden.
gibt es da nicht auch andere möglichkeiten?

Terran Marine
22.04.05, 21:53
tja, habe jetzt ne weile gesucht, aber ich bin mittlerweile der meinung, dass die einfach gelöscht werden.
gibt es da nicht auch andere möglichkeiten?

Du könntest das Log-Level von postfix erhöhen, indem du an den smtpd Prozess in der master.cf eine oder mehrere -v dranhängst,

vielleicht verrät er dir dann den genauen Pfad.

Grüße
Terran

tha_dude
22.04.05, 22:10
Kann es auch an der master.cf liegen?




smtp inet n - - - - smtpd -v
#submission inet n - - - - smtpd
# -o smtpd_etrn_restrictions=reject
#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 oqmgr
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
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
anvil unix - - n - 1 anvil
smtp-amavis unix - - n - 2 smtp
-o smtp_data_done_timeout=1800
-o disable_dns_lookups=yes
localhost:10025 inet n - n - - smtpd
-o content_filter=
-o mynetworks=127.0.0.1/8
#
# 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}
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

Terran Marine
23.04.05, 09:45
Kann es auch an der master.cf liegen?


Diese dürfte in Ordnung sein,
das log bringt ja keine Fehler.

Es geht nur darum, den Speicherort der Mail zu finden, denke ich .

Grüße
Terran

tha_dude
23.04.05, 10:05
Moin moin,

ich habe mir mal so überlegt, dass es auch daran liegen könnte, dass die Mails wirklich rausgehen, weil ich für diese Art der Mails keine "destination" bin. Ich habe nämlich mal eine Mail vom DynDns-Admin bekommen, in der stand, dass ich meinen MTA richtig konfigurieren soll. Er hat genau eine der Meldungen, die ich ja habe will in den Anhang gepackt. Würde das was bringen, wenn ich "sub.dyndns-domain.org" und auch "dyndns-domain.org" angebe, oder ist das Schwachsinn?

Gruß tha_dude

Terran Marine
23.04.05, 10:36
Moin moin,

ich habe mir mal so überlegt, dass es auch daran liegen könnte, dass die Mails wirklich rausgehen, weil ich für diese Art der Mails keine "destination" bin. Ich habe nämlich mal eine Mail vom DynDns-Admin bekommen, in der stand, dass ich meinen MTA richtig konfigurieren soll. Er hat genau eine der Meldungen, die ich ja habe will in den Anhang gepackt. Würde das was bringen, wenn ich "sub.dyndns-domain.org" und auch "dyndns-domain.org" angebe, oder ist das Schwachsinn?


Klingt erstmal logisch,

dein Log sagt aber was anderes

Apr 22 20:41:29 mcfly postfix/local[29487]: F14DB184098: to=<mcfly@sub.dyndns-domain.org>, relay=local, delay=1, status=sent (delivered to maildir)

local liefert die Mail aus, und dieser postfix-Dienst ist nur für die lokale Zustellung zuständig.

Grüße
Terran

LKH
23.04.05, 11:30
Hi,

ich denke immer noch, dass die /etc/aliases nicht richtig ist. Alle Systemmail gelangen (wenn auch über Umwege) an root. Für root ist aber kein Alias angegeben. Die Frage ist dann, wo dein IMAP-Server die Mails speichert. Ich gehe mal davon aus, dass root beim IMAP nicht als Benutzer angelegt wurde.

Trag mal als erste Zeile in die /etc/aliases ein "root: IMAP-User", dann ein "postaliases /etc/aliases", Postfix neu starten und nochmals lokal eine Mail an root schicken.

LKH

tha_dude
23.04.05, 11:49
hi,

die Mails an root kommen ja auch an, nur eben nicht die Systemmails, die früher immer in /var/mail... gelandet sind, wenn beispielsweise eine Installation eines neuen Programms stattgefunden hat.
Habe jetzt root: mcfly@sub.dyndns-domain.org in die /etc/aliases ganz oben eingetragen.
Die mail kommt auch an. Was ich aber habe will sind diese Mails, die ich früher bekommen habe:



From root@(none) Thu Dec 16 17:03:49 2004
Return-path: <root@(none)>
Envelope-to: root@(none)
Delivery-date: Thu, 16 Dec 2004 17:03:49 +0000
Received: from root by (none) with local (Exim 4.32)
id 1Cez2b-0000B0-VH
for root@(none); Thu, 16 Dec 2004 17:03:49 +0000
To: root@(none)
Subject: Debconf: Configuring hotplug -- USB keyboard configuration
Message-Id: <E1Cez2b-0000B0-VH@(none)>
From: root <root@(none)>
Date: Thu, 16 Dec 2004 17:03:49 +0000

If you're booting with a USB keyboard and/or mouse, and want to defend
against boot failures like missing modules, you should probably use static
linking for the "hid", "keybdev" (and/or "mousedev"), "input", "usbcore",
and USB Host Controller modules.

--
Debconf, running at [ Debconf was not configured to display this note, so it mailed it to you. ]

LKH
23.04.05, 11:57
Hi,

aber in der Mail steht doch als Empfänger root ... nur @none.

LKH