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

Amavis mysql Datebankzugriff schlägt fehl

Status
Für weitere Antworten geschlossen.

rolf303

Newbie
Ich habe postfix mit courier-imap, amavis und virtuellen Usern auf einem SuSE 10.1 Server neu eingerichtet.
Das vorige System war ein debian 3.1

Als Anleitung habe ich
http://www.debianhowto.de/doku.php/de:howtos:sarge:postfix2_antispam_virenschutz
verwendet.
Nach dem Umzug auf SuSE sind einige Probleme aufgetaucht.

Zunächst scheint amavis nicht richtig zu funktionieren.
Die Abfrage der mysql-Datenbank produziert ein undef als returnwert.

Die domains beispiel.com und beispieltrading.com sind aber virtuelle Maildomains und
in die Datenbank eingetragen.

Parameter in amavis.conf lauten...

@lookup_sql_dsn =
( ['DBI:mysql:database=provider;host=localhost;port=3306', 'db_user', 'password']);
# @storage_sql_dsn = @lookup_sql_dsn; # none, same, or separate database

#sql policy
$sql_select_policy = 'SELECT "Y" as local FROM domains WHERE CONCAT("@",domain) IN (%k)';

Ich vermute das mysql einen leeren Wert zurückgibt und nicht die gesuchte domain.
mysql loggt die Zugriffe aber leider nicht mit und
Amavis spuckt ausser ein undef auch nicht viel aus.

Insgesamt macht der Postfix im jetztigen Zustand keinen sehr stabilen Eindruck.
Unter Linux scheint es zwar zu funktionieren, aber mit den Windowsclients gibt es Probleme.
So z.B. mit doppeltem versenden der Nachricht(nur unter Windows), wenn der smtp die domanin beispiel.com oder beispieltrading.com verwendet.

Am nevigsten für die Windowsclients(Thunderbird) ist aber, dass nach dem Versenden der Mail
die Ablage(das Schreiben) der Mail in den sent Ordner nicht erlaubt wird. Somit weiss man
nicht ob die Mail überhaupt verschickt wurde. Manchmal wird auch der Zugriff auf die virtuellen Maildir
Ordner verweigert.

Vielleicht kann mir jemand erstmal mit amavis und dem Datenbankzugriff weiterhelfen.

Hier mal ein Auzug aus mail.info

Sep 20 20:45:06 static postfix/smtpd[22550]: connect from pc.extern.de[88.9.70.134]
Sep 20 20:45:07 static postfix/smtpd[22550]: 1F1C3EA9E1: client=pc.extern.de[88.9.70.134]
Sep 20 20:45:07 static postfix/cleanup[22560]: 1F1C3EA9E1: message-id=<45118C2D.6010403@beispiel.com>
Sep 20 20:45:07 static postfix/qmgr[22484]: 1F1C3EA9E1: from=<bunny@beispiel.com>, size=969, nrcpt=1 (queue active)
Sep 20 20:45:07 static amavis[20506]: (20506-10) ESMTP::10024 /var/spool/amavis/tmp/amavis-20060920T145338-20506: \
<bunny@beispiel.com> -> <little.mouse@beispieltrading.com> Received: SIZE=969 from static.myisp.box.de ([127.0.0.1]) by \
localhost (static.myisp.box.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20506-10 for \
<little.mouse@beispieltrading.com>; Wed, 20 Sep 2006 20:45:07 +0200 (CEST)
Sep 20 20:45:07 static postfix/smtpd[22550]: disconnect from myisp.pc.de[88.9.70.134]
Sep 20 20:45:07 static amavis[20506]: (20506-10) Checking: 3tZ5K2zHGGPH <bunny@beispiel.com> -> <little.mouse@beispieltrading.com>
Sep 20 20:45:07 static amavis[20506]: (20506-10) p001 1 Content-Type: text/plain, size: 21 B, name:
Sep 20 20:45:07 static clamd[2707]: SelfCheck: Database status OK.
Sep 20 20:45:08 static amavis[20506]: (20506-10) lookup_sql_field(id) (WARN: no such field in the SQL table), \
"little.mouse@beispieltrading.com" result=undef

Sep 20 20:45:09 static postfix/smtpd[22569]: connect from localhost[127.0.0.1]
Sep 20 20:45:09 static postfix/smtpd[22569]: 702BCEA9E2: client=localhost[127.0.0.1]
Sep 20 20:45:09 static postfix/cleanup[22560]: 702BCEA9E2: message-id=<45118C2D.6010403@beispiel.com>
Sep 20 20:45:09 static postfix/qmgr[22484]: 702BCEA9E2: from=<bunny@beispiel.com>, size=1530, nrcpt=1 (queue active)

Sep 20 20:45:09 static amavis[20506]: (20506-10) FWD via SMTP: <bunny@beispiel.com> -> <little.mouse@beispieltrading.com>, \
250 2.6.0 Ok, id=20506-10, from MTA([127.0.0.1]:10025): 250 Ok: queued as 702BCEA9E2
Sep 20 20:45:09 static amavis[20506]: (20506-10) TIMING [total 2329 ms] - SMTP EHLO: 4 (0%)0, SMTP pre-MAIL: \
1 (0%)0, lookup_sql: 3 (0%)0, SMTP pre-DATA-flush: 2 (0%)0, SMTP DATA: 35 (1%)2, body_digest: 1 (0%)2, gen_mail_id: \
1 (0%)2, mime_decode: 11 (0%)2, get-file-type1: 14 (1%)3, decompose_part: 1 (0%)3, parts_decode: 0 (0%)3, AV-scan-1: \
7 (0%)3, AV-scan-2: 804 (35%)38, spam-wb-list: 2 (0%)38, SA msg read: 0 (0%)38, SA parse: 2 (0%)38, SA check: \
1238 (53%)91, update_cache: 2 (0%)91, deal_with_mail_size: 1 (0%)91, fwd-connect: 46 (2%)93, fwd-mail-from: \
3 (0%)93, fwd-rcpt-to: 5 (0%)94, write-header: 2 (0%)94, fwd-data: 1 (0%)94, fwd-data-end: 128 (6%)99, fwd-rundown: \
2 (0%)99, main_log_entry: 14 (1%)100, update_snmp: 1 (0%)100, unlink-1-files: 1 (0%)100, rundown: 0 (0%)100
Sep 20 20:45:09 static amavis[20506]: (20506-10) Requesting process rundown after 10 tasks (and 10 sessions)

Sep 20 20:45:09 static postfix/smtpd[22569]: disconnect from localhost[127.0.0.1]
Sep 20 20:45:09 static postfix/smtp[22563]: 1F1C3EA9E1: to=<little.mouse@beispieltrading.com>, relay=127.0.0.1[127.0.0.1], \
delay=2, status=sent (250 2.6.0 Ok, id=20506-10, from MTA([127.0.0.1]:10025): 250 Ok: queued as 702BCEA9E2)
Sep 20 20:45:09 static postfix/qmgr[22484]: 1F1C3EA9E1: removed
Sep 20 20:45:09 static postfix/virtual[22570]: 702BCEA9E2: to=<little.mouse@beispieltrading.com>, relay=virtual, \
delay=0, status=sent (delivered to maildir)
Sep 20 20:45:09 static postfix/qmgr[22484]: 702BCEA9E2: removed

Sep 20 20:45:10 static amavis[22572]: TIMING [total 8 ms] - bdb-open: 8 (100%)100, rundown: 0 (0%)100

Sep 20 20:48:27 static postfix/anvil[22553]: statistics: max connection rate 1/60s for (smtp:88.9.70.134) at \
Sep 20 20:45:07
Sep 20 20:48:27 static postfix/anvil[22553]: statistics: max connection count 1 for (smtp:88.9.70.134) at \
Sep 20 20:45:07
Sep 20 20:48:27 static postfix/anvil[22553]: statistics: max cache size 1 at Sep 20 20:45:07


Ich benutze folgende Versionen:

Distri ist SuSE 10.1/64bit + some Repositories

postfix-2.2.9-10
amavisd-new-2.3.3-17
courier-imap-4.0.6-15
courier-authlib-0.58-14.1
courier-authlib-mysql-0.58-14.1
courier-authlib-userdb-0.58-14.1
perl-5.8.8-12
perl-DBI-1.50-11
perl-DBD-mysql-3.0002-13
 

ceegee

Hacker
Hi, ist dein Problem bereits gelöst? Sonst würde ich dir gerne helfen. Allerdings kann ich so aus dem Stehgreif nicht viel sagen. Würde mir das gerne mit dir zusammen mal live auf dem Server ansehen, wenn du möchtest. Natürlich in einer screen Session damit du siehst was ich da mache.

Gruss

Christian
 
OP
R

rolf303

Newbie
ceegee schrieb:
Hi, ist dein Problem bereits gelöst?
Leider noch nicht
ceegee schrieb:
Sonst würde ich dir gerne helfen. Allerdings kann ich so aus dem Stehgreif nicht viel sagen. Würde mir das gerne mit dir zusammen mal live auf dem Server ansehen, wenn du möchtest. Natürlich in einer screen Session damit du siehst was ich da mache.
Ist leider nicht möglich. Aber trotzdem danke...
 
Status
Für weitere Antworten geschlossen.
Oben