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

Discussion in 'HOWTO-Related Questions' started by savkar, Jan 31, 2006.

Thread Status:
Not open for further replies.
  1. coza

    coza New Member

    Hi Falco,

    The difference in the postfix config for 2.2, is the only difference that u need to create a virtual.cf with the following ?

    user = <user_name> password = <password> hosts = server dbname = maildb query = SELECT goto FROM virtual WHERE address='%s'

    Or do you need to add that to each of the *virtual*.cf files ?

    I cant make out if thats what you mean..

    Thanks.

    CoZa
     
  2. falko

    falko Super Moderator

    You have to change the sql queries in all .cf files.
     
  3. coza

    coza New Member

    Thanks,

    I see that in the new format the lines :

    table =
    select_field =
    where_field =

    have been replaced with :

    query = SELECT goto FROM virtual WHERE address='%s'

    What format does this line need to be changed in each of the .cf's ?
    Are there any examples of this setup for your howto ?
    Thanks in advance,

    CoZa
     
  4. falko

    falko Super Moderator

    In the old format you have something like

    Code:
    table = [COLOR="Red"]virtual[/COLOR]
    select_field = [COLOR="SeaGreen"]goto[/COLOR]
    where_field = [COLOR="Blue"]address[/COLOR]
    In the new format you'd replace it with
    Code:
    query = SELECT [COLOR="SeaGreen"]goto[/COLOR] FROM [COLOR="Red"]virtual[/COLOR] WHERE [COLOR="Blue"]address[/COLOR]='%s'
     
  5. coza

    coza New Member

    Squirrelmail.

    Thanks for that Falko, i finally manaded to change the queries for my Ubuntu server.

    I am now however struggling with squirrelmail, Is there any special config changes to squirrelmail, to work with this howto ?

    I have installed SM and configured the tables etc.
    I have created mailboxes and sent mail to them , creating the actual mailboxes.
    Everything seems fine exept....

    I cannot loginto squirrlemail.
    I get the error : Unknown user or password incorrect.
    I have changed the passwords a few times and doesnt help.

    syslog says :

    Mar 16 12:16:34 localhost imaplogin: Connection, ip=[::ffff:127.0.0.1]
    Mar 16 12:16:39 localhost imaplogin: LOGIN FAILED, ip=[::ffff:127.0.0.1]

    netstat - tap says :

    root@sipho:/etc/postfix# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 localhost.localdo:10024 *:* LISTEN 6469/amavisd (maste
    tcp 0 0 localhost.localdo:10025 *:* LISTEN 6787/master
    tcp 0 0 localhost.localdo:mysql *:* LISTEN 6674/mysqld
    tcp 0 0 *:10000 *:* LISTEN 6978/perl
    tcp 0 0 *:smtp *:* LISTEN 6787/master
    tcp 0 0 localhost.localdo:mysql localhost.localdo:52235 ESTABLISHED6674/mysqld
    tcp 0 0 localhost.localdo:mysql localhost.localdo:35347 ESTABLISHED6674/mysqld
    tcp 0 0 localhost.localdo:52148 localhost.localdo:mysql ESTABLISHED6912/amavisd (child
    tcp 0 0 localhost.localdo:52235 localhost.localdo:mysql ESTABLISHED6913/amavisd (child
    tcp 0 0 localhost.localdo:35347 localhost.localdo:mysql ESTABLISHED6908/apache2
    tcp 0 0 localhost.localdo:mysql localhost.localdo:52148 ESTABLISHED6674/mysqld
    tcp6 0 0 *:imaps *:* LISTEN 6579/couriertcpd
    tcp6 0 0 *:pop3s *:* LISTEN 6614/couriertcpd
    tcp6 0 0 *:pop3 *:* LISTEN 6594/couriertcpd
    tcp6 0 0 *:imap2 *:* LISTEN 6559/couriertcpd
    tcp6 0 0 *:www *:* LISTEN 6858/apache2
    tcp6 0 0 *:ssh *:* LISTEN 6821/sshd
    tcp6 0 2668 sipho.werty.com:ssh ::ffff:192.168.45:54919 ESTABLISHED7095/2
    tcp6 0 0 sipho.werty.com:ssh ::ffff:192.168.45:52956 ESTABLISHED7032/1
    tcp6 0 0 sipho.werty.com:ssh ::ffff:192.168.45:51802 ESTABLISHED6922/0

    Im all out of ideas , can you maybe shed some light on this one for me please ?

    Regards,

    CoZa
     
  6. falko

    falko Super Moderator

    Did you use the correct username (email address) and password?

    There must be some kind of Squirrelmail configuration file. I don't know its correct location, so you must search a little bit for it.
     
  7. coza

    coza New Member

    Squirrelmail

    Have checked through the Squirrel mail config, and cand find anything..

    Has anyone had Squirrelmail up and running with this setup on ubuntu 5.10 ?


    Shot,

    CoZa
     
  8. Ovidiu

    Ovidiu Active Member

    as we have real system users why not use the change_syste-.passwort squirrelmail plugin? or are there separate passwords for system user and email access? how exactly did you integrate the change_mysql passwd ? anything special to be careful about?
     
  9. Ovidiu

    Ovidiu Active Member

    by the way it looks like you are using only one preference file (db) for all mail users , have you thought about givinf each mail user his own spam and ham db for bayes purposes? it won't take more than 2-3MB / user - if doing so how can one separate the sa-learn scripts so that each users spam gets learned only for himself?

    I had a link to a good howto but can't find it anymore...

    anyone gotten so far as to have sa with sa-learn and dcc razor2 and pyzor working on a per user basis?

    ###edit###

    I found out you can use: --dbpath

    but how would that look like so that I could use a variable and the path gets substituted by the actual user...

    p.s. Falko once helped me do this, where would I find these files (I still have a backup of that old system)
     
    Last edited: Mar 20, 2006
  10. coza

    coza New Member

    Can't log into mailboxes.

    Hi guys,

    I have discovered that my problem is not only isolated to the webmail interface.

    - I am not able to authenticate to any mailbox via a mail client or telnet session either.
    - I am 100% that it is not me typing the password incorrectly. and i have re-set it plenty of times. I am using the whole email address as the username.
    - I can send mail to the mailboxes and i have seen that the /home/vmail has the directories and new mail folders created.

    I am running Ubuntu 5.10 with postfix 2.2 and i have updated the mysql queiries for 2.2

    Can anyone help me out ?
    Thanks again in advance.

    CoZa
     
    Last edited: Mar 22, 2006
  11. coza

    coza New Member

    I managed to fix it, I hadn't #'ed out the line MYSQL_NAME_FIELD in /etc/courier/authmysqlrc.

    thanks for your time though.

    CoZa
     
Thread Status:
Not open for further replies.

Share This Page