HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Virtual Users And Domains With Postfix... "unknown user" error (http://www.howtoforge.com/forums/showthread.php?t=2011)

jason_worthen 12th January 2006 05:23

Virtual Users And Domains With Postfix... "unknown user" error
 
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=<jason@plink.worthen.org>, relay=local, delay=0, status=bounced (unknown user: "jason")
additionally, here is a select from MySQL:

Code:

+-------------------------+---------------+----------+
| email                  | password      | quota    |
+-------------------------+---------------+----------+
| jason@plink.worthen.org | ZBAdWFDgD4AbM | 10485760 |
+-------------------------+---------------+----------+

Code:

+-------------------+
| domain            |
+-------------------+
| plink.worthen.org |
+-------------------+


falko 12th January 2006 12:49

Do you use Debian Sarge? Because the Postfix version on Debian Sarge is 2.1.5, that's the version used in the tutorial.

For Postfix 2.2, the format has changed a little bit: http://www.howtoforge.com/forums/sho...?t=1149&page=4

jason_worthen 12th January 2006 15:59

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...

falko 12th January 2006 22:03

Have a look at this thread: http://www.howtoforge.com/forums/showthread.php?t=861, especially the last post which is related to the file /etc/pam.d/smtp. So you should check the content of that file again.

jason_worthen 13th January 2006 04:33

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!!

falko 13th January 2006 23:54

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.

triple5 25th June 2006 00:52

please give some information
 
Quote:

Originally Posted by jason_worthen
I was able to send email and receive email now. Thanks!

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...

triple5 25th June 2006 05:39

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...


All times are GMT +2. The time now is 01:36.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.