PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Postfix, Maildrop, Courier, mySQL



kahler
25.04.03, 19:01
Hallo,
ich bin gerade dabei einen Mailserver aufzusetzen und stehe dabei vor folgendem Problem:
Ich möchte die Mails via maildrop zustellen, da ich dadurch die Möglichkeit habe soft quotas auf die einzelnen Mailboxen zu setzen.

Die Benutzerverwaltung des Servers läuft über mySQL und in der User Tabelle gibt es eine Spalte für Quotas. Allerdings bringt mir die Postfix pipe bzw. maildrop immer folgenden Fehler: (temporary failure. Command output: /usr/local/maildrop/current/bin/maildrop: Invalid user specified.

Es sieht so aus, als ob maildrop gar nicht auf die mySQL Tabelle zugreifen würde. Würde mich freuen, wenn jemand eine Idee zu diesem Problem hätte, aber vielleicht gibts ja auch noch eine andere Möglichkeit Quotas umzusetzen außer über maildrop.

Hier noch meine Konfigurationsdateien:

main.cf


# /etc/postfix/main.cf
soft_bounce = no
queue_directory = /home/mail
command_directory = /usr/local/postfix/current/sbin
daemon_directory = /usr/local/postfix/current/libexec
mail_owner = postfix
default_privs = postagent
myhostname = mail.testserver.lan
mydomain = testserver.lan
myorigin = $mydomain
inet_interfaces = all
unknown_local_recipient_reject_code = 450
mynetworks_style = host
smtpd_banner = $myhostname ESMTP $mail_name
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
manpage_directory = /usr/local/postfix/current/man
sample_directory = /etc/postfix/sample
readme_directory = no
canonical_maps = mysql:/etc/postfix/mysql/canonical.cf
virtual_transport=maildrop
virtual_mailbox_maps=mysql:/etc/postfix/mysql/mailbox.cf
virtual_uid_maps=mysql:/etc/postfix/mysql/uid.cf
virtual_gid_maps=mysql:/etc/postfix/mysql/gid.cf
virtual_mailbox_base=/
virtual_mailbox_domains=mysql:/etc/postfix/mysql/domains.cf
mydestination = $transport_maps
virtual_alias_maps=mysql:/etc/postfix/mysql/forward.cf

virtual_mailbox_limit_inbox = no
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql/quota.cf
virtual_mailbox_limit_override = no
virtual_maildir_extended = yes
virtual_create_maildirsize = yes
virtual_maildir_extended = yes
virtual_mailbox_limit = 100000000

smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = no
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

message_size_limit = 10485760


master.cf


# /etc/postfix/master.cf
# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - n - - smtpd -v
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 nqmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp



maildrop unix - n n - - pipe
flags=DRhu user=courier argv=/usr/local/maildrop/current/bin/maildrop -d $(recipient)


maildropmysql.config



# /etc/maildrop/maildropmysql.config
hostname localhost
port 3306
socket /tmp/mysql.sock
database server
dbuser server
dbpw DatenbankPasswort
dbtable mail_users
default_uidnumber 450
default_gidnumber 450
uid_field id
uidnumber_field uidnumber
gidnumber_field gidnumber
maildir_field maildir
homedirectory_field homedir
quota_field quota
mailstatus_field imapok
where_clause ""

habnefrage
05.02.04, 23:04
Hi,

sehe gerade dass hier auch jemand (du) das gleiche Problemchen hat wie ich. Nur ist deines schon ein paar "Tage" her und die Chance besteht, dass du weiter bist als ich.


Ich habe Postfix, Postfix-IMAP am start. Läuft auch gut. Habe das ganze mit Virtuellen Usern/Domains realisiert und das alles in einer Datenbank.

Hab auch SpamAssassin hinbekommen, in den ganzen MailHeader steht jetzt fein das ganze SpamAssassinzeugs.

nur Maildrop kriege ich nicht an den Start. Bin mir nicht sicher ob Maildrop überhaupt gerafft hat dass es aus der DB lese soll, oder ob es überhaupt richtig angesprochen wird.

Hier mal ein kleiner Auszug aus den Logfiles. Da mault er gerade rum, weil ich mal (zu testzwekcen) den User root als Maildropuser eingestellt habe. Aber vielleicht sieht ja ein Fachman etwas mehr als ich.



Feb 5 22:32:47 [postfix/qmgr] 2DDF93540F8: from=<christian.rockrohr@imail.de>, size=2223, nrcpt=1 (queue active)
Feb 5 22:32:47 [postfix/qmgr] 2E5C43540FD: from=<dertagsend@oscar.spiegel.ision.net>, size=46866, nrcpt=1 (queue active)
Feb 5 22:32:47 [postfix/qmgr] B5C00354102: from=<christian.rockrohr@imail.de>, size=2476, nrcpt=1 (queue active)
Feb 5 22:32:47 [postfix/pipe] fatal: request to deliver as root
Feb 5 22:32:47 [postfix/qmgr] A69923540FB: from=<christian.rockrohr@imail.de>, size=2673, nrcpt=1 (queue active)
Feb 5 22:32:47 [postfix/qmgr] 9D1963540FC: from=<christian.rockrohr@imail.de>, size=2801, nrcpt=1 (queue active)
Feb 5 22:32:47 [postfix/qmgr] 9E0803540F9: from=<christian.rockrohr@imail.de>, size=2177, nrcpt=1 (queue active)
Feb 5 22:32:47 [postfix/qmgr] 7C8F73540FA: from=<christian.rockrohr@imail.de>, size=2255, nrcpt=1 (queue active)
Feb 5 22:32:47 [postfix/qmgr] 314FA3540FE: from=<christian.rockrohr@imail.de>, size=2457, nrcpt=1 (queue active)
Feb 5 22:32:47 [postfix/pipe] fatal: request to deliver as root
Feb 5 22:32:48 [postfix/master] warning: process /usr/lib/postfix/pipe pid 12759 exit status 1
Feb 5 22:32:48 [postfix/master] warning: /usr/lib/postfix/pipe: bad command startup -- throttling
Feb 5 22:32:48 [postfix/qmgr] warning: premature end-of-input on private/maildrop socket while reading input attribute name
Feb 5 22:32:48 [postfix/qmgr] warning: private/maildrop socket: malformed response
Feb 5 22:32:48 [postfix/qmgr] warning: transport maildrop failure -- see a previous warning/fatal/panic logfile record for the problem description
Feb 5 22:32:48 [postfix/master] warning: process /usr/lib/postfix/pipe pid 12760 exit status 1
Feb 5 22:32:48 [postfix/qmgr] 314FA3540FE: to=<mail@christian-rockrohr.de>, relay=none, delay=98246, status=deferred (unknown mail transport error)
Feb 5 22:32:48 [postfix/qmgr] 7C8F73540FA: to=<mail@christian-rockrohr.de>, relay=none, delay=106240, status=deferred (unknown mail transport error)
Feb 5 22:32:48 [postfix/qmgr] 9E0803540F9: to=<mail@christian-rockrohr.de>, relay=none, delay=106333, status=deferred (unknown mail transport error)
Feb 5 22:32:48 [postfix/qmgr] 9D1963540FC: to=<mail@christian-rockrohr.de>, relay=none, delay=99623, status=deferred (unknown mail transport error)
Feb 5 22:32:48 [postfix/qmgr] A69923540FB: to=<mail@christian-rockrohr.de>, relay=none, delay=98463, status=deferred (unknown mail transport error)
Feb 5 22:32:48 [postfix/qmgr] B5C00354102: to=<mail@christian-rockrohr.de>, orig_to=<testenb@christian-rockrohr.de>, relay=none, delay=74034, status=deferred (unknown mail transport error)
Feb 5 22:32:48 [postfix/qmgr] warning: premature end-of-input on private/maildrop socket while reading input attribute name
Feb 5 22:32:48 [postfix/qmgr] warning: private/maildrop socket: malformed response
Feb 5 22:32:48 [postfix/qmgr] warning: transport maildrop failure -- see a previous warning/fatal/panic logfile record for the problem description




Hier mal ein Auszug von einem ganz normalen Maileingang, Mail wurde auch perfekt zugestellt.



[postfix/smtpd] connect from helium.ruby-lang.org[210.251.121.214]
Feb 5 22:39:16 [postfix/smtpd] 69824354065: client=helium.ruby-lang.org[210.251.121.214]
Feb 5 22:39:17 [postfix/cleanup] 69824354065: message-id=<20040205213949.GA1451@student.ei.uni-stuttgart.de>
Feb 5 22:39:17 [postfix/qmgr] 69824354065: from=<ruby-talk-admin@ruby-lang.org>, size=4082, nrcpt=1 (queue active)
Feb 5 22:39:17 [postfix/smtpd] disconnect from helium.ruby-lang.org[210.251.121.214]
Feb 5 22:39:21 [postfix/pickup] 4DE11354066: uid=406 from=<ruby-talk-admin@ruby-lang.org>
Feb 5 22:39:21 [postfix/pipe] 69824354065: to=<mailing-list@cewlsoft.com>, relay=SpamAssassin, delay=5, status=sent (nasty.nethole.org)
Feb 5 22:39:21 [postfix/cleanup] 4DE11354066: message-id=<20040205213949.GA1451@student.ei.uni-stuttgart.de>
Feb 5 22:39:21 [postfix/qmgr] 4DE11354066: from=<ruby-talk-admin@ruby-lang.org>, size=4197, nrcpt=1 (queue active)
Feb 5 22:39:21 [postfix/virtual] 4DE11354066: to=<mailing-list@cewlsoft.com>, relay=virtual, delay=0, status=sent (maildir)



Irgendwie steht da nirgends relay=maildrop oder sowas. Ich bilde mir ein, dass das da stehen muss damit es geht, ist aber nur so eine vermutung :)
Man findet aber auch verdammt wenig Lesestuff darüber!



Wäre nett wenn du (oder sonst wer) mal über die Logfiles schaut und mir ggf. ein paar Tips/Häufige fehlerquellen oder sonst6 was gibt. Auch mit den Conf files von jemandem bei dem es geht wäre ich für den Anfang zufrieden :) und mit (mgl. deutschen Anleitungen erstrecht natürlich)

schönen Abend noch