I've followed the tutorial, setting up a new debain system with Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV) Mail sent get delivered to /home/jk/Maildir/ instead of /home/vmail/myserver.com/jk/Maildir/ (myserver.com is my real domain name) I've quadruple checked all the config files etc. I've even referred back to the older tutorial "Tutorial: ISP-style Email Service with Debian-Sarge and Postfix 2.1" to help educate myself more. It appears that MYSQL msgs go to /var/log/syslog on this system and there are no errors in that logfile. Which component of these is the one responsible for actually writing the email into the final destination, and, can I somehow turn on verbose logging for that component so I can see what might be going wrong?
I discovered that this seemingly benign error/warning in mail.log: Jan 7 22:43:14 server postfix/trivial-rewrite[12609]: warning: do not list domain server.com in BOTH mydestination and virtual_mailbox_domains was my problem with mail delivery to the /home/vmail/... Maildirs. I removed my server.com from the mydestinations field in main.cf (i have it in the domains table in the mysql mail database) and mail was then delievered properly. also i discovered that in addition to adding a new user to the users database i also had to do roughly this: mkdir /home/vmail/<server.com>/<newuser> cd /home/vmail/<server.com>/<newuser> maildirmake Maildir chown -R vmail:vmail /home/vmail/<server.com>/<newuser> or else mail would not be delivered. Apparently postfix et al does not create the users or Maildir directories if they are not there. I saw errors like this in the mail.log if I didn't do those creates: Jan 8 07:36:06 server amavis[6795]: (06795-02) Checking: <[email protected]> -> <[email protected]> Jan 8 07:36:06 server amavis[6795]: (06795-02) lookup_sql: 2013, Lost connection to MySQL server during query Jan 8 07:36:06 server amavis[6795]: (06795-02) NOTICE: Disconnected from SQL server Jan 8 07:36:06 server amavis[6795]: (06795-02) TROUBLE in check_mail: creating_partsdir FAILED: DBD::mysql::st execute failed: Lost connection to MySQL server during query at (eval 38) line 238, <GEN17> line 97. Once I created the users dir and Mailbox files and chown'd them to vmail , mail was properly delivered
I've been going through the same frustrations with setting up a new debain system with Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV) I can't for the life of me find where the email is going! I can send out no problem but I can't seem to receive to the /home/vmail dir. I did what you suggested with adding the directory but it still doesn't seem to work. Here's a look at my mail log, I can't seem to find any mysql output though. my domain is viewdo.net and I've created user [email protected] here's the mail log Jan 25 09:23:23 alpha postfix/smtpd[13159]: connect from an-out-0708.google.com[209.85.132.243] Jan 25 09:23:23 alpha postfix/smtpd[13159]: 136636B829E: client=an-out-0708.google.com[209.85.132.243] Jan 25 09:23:23 alpha postfix/cleanup[13163]: 136636B829E: message-id=<[email protected]> Jan 25 09:23:23 alpha postfix/qmgr[13084]: 136636B829E: from=<[email protected]>, size=1639, nrcpt=1 (queue active) Jan 25 09:23:30 alpha postfix/smtpd[13169]: connect from localhost[127.0.0.1] Jan 25 09:23:30 alpha postfix/smtpd[13169]: 93D576B8302: client=localhost[127.0.0.1] Jan 25 09:23:30 alpha postfix/cleanup[13163]: 93D576B8302: message-id=<[email protected]> Jan 25 09:23:30 alpha postfix/qmgr[13084]: 93D576B8302: from=<[email protected]>, size=2099, nrcpt=1 (queue active) Jan 25 09:23:30 alpha amavis[9692]: (09692-06) Passed, <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, Hits: 0.024 Jan 25 09:23:30 alpha postfix/smtp[13164]: 136636B829E: to=<[email protected]>, relay=127.0.0.1[127.0.0.1], delay=7, status=sent (250 2.6.0 Ok, id=09692-06, from MTA: 250 Ok: queued as 93D576B8$ Jan 25 09:23:30 alpha postfix/qmgr[13084]: 136636B829E: removed Jan 25 09:23:30 alpha postfix/smtpd[13169]: disconnect from localhost[127.0.0.1] Jan 25 09:23:31 alpha postfix/smtp[13171]: 93D576B8302: to=<[email protected]>, orig_to=<[email protected]>, relay=gmail-smtp-in.l.google.com[66.249.83.27], delay=1, status=sent (250 2.0$ Jan 25 09:23:31 alpha postfix/qmgr[13084]: 93D576B8302: removed It appears to be delivering. No bounceback, status is sent. Any ideas? Thanks in advance.