Mailinglist Archive: opensuse (3437 mails)

< Previous Next >
Re: [opensuse] Postfix & authenticated relay SOLVED
  • From: Koenraad Lelong <k.lelong@xxxxxxxxxxxxxxxxxx>
  • Date: Wed, 04 Jun 2008 08:25:08 +0200
  • Message-id: <48463544.3030603@xxxxxxxxxxxxxxxxxx>
Koenraad Lelong schreef:
I'm running Suse 10.3.
I'm trying to set up Postfix to allow users to send mail from the Internet through my mailserver if they are authenticated.
I have most things set up OK I think, except for one thing, but I don't know were to look for it.
The fact is pam tries to authenticate the user via mysql, but in the query it omits the domain from the mail-address. Where can I configure this ?

I installed pam_mysql from the buildservice, but this did complain about some dependencies. As far as I could see all was installed, so I forced pam-mysql to be installed. Maybe that is the problem ?

In /etc/pam.d this is smtp :
auth required user=xxx passwd=yyy db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=1
account required

In the README in /usr/doc/packages/pam_mysql I read :

For instance, if you want to use it in conjunction with Postfix, the SASL configuration file "smtpd.conf", which is put in the Cyrus-SASL's plugin directory (or the location included in the SASL_PATH environment variable), would look like the following:

pwcheck_method: auxprop
mech_list: plain login cram-md5 digest-md5
sql_engine: mysql
sql_database: sys
sql_user: someuser
sql_passwd: fubar
sql_select: SELECT password FROM users WHERE name='%u' and domain='%r';

But I don't find that smtpd.conf.

I hope I made myself clear, so any suggestions ?

Answering my own question after a long search :

start saslauthd with the -r switch. So in /etc/init.d/saslauthd the start-case becomes :
/sbin/startproc $AUTHD_BIN -a $SASLAUTHD_AUTHMECH -n $SASLAUTHD_THREADS -r > /dev/null 2>&1

-r means saslauthd will add the realm to the user, so the user becomes 'user@realm'. In this case the realm is the domain-name of the email-address.

Met vriendelijke groeten,
Koenraad Lelong
R&D Manager
ACE electronics n.v.

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups