Virtual Users And Domains With Postfix... "unknown user" error

Discussion in 'HOWTO-Related Questions' started by jason_worthen, Jan 12, 2006.

  1. jason_worthen

    jason_worthen New Member

    i have followed the Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV) to a tee (geez, ive gone over it 5 times -- i sure hope i have). i had to update my .cf files because i am running postfix 2.2.4 but still am receiving an "unknown user" error.

    i am not sure what all info would be necessary to troubleshoot this but i am including my mysql-virtual_mailboxes.cf file as a starting point:

    Code:
    user = mail_admin
    password = p0stf1x_#dm!n
    dbname = mail
    query = SELECT CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') FROM users WHERE email='%s'
    hosts = 127.0.0.1
    
    error in /var/log/mail.log

    Code:
    Jan 11 22:10:44 plink postfix/local[19703]: 254F8E4270: to=<[email protected]>, relay=local, delay=0, status=bounced (unknown user: "jason")
    additionally, here is a select from MySQL:

    Code:
    +-------------------------+---------------+----------+
    | email                   | password      | quota    |
    +-------------------------+---------------+----------+
    | [email protected] | ZBAdWFDgD4AbM | 10485760 |
    +-------------------------+---------------+----------+
    
    Code:
    +-------------------+
    | domain            |
    +-------------------+
    | plink.worthen.org |
    +-------------------+
    
     
    Last edited: Jan 12, 2006
  2. falko

    falko Super Moderator Howtoforge Staff

  3. jason_worthen

    jason_worthen New Member

    I use Ubuntu 5.10. I did see something in my log that I didn't catch last night...

    Code:
    postfix/smtpd[19702]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql
    No clue how to debug that yet...
     
  4. falko

    falko Super Moderator Howtoforge Staff

  5. jason_worthen

    jason_worthen New Member

    good to go!

    I was able to send email and receive email now. Thanks!

    Interestingly, I still am receiving an error in the auth.log:

    Code:
    Jan 12 21:28:12 plink postfix/smtpd[7712]: sql_select option missing
    Jan 12 21:28:12 plink postfix/smtpd[7712]: auxpropfunc error no mechanism available
    Jan 12 21:28:12 plink postfix/smtpd[7712]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql
    it does not appear to effect the working of the configuration, however.

    thanks again!!
     
  6. falko

    falko Super Moderator Howtoforge Staff

    I'd compare your configuration files with the ones from the tutorial. Maybe you made a typo somewhere. Please take care about the format of the configuration files, especially Courier is very finicky about whitespaces, tabs and so on.
     
  7. triple5

    triple5 New Member

    please give some information

    Please say what the problem was... what did you do? This way you could help me, because I have a similar problem...

    I get the following in my /var/log/mail.info:
    Code:
    Jun 25 01:07:21 localhost amavis[8960]: (08960-05) mail_via_smtp: 450 4.4.1 Can't connect to 127.0.0.1 port 10025, Bad file descriptor at /usr/sbin/amavisd-new line 2912, <GEN17> line 467., id=08960-05
    I have been following (Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV)) howto
    using debian sarge and postfix 2.1.5

    this line (2912)reads:
    Code:
           defined($smtp_handle)
    and this is a few lines above
    Code:
    $smtp_handle = Net::SMTP->new("$relayhost:$relayhost_port",
                Hello => $localhost_name, ExactAddresses => 1,
                Timeout => max(60, min(5*60,$remaining_time)), # for each operation
    I get this error in /var/log/mail.info
    Code:
    Jun 25 01:30:52 localhost dccproc[19496]: socket(UDP): Address family not supported by protocol
    Jun 25 01:30:53 localhost postfix/smtpd[19497]: fatal: unexpected command-line argument: permit_mynetworks,
    Jun 25 01:30:54 localhost amavis[8960]: (08960-06) mail_via_smtp: 450 4.4.1 Can't connect to 127.0.0.1 port 10025, Bad file descriptor at /usr/sbin/amavisd-new line 2912, <GEN17> line 560., id=08960-06
    Jun 25 01:30:54 localhost postfix/master[19475]: warning: process /usr/lib/postfix/smtpd pid 19497 exit status 1
    Jun 25 01:30:54 localhost postfix/master[19475]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    Jun 25 01:30:54 localhost amavis[8960]: (08960-06) Not-Delivered,  ..........................................................................................
    I don't get where my mistake is...
    I was never able to use the smtp to send mail via thunderbird. The Webserver that I have running on there could once deliver mail only to those virtual mailboxes which I could pickup by IMAP fine, but I couldn't use the same server for sending.

    Also, if I had someone send mail to any other domain (e.g. via the online registration form for my website) it wouldn't send it.

    Thanks for the help, though, I hope I can get some more.
    (Yes I have checked the files again.) But I must have overlooked something somewhere...
     
    Last edited: Jun 25, 2006
  8. triple5

    triple5 New Member

    solved

    I found the problem: it cannot be a space after the "=" and "permit_mynetworks"
    it must be "=permit_mynetworks"

    but this was not the only problem, i had to create the file
    Code:
    /etc/postfix/sasl_passwd
    and do
    Code:
    postmap /etc/postfix/sasl_passwd
    so that sasl works properly.

    so far everything seems to be working...
     

Share This Page