PDA

View Full Version : Virtual Users + Domains With Postfix, Courier + MySQL (+SMTP-AUTH, SpamA, ClamAV)


brianwc
23rd January 2006, 09:52
Hi,

I followed the Debian Sarge 3.1 howto and then the Postfix with virtual users and domains (except I didn't want quotas on mailboxes so I didn't recompile postfix in the second howto and left out the quota-related parts). I then tried to add squirrelmail. It doesn't work because I don't think the postfix install (with all these bells and whistles) works yet. Here are the errors I'm getting:

Jan 22 21:02:43 hostname postfix/smtpd[5366]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql
Jan 22 21:02:43 hostname postfix/smtpd[5366]: sql_select option missing
Jan 22 21:02:43 hostname postfix/smtpd[5366]: auxpropfunc error no mechanism

I'm glad to post whichever config files people think might be related to these errors.

Also, I'd be pleased if someone could explain in detail a text-based method of testing the mail server's functionality. (I don't have an x-server installed so full-blown email clients like Thunderbird or Evolution are out; and there's too much that could go wrong with my squirrelmail install to rely on just that to know if it's working.) Thanks.

falko
23rd January 2006, 19:09
Please have a look at these threads:
http://www.howtoforge.com/forums/showthread.php?t=576
http://www.howtoforge.com/forums/showthread.php?t=2011
http://www.howtoforge.com/forums/showthread.php?t=861

brianwc
8th February 2006, 06:12
Hi,

I've read those threads now several times and still have some problems. However, some ideas in those threads produced what I hope are informative errors.

If I try:

# echo "test email" | mail user@yourdomain.com

I get the following in /var/log/mail.info

Feb 7 19:59:47 hostname postfix/virtual[5901]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data
Feb 7 19:59:48 hostname postfix/master[5851]: warning: process /usr/lib/postfix/virtual pid 5901 exit status 1
Feb 7 19:59:48 hostname postfix/master[5851]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
Feb 7 20:00:48 hostname postfix/virtual[5903]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data
Feb 7 20:00:49 hostname postfix/master[5851]: warning: process /usr/lib/postfix/virtual pid 5903 exit status 1
Feb 7 20:00:49 hostname postfix/master[5851]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling

Also, when I try to login via the squirrelmail web interface, /var/log/mail.info shows:

Feb 7 19:54:08 hostname imaplogin: Connection, ip=[::ffff:127.0.0.1]
Feb 7 19:54:08 hostname imaplogin: chdir Maildir: No such file or directory

Do the above errors suggest where I could look for whatever is producing these constant errors:

Feb 7 18:02:40 hostname postfix/smtpd[4770]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql
Feb 7 18:02:40 hostname postfix/smtpd[4770]: sql_select option missing
Feb 7 18:02:40 hostname postfix/smtpd[4770]: auxpropfunc error no mechanism available

Thanks for any ideas. --Brian

falko
8th February 2006, 11:41
Your setup seems to differ slightly from the one in the tutorial...

Feb 7 19:59:47 hostname postfix/virtual[5901]: fatal: mysql:/etc/postfix/mysql-virtual_mailboxes.cf: proxy map is not allowed for security sensitive data

Can you remove all these proxy: strings in /etc/postfix/main.cf so that you have

virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf

instead of

virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf, for example? Restart Postfix afterwards.

brianwc
8th February 2006, 21:18
Removing "proxy" from each mysql entry seems to have gotten rid of the "proxy map" errors I mentioned, and my test messages sent from the mail server itself are now visible in the /home/vmail/domainname/username/new directory. However, once I saw things looking better I also sent a message from my regular email client on another computer to that same address and it still hasn't appeared in that vmail directory and I haven't received the bounce either.

I also still get this error anytime I try to use squirrelmail to login to one of the email accounts:

Feb 8 11:11:21 hostname imaplogin: chdir Maildir: No such file or directory and the actual web page comes back with: "ERROR:
ERROR : Connection dropped by imap-server."

It's as if courier or some part of this setup is not aware of the mysql setup and is trying to find a regular Maildir.

I also still get regular sasl errors (the same three notices in my earlier posts), so perhaps this is all an authentication issue of some sort.

Any thoughts on this?

falko
8th February 2006, 23:20
However, once I saw things looking better I also sent a message from my regular email client on another computer to that same address and it still hasn't appeared in that vmail directory and I haven't received the bounce either.
Are you sure that the MX record of the recipient domain points to your Postfix-MySQL server? Please check.

I also still get this error anytime I try to use squirrelmail to login to one of the email accounts:

Feb 8 11:11:21 hostname imaplogin: chdir Maildir: No such file or directory and the actual web page comes back with: "ERROR:
ERROR : Connection dropped by imap-server."
Please send a mail first to the accounts in question so that Maildir can be created.


I also still get regular sasl errors (the same three notices in my earlier posts), so perhaps this is all an authentication issue of some sort.

You should double-check all the configuration files, especially Courier is very finicky about the format of configuration files (white spaces, tabs, etc.).
Take special care about /etc/courier/authmysqlrc and /etc/pam.d/smtp.

Leutenant
9th May 2007, 03:44
just type (when in your home directory) sudo chown "your.user" Maildir/

Also rember to make the tmp/ and cur/ and new/ directory inside Maildir/ if not allready there!

-Leutenant