PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Mailserverlösung funktioniert noch nicht ganz



CboyGeek
22.08.02, 13:14
Hallo!

Ich bin gerade am Einrichten eines Mailservers mit IMAP. Leider habe ich noch Probleme beim Einsortieren der Mails mit procmail.

Hier mal meine ~/.procmail.rc:


PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin:.
MAILDIR=$HOME/Mail # You'd better make sure it exists
DEFAULT=$MAILDIR/mbox
LOGFILE=$MAILDIR/procmail.log
LOCKFILE=$HOME/.lockmail

:0 * ^TO.*tobias.frischholz@web.de |/usr/sbin/cyrdeliver -a -m tobi

# Anything that has not been delivered by now will go to $DEFAULT
# using LOCKFILE=$DEFAULT$LOCKEXT


Procmail sortiert mir die Mails einfach nicht in meine Cyrus-Mailbox "tobi".

Hier meine /etc/fetchmailrc:


# Daemon configuration
# These two are set in /etc/default/fetchmail
#set daemon 300 # Pool every 5 minutes
#set syslog # log through syslog facility

set no bouncemail # avoid loss on 4xx errors
# on the other hand, 5xx errors get
# more dangerous...

################################################## ########################
# Hosts to pool
################################################## ########################

# Defaults ================================================== =============
# Set antispam to -1, since it is far safer to use that together with
# no bouncemail
defaults:
antispam -1
batchlimit 100

#poll foo.bar.org with protocol pop3
# user baka there is localbaka here;

poll pop.web.de protocol pop3 user ich password geheim mda "/usr/sbin/procmail ~/.procmailrc"


Die Mails werden zwar mit fetchmail geholt und in /var/spool/mail/fetchmail gespeichert, aber danach nicht in die cyrus-Mailbox geschaufelt.

Komischerweisse legt procmail auch kein Logfile an.

Hier ein Auszug noch aus meiner /var/log/syslog:


Aug 22 13:13:48 srv1204 fetchmail[516]: 1 message for tobias.frischholz at pop.web.de (758 octets).
Aug 22 13:13:48 srv1204 fetchmail[516]: reading message tobias.frischholz@pop.web.de:1 of 1 (758 octets)
Aug 22 13:13:49 srv1204 fetchmail[516]: MDA returned nonzero status 32512
Aug 22 13:13:49 srv1204 fetchmail[516]: not flushed
Aug 22 13:13:50 srv1204 postfix[528]: fatal: bad string length (0 < 1): setgid_group =
Aug 22 13:13:51 srv1204 postfix/sendmail[532]: fatal: bad string length (0 < 1): setgid_group =

Was bei postfix noch nicht stimmt, kann ich auch nicht ganz erkennen.

Weiss hier jemand weiter?

taylor
22.08.02, 13:55
> Komischerweisse legt procmail auch kein Logfile an.

In 'man procmailrc' steht, dass Du einen LOGFILE=~/procmaillog Eintrag setzen sollst, und dazu gleich noch VERBOSE=yes

In meiner ~/.procmailrc sieht's so aus:


MAILCYRUSIMAPIMAP="/usr/sbin/cyrdeliver"
MAILUSERIMAP="-a post -m user.post"
CYRUSIMAP="$MAILCYRUSIMAPIMAP $MAILUSERIMAP"
[...]
#
# Debain User De Mailingliste
#
:0
* ^X-Mailing-List:.*debian-user-german@lists.debian.org
| $CYRUSIMAP.debian
[...]

CboyGeek
22.08.02, 14:10
Hm, aber man soll doch nicht "user." setzen, da er das selbst macht, oder irre ich mich da? Hab das irgendwo mal gelesen...

taylor
22.08.02, 14:18
Also... es funktioniert sehr gut.

CboyGeek
22.08.02, 15:19
Trotz dieser Änderung bleiben die Mails bei mir in /var/spool/mail/fetchmail :-(

BeS
22.08.02, 15:26
Hi,
also probiers mal damit:



:0
* ^TO: .*tobias\.frischholz@web\.de
|/usr/sbin/cyrdeliver -e -a tobi -m user.tobi


Das sollte funktionieren.

CboyGeek
22.08.02, 18:21
Geht leider immer noch nicht. Kann aber nicht daran liegen, dass ich alles in eine Zeile schreibe oder? (bin das von den procmail-examples so gewohnt...)

BeS
22.08.02, 18:47
Hi,
ändere mal deine fetchmailrc so ab:


poll pop.web.de proto pop3 user "user-ID" there with password "passwort" is tobi here options mda "/usr/bin/procmail ~/.procmailrc"


vielleicht hilfts ja was...

CboyGeek
22.08.02, 19:05
Geht nicht. Schlimmer noch: beim booten kommt dann sogar "fetchmail (failed)".

BeS
22.08.02, 20:05
Hi,
und wenn du fetchmail "von Hand" aufrufst, was passiert dann? Fehlermeldungen?

CboyGeek
23.08.02, 11:19
Bei "fetchmail -v" bekomme ich:



srv1204:/home/tobi# fetchmail -v
fetchmail: no mailservers have been specified

Mach ich ein "fetchmail -v pop.web.de" erscheint:



Enter password for root@pop.web.de:
fetchmail: 5.9.11 querying pop.web.de (protocol auto) at Fri Aug 23 11:18:34 2002: poll started
fetchmail: 5.9.11 querying pop.web.de (protocol IMAP) at Fri Aug 23 11:18:34 2002: poll started

Dann macht er ne Zeit lang gar nichts, bis dann:



IMAP connection to pop.web.de failed: Connection timed out
fetchmail: 5.9.11 querying pop.web.de (protocol IMAP) at Fri Aug 23 11:21:44 200
2: poll completed
fetchmail: 5.9.11 querying pop.web.de (protocol POP3) at Fri Aug 23 11:21:44 200
2: poll started
fetchmail: POP3< +OK WEB.DE POP3-Server
fetchmail: POP3> USER root
fetchmail: POP3< +OK Bitte Kennwort eingeben/enter password
fetchmail: POP3> PASS
fetchmail: POP3< -ERR Datenbankfehler/Database error
fetchmail: Datenbankfehler/Database error
fetchmail: Authorization failure on root@pop.web.de
fetchmail: POP3> QUIT
fetchmail: 5.9.11 querying pop.web.de (protocol POP3) at Fri Aug 23 11:21:44 200
2: poll completed
fetchmail: 5.9.11 querying pop.web.de (protocol auto) at Fri Aug 23 11:21:44 200
2: poll completed
fetchmail: Query status=3 (AUTHFAIL)
fetchmail: normal termination, status 3
srv1204:/home/tobi#

Dürfte aber wohl an "root" liegen, oder?

taylor
23.08.02, 11:26
Ich würde sagen, Du hast fetchmail nicht "System-Wide" konfiguriert, darum sucht er nicht /etc/fetchmailrc sondern ~/.fetchmailrc

Abhilfe: dpkg-reconfigure fetchmail-common

CboyGeek
23.08.02, 11:27
Jetzt hab ich den richtigen Output hier:



srv1204:/# fetchmail -v -f /etc/fetchmailrc
fetchmail: 5.9.11 querying pop.web.de (protocol POP3) at Fri Aug 23 11:25:43 2002: poll started
fetchmail: POP3< +OK WEB.DE POP3-Server
fetchmail: POP3> USER tobias.frischholz
fetchmail: POP3< +OK Bitte Kennwort eingeben/enter password
fetchmail: POP3> PASS
fetchmail: POP3< +OK Postfach bereit/mailbox locked and ready
fetchmail: POP3> STAT
fetchmail: POP3< +OK 0 0
fetchmail: No mail for tobias.frischholz at pop.web.de
fetchmail: POP3> QUIT
fetchmail: POP3< +OK
fetchmail: 5.9.11 querying pop.web.de (protocol POP3) at Fri Aug 23 11:25:50 2002: poll completed
fetchmail: normal termination, status 1

Scheint also alles zu passen. Bei fetchmail zumindest. Ich denke mal, jetzt ist ja procmail gefragt und an dem scheiterts...
Wenn nur das logfile von procmail ginge, aber das bleibt bei mir auf 0...

taylor
23.08.02, 11:39
Fetchmail sieh ja jetzt gut aus soweit.

Original geschrieben von CboyGeek
Wenn nur das logfile von procmail ginge, aber das bleibt bei mir auf 0...
Was hast Du denn in ~/.procmailrc nun stehen?

CboyGeek
23.08.02, 11:45
PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin:.
MAILDIR=$HOME/Mail # You'd better make sure it exists
DEFAULT=$MAILDIR/mbox
LOGFILE=$MAILDIR/procmail.log
VERBOSE=YES
LOCKFILE=$HOME/.lockmail

:0 * ^TO: .*tobias\.frischholz@web\.de |/usr/sbin/cyrdeliver -e -a tobi -m user.tobi

# Anything that has not been delivered by now will go to $DEFAULT
# using LOCKFILE=$DEFAULT$LOCKEXT

Aja, $MAILDIR ist bei mir übrigens /root.

taylor
23.08.02, 11:57
Original geschrieben von CboyGeek
Aja, $MAILDIR ist bei mir übrigens /root.
Wieso das? Willst Du überhaupt kein System-Wide fetchmail?
Fetchmail liefert doch an tobi, dann ist root's ~/.fetchmailrc ja schnuppe.

CboyGeek
23.08.02, 12:08
Wie sollte ich die Werte dann ändern?

CboyGeek
23.08.02, 12:18
Kann es mit dem Logging der procmail Log-Datei daran liegen, dass die bei mir nur folgende rechte hat:

-rw------- root root ???

CboyGeek
24.08.02, 11:27
Wie sieht das File denn bei Euch aus?