I tried suggestions from Feklar but I get mixed results. On some Windows workstations some options work (with Outlook but not Outlook Express) and on some Linux mail clients (most) options work. If it works on the one it doesn't work on the other.
But I cannot only live with DIGEST-MD5 or PLAIN as I am intercepting 100s of different mail user's SMTP. I need at least a longer list maybe even this long:
mech_list: plain login digest-md5 cram-md5
You could configure Postfix to use SASL with PAM, and then hook PAM into a database (say MySQL) with a query that always returns success. Not the most straightforward configuration, but it should work fairly cleanly.
I like your suggestion a lot. I tried it but ran into some problems. First it appears that when SASL with PAM is hooked into MySQL due whatever reason it insists on always checking the password.
I tried fooling it by modifying the sql_select statement:
smtpd.conf
sql_select: SELECT '%v' from users where username = '%u'
But it seems it's catching my plan:
Feb 3 13:07:05 monitor postfix/smtpd[32315]: '%v' shouldn't be in a SELECT or DELETE
Feb 3 13:07:05 monitor postfix/smtpd[32315]: sql plugin doing query SELECT '' from users where username = 'test';
Feb 3 13:07:05 monitor postfix/smtpd[32315]: sql plugin: no result found
I suspect it always wants to return a password.
So I looked at the source here:
http://www.opensource.apple.com/source/ ... gins/sql.c
I think in static int _mysql_exec if I can modify the source to always return 0 instead of -1 I have an answer.
But the source fails to compile on Ubuntu 32-bit 8.03 LTS even before any changes are made:
cyrus-sasl2_2.1.23.dfsg1 from here:
http://security.ubuntu.com/ubuntu/pool/ ... rus-sasl2/
make returns:
digestmd5.c:3704: warning: unused parameter 'serverinlen'
digestmd5.c: In function 'digestmd5_client_mech_step3':
digestmd5.c:3838: warning: unused parameter 'prompt_need'
digestmd5.c:3839: warning: unused parameter 'clientout'
digestmd5.c:3840: warning: unused parameter 'clientoutlen'
digestmd5.c: In function 'digestmd5_client_mech_step':
digestmd5.c:4000: warning: pointer targets in assignment differ in signedness
make[2]: *** [digestmd5.lo] Error 1
make[2]: Leaving directory `/home/eugene/cyrus-sasl2_2.1.23.dfsg1/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/eugene/cyrus-sasl2_2.1.23.dfsg1'
make: *** [all] Error 2
So now I am stuck.