PDA

View Full Version : postfix smtp authentication; permission to relay


leblanc
3rd December 2007, 08:17
Problem:
By enabling sasl by default it uses local accounts.
I want to test using hash:/etc/postfix/postgresql/smtp_sasl_passwd.cf
once that is working i want to move to pgsql:/....samepath

I've created the smtp_sasl_passwd.cf.db file already.



I disabled sasl in main.cf and successfully relayed anonymously.
When i enable sasl in main.cf it correctly denies users attempting to relay anonymously.

Dec 2 22:39:49 linux-server postfix/smtpd[1442]: disconnect from unknown[192.168.1.1]
Dec 2 22:39:49 linux-server postfix/smtp[1503]: fatal: specify a password table via the `smtp_sasl_password_maps' configuration parameter




I specified the following in main.cf
smtp_sasl_password_maps = hash:/etc/postfix/postgresql/smtp_sasl_passwd.cf

but it doesn't seem to be using that to authenticate users... instead it uses local accounts. so where else do i need to specify to use my hash password table?

smtp.conf

pwcheck_method: saslauthd
mech_list: plain login



what are these other sasl* binaries?

linux-server:/home/vmailuser/mailboxes/mixhacks.com/leblanc.meneses/new # ls /usr/sbin/ | grep sasl
saslauthd
sasldblistusers2
saslpasswd2
testsaslauthd


#currently running sasl binary
linux-server:/home/vmailuser/mailboxes/mixhacks.com/leblanc.meneses/new # ps -ax | grep sasl
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
2979 ? Ss 0:00 /usr/sbin/saslauthd -a pam -n 5
2980 ? S 0:00 /usr/sbin/saslauthd -a pam -n 5
2981 ? S 0:00 /usr/sbin/saslauthd -a pam -n 5
2982 ? S 0:00 /usr/sbin/saslauthd -a pam -n 5
2983 ? S 0:00 /usr/sbin/saslauthd -a pam -n 5
3846 pts/7 R+ 0:00 grep sasl

till
3rd December 2007, 10:09
Hi,

please have a look at one of the "Virtual Users And Domains With Postfix" howtos here at howtoforge. They are available for several linux distributions. The howtos contain the configuration of sasl for mysql based users.

leblanc
3rd December 2007, 16:13
I would really like to understand what i'm doing rather than type lots of commands without any explanation.

Example many of the articles lack ways to incrementally test the server. What ends up happening is the user completes the article and nothing works.. whoops! An email article should use local accounts to show the theory and remove dependencies which add an extra layer of difficulty.. database .. once the user gets local accounts working transitioning to a database would be much easier.

Also lack of explanation. whats the difference of all these binaries?
saslauthd
sasldblistusers2
saslpasswd2
testsaslauthd

just a note these are different in different OS. Some articles have better explanation but commands are different.

I know it has to do with pwcheck_method: saslauthd inside smtp.conf

I can send mail, receive, using posgresql backend. I'm missing relay and courier configurations.

I would really like a better answer than just RTFM.

till
3rd December 2007, 16:29
What you want to know is described in the documentation of the packages and the manpages. You should visit the homepages of the different software projects for this. It is not the function of a howto to copy the content of the software documentation. The function of a howto is to provide a easy to follow solution for a problem.

If you dont want a solution for your problem, then you should not read the howto of course :)

leblanc
3rd December 2007, 19:18
wow no insight. what a moderator, what a troll
what is the purpose of these forums?


good riddance to this community



only trolls delete messages.

till
3rd December 2007, 21:13
wow no insight. what a moderator, what a troll

By the way, its not my tutorial ;) I dont comment on the last comment.

what is the purpose of these forums?

To ask questions about linux. I answered your question in post #2. Sorry that I did not quote the complete tutorial and that I did not copy the SASL documentation into this post too.

only trolls delete messages.

Who deleted a message in which thread?