PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Postfix mit pop-before-smtp



Eagle
12.03.05, 10:13
Hallo,

gemäß "Das Postfix-Buch" richte ich mir eine Authentifizierung mit pop-before-smtp auf Debian ein.
pop-before-smtp ist installiert, läßt sich aber nicht starten:


swallow:/etc/init.d# pop-before-smtp start
"my" variable $pat masks earlier declaration in same scope at /usr/sbin/pop-before-smtp line 336.

In der Datei /usr/sbin/pop-before-smtp ist in Zeile 336 folgender Eintrag:

334 # For Cyrus, Kenn Martin <kmartin@infoteam.com>, with tweak
335 # from William Yodlowsky for IP addrs that don't resolve:
336 my $pat = '^(... .. ..:..:..) \S+ (?:pop3d|imapd)\[\d+\]: ' .
337 'login: \S*\[(\d+\.\d+\.\d+\.\d+)\] \S+ \S+';


Zudem läßt bei mir Time::HiRes nicht installieren Siehe Perl-Modul läßt sich nicht installieren (http://www.linuxforen.de/forums/showthread.php?t=176121).

Kann hier jemand Abhilfe schaffen?

Besten Dank!

Andreas

`kk
12.03.05, 11:08
Du darfst natürlich nur einmal $pat benutzen und die anderen Vorkommen auskommentieren.

Aus /etc/pop-before-smtp.pl:
# Pick one of these values for the $pat variable OR define a subroutine
# named "custom_match" to handle a more complex match scenario (there's
# an example below).
PS: Welchen Popper benutzt du?

tschloss
12.03.05, 11:44
Am besten du postest mal eine Log-Zeile deines POPpers - die sehen doch irgendwie immer anders aus und das pattern muss angepaßt werden.

`kk
12.03.05, 12:01
Das Pattern muss nicht angepasst werden.
Man muss nur das Richtige auskommentieren. ;)

Eagle
12.03.05, 15:42
Eigentlich habe ich gar keinen Popper installiert, sondern das läuft über Cyrus-IMAP. Das funktioniert ja im Moment ja auch, sonst kämen Euere Antworten gar nicht bei mir an.

An sich habe in der /etc/pop-before-smtp/pop-before-smtp.conf lediglich die zwei pat und pat2 ohne Kommentare. Eben weil ich Cyrus-Imap einsetze:


###
### Uncomment the ones you need, and edit their names if needed, so that
### there's exactly one "pat" and one "pat2".
###

# For UW ipop3d/imapd, pattern tweaked by Stig Hackvan <stig@hackvan.com>
pat = '^(... .. ..:..:..) \S+ (?:ipop3d|imapd)\[\d+\]: (?:Login|Authenticated|Auth) user=\S+ host=(?:\S+ )?\[(\d+
\.\d+\.\d+\.\d+)\](?: nmsgs=\d+/\d+)?$'

# Simple "empty" pattern to speed up a bit when only one pattern is needed
# (might spit out errors if you in fact have such lines in your logfile)
pat2 = '^XXXXX$'

# Bennett Todd to add support for GNU pop3d
#pat2 = '^(... .. ..:..:..) \S+ gnu-pop3d\[\d+\]: User .* logged in with mailbox .* from (\d+\.\d+\.\d+\.\d+)$'

# There are many, many different logfile formats emitted by various
# qpoppers. Here's an attempt to match any of them, but for all
# I know it might also match failed logins, or something else.
#pat = '^(... .. ..:..:..) \S+ q?popper\S+\[\d+\]: .*\s(\d+.\d+.\d+.\d+)$'

# For Cyrus, Kenn Martin <kmartin@infoteam.com>, with tweak
# from William Yodlowsky for IP addrs that don't resolve:
# pat = '^(... .. ..:..:..) \S+ (?:pop3d|imapd)\[\d+\]: login: \S*\[(\d+\.\d+\.\d+\.\d+)\] \S+ \S+'

# For Courier-IMAP:
#pat = '^(... .. ..:..:..) \S+ imaplogin: LOGIN, user=\S+, ip=\[(\d+\.\d+\.\d+\.\d+)\]$'

# For qmail's pop3d:
#pat = '^(... .. ..:..:..) \S+ vpopmail\[\d+\]: vchkpw: login \[\S+\] from (\d+\.\d+\.\d+\.\d+)$'


Sagt mal, benötige ich jetzt auch zusätzlich zu Cyrus-IMAP einen Popper, Cyrus-IMAP macht doch beides POP3 und IMAP?

MfG

Andreas

`kk
12.03.05, 15:46
Ja, der kann beides.
Sorry, bin jetzt ein wenig ratlos.

Bei mir habe ich auch gar keine pop-before-smtp.conf, sondern eine pop-before-smtp-conf.pl.
Welche Version hast du eigentlich?

Gruß, Kai.

Eagle
12.03.05, 16:10
Auf dem Server ist Debian-woody drauf.
pop-before-smtp 1.28-6 und Postfix 1.1.11-0.woody3 sowie cyrus-imapd 1.5.19-9.2

Ich habe jetzt mal


# For UW ipop3d/imapd, pattern tweaked by Stig Hackvan <stig@hackvan.com>
#pat = '^(... .. ..:..:..) \S+ (?:ipop3d|imapd)\[\d+\]: (?:Login|Authenticated|Auth) user=\S+ host=(?:\S+ )?\[(\d+
\.\d+\.\d+\.\d+)\](?: nmsgs=\d+/\d+)?$'

gemacht und neugestartet. Bringt immer noch dieselbe Meldung.

MfG

Andreas

Svenny
12.03.05, 16:10
schaut mir nach nem debian paket aus

aber wenn du cyrus hast, wieso nimmst dann das pattern für UW ipop3d/imapd ?

`kk
12.03.05, 16:34
Benutze mal die neueste Version von pop-before-smtp.
Im Postfixbuch müsste auch die Installation beschrieben sein..

Gruß, Kai.

tschloss
17.03.05, 12:09
1.) Das "pat" ist doch auskommentiert! Mindestens ein pat - und das wird dann genommen - muß aktiv sein!

2.) Teste das pattern doch mal auf die Logdatei des POP3d (Qpopper oÄ), ob die gewünschten Resultate herauskommen (z.B. mit sed).

3.) Schau nach, ob die entsprechenden Postfix Maps erzeugt werden (postmap) und ob diese überhaupt in der Postfix-Konfig für die Client-Autorisierung genutzt werden.