Postfix mit mysql bereitet mir graue Haare

Hallo,

nach dieser Anleitung versuche ich einen Mailserver aufzusetzen.
http://workaround.org/articles/ispmail-etch/#id22

Was sagt mir folgender Eintrag im Logfile?

fatal: /etc/postfix/mysql-virtual-alias-maps.cf: bad string length 0 

Leider bleibt der 'helo' Test negativ mit folgender FM:



    # telnet localhost smtp
    Trying 127.0.0.1...
    Connected to lvps87-230-8-215.dedicated.hosteurope.de.
    Escape character is '^]'.



Scheinbar stimmt auch das Loglevel nicht, denn die letzten Einträge liegen zeitlich zurück.



    Sep 9 23:25:18 lvps87-230-8-215 postfix/smtpd[15726]: fatal: /etc/postfix/mysql-virtual-alias-maps.cf: bad string length 0 
    
    Folgende Prozesse laufen:
    
    
        1832 clamav 25 0 49548 43m 484 R 85 1.1 26:05.71 clamd
         1 root 16 0 1868 660 564 S 0 0.0 0:00.01 init
         1555 root 16 0 1736 648 540 S 0 0.0 0:00.01 syslogd
         1577 bind 20 0 46704 3000 2104 S 0 0.1 0:00.00 named
         1620 amavis 16 0 27400 21m 2240 S 0 0.5 0:00.02 amavisd-new
         1645 root 20 0 2596 1328 1080 S 0 0.0 0:00.00 mysqld\_safe
         1650 amavis 20 0 28168 20m 1764 S 0 0.5 0:00.00 amavisd-new
         1651 amavis 21 0 28168 20m 1756 S 0 0.5 0:00.00 amavisd-new
         1685 mysql 16 0 139m 17m 5280 S 0 0.4 0:00.53 mysqld
         1686 root 15 0 1480 504 440 S 0 0.0 0:00.00 logger
         1756 postgres 16 0 17904 3620 3108 S 0 0.1 0:00.72 postmaster
         1765 postgres 16 0 17904 1148 632 S 0 0.0 0:00.00 postmaster
         1766 postgres 16 0 8684 1076 500 S 0 0.0 0:00.00 postmaster
         1767 postgres 15 0 7856 1220 556 S 0 0.0 0:00.00 postmaster
         1932 clamav 16 0 5412 696 400 S 0 0.0 0:00.00 freshclam
         2026 root 16 0 4860 1220 888 S 0 0.0 0:00.11 sshd
         3084 root 18 0 2188 812 664 S 0 0.0 0:00.00 xinetd
         3095 root 16 0 1844 588 448 S 0 0.0 0:00.00 dovecot
         3110 proftpd 15 0 8972 1496 544 S 0 0.0 0:00.00 proftpd
         3125 root 16 0 2132 888 708 S 0 0.0 0:00.00 cron
         3165 root 16 0 8408 2340 1820 S 0 0.1 0:00.00 dovecot-auth
         3166 dovecot 16 0 3212 1480 1236 S 0 0.0 0:00.00 pop3-login
         3167 dovecot 16 0 3212 1480 1236 S 0 0.0 0:00.00 pop3-login
         3169 dovecot 16 0 3212 1480 1236 S 0 0.0 0:00.00 pop3-login
         3170 dovecot 16 0 3220 1484 1240 S 0 0.0 0:00.00 imap-login
         3171 dovecot 16 0 3220 1484 1240 S 0 0.0 0:00.00 imap-login
         3172 dovecot 16 0 3220 1484 1240 S 0 0.0 0:00.00 imap-login
         3316 root 16 0 8688 4932 1384 S 0 0.1 0:00.03 miniserv.pl
         3741 root 16 0 7808 2356 1896 R 0 0.1 0:00.05 sshd
         3771 root 15 0 2692 1600 1244 S 0 0.0 0:00.00 bash
        10165 root 16 0 19292 6424 3768 S 0 0.2 0:00.02 apache2
        10169 www-data 16 0 19812 7312 4180 S 0 0.2 0:01.33 apache2
        10171 www-data 16 0 19816 7380 4244 S 0 0.2 0:01.93 apache2
        10172 www-data 16 0 19812 7280 4160 S 0 0.2 0:00.65 apache2
        10173 www-data 16 0 19800 7388 4264 S 0 0.2 0:01.59 apache2
        10174 www-data 16 0 19788 7264 4160 S 0 0.2 0:00.61 apache2
        11435 www-data 16 0 19808 7360 4220 S 0 0.2 0:02.63 apache2
        11436 www-data 16 0 19804 7348 4220 S 0 0.2 0:01.78 apache2
        11438 www-data 16 0 19792 7288 4196 S 0 0.2 0:01.01 apache2
        11439 www-data 16 0 20036 7268 4164 S 0 0.2 0:00.63 apache2
        11442 www-data 16 0 19616 5740 2888 S 0 0.1 0:00.07 apache2
        11801 root 16 0 7808 2348 1896 S 0 0.1 0:00.01 sshd
        12137 root 16 0 2684 1592 1244 S 0 0.0 0:00.00 bash
        13630 root 16 0 4740 1616 1304 S 0 0.0 0:00.00 master
        13635 postfix 19 0 4748 1576 1276 S 0 0.0 0:00.00 pickup
        13636 postfix 20 0 4784 1592 1292 S 0 0.0 0:00.00 qmgr
        13640 root 16 0 2160 1104 860 R 0 0.0 0:00.41 top
        13939 postfix 16 0 4748 1604 1296 S 0 0.0 0:00.00 showq
    
    
    
    
    Danke & Gruß, olli

Hallo oliver,

sieht so aus als ob du die Variable dbname nicht gesetzt hast.
In der von dir genannten Anleitung legt man das anscheinend in der Datei /etc/postfix/mysql-virtual-alias-maps.cf fest.
http://workaround.org/articles/ispmail-etch/#virtual…

Gruesse
Stefan

Hallo Oliver,

sieht so aus als ob du die Variable dbname nicht gesetzt hast.
In der von dir genannten Anleitung legt man das anscheinend in
der Datei /etc/postfix/mysql-virtual-alias-maps.cf fest.

Ergänzend zu Stefans Tip: In deiner main.cf sollte so was stehen:

virtual\_alias\_maps = mysql:/etc/postfix/mysql-virtual\_alias\_maps.cf

Das mysql sagt dann Postfix, daß es für die Adressen mysql benutzen soll. Wie der Zugriff auf die MySQL-DB erfolgt (Passwort, Username) steht dann in der mysql-virtual_alias_maps.cf, wie Stefan schon geschrieben hat. Dort sollten dann Zeilen wie

user = ich
password = MeinPassword

stehen.
Wird in der mysql_table(5) manpage ganz gut beschrieben.
http://www.postfix.org/mysql_table.5.html

Viele Grüße
Marvin

man

Ja ich Doof.

Kaum macht mans richtig, schon funktionierts. Zumindest bis hier her.
Habe in der /etc/postfix/mysql-virtual-alias-maps.cf mal die richtigen Einträge gesetzt.

Jetzt habe ich noch ein paar andere kleinere Problemchen die ich erstmal zu lösen versuche.

Dank & Gruß, olli