niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
· nixdoc.net · man pages · Linux HOWTOs · FreeBSD Tips · Forums
navigation Forum index » Apps » Postfix
Postfix + MySQL error: very strange variable %s
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
Author Message
iWarior
*nix forums beginner


Joined: 25 Aug 2008
Posts: 1

PostPosted: Mon Aug 25, 2008 2:01 pm    Post subject: Postfix + MySQL error: very strange variable %s Reply with quote

Hello, All!

I'm working in x64 Ubuntu Server 8.04, and have very strange problem with Postfix + MySQL. I'm install and config Postfix by this HowTo: http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-ubuntu8.04

All seems like a works:

Code:
# netstat -tap

[B]tcp        0      0 localhost:10024         *:*                     LISTEN      4908/amavisd (maste
tcp        0      0 localhost:10025         *:*                     LISTEN      13043/master[/B]
tcp        0      0 localhost:mysql         *:*                     LISTEN      10152/mysqld
tcp        0      0 *:www                   *:*                     LISTEN      5699/apache2
tcp        0      0 example.com:domain          *:*                     LISTEN      4849/named
tcp        0      0 localhost:domain        *:*                     LISTEN      4849/named
[B]tcp        0      0 *:smtp                  *:*                     LISTEN      13043/master[/B]
tcp        0      0 localhost:953           *:*                     LISTEN      4849/named
tcp6       0      0 [::]:imaps              [::]:*                  LISTEN      5427/couriertcpd
tcp6       0      0 [::]:pop3s              [::]:*                  LISTEN      5461/couriertcpd
tcp6       0      0 [::]:pop3               [::]:*                  LISTEN      5441/couriertcpd
tcp6       0      0 [::]:imap2              [::]:*                  LISTEN      5407/couriertcpd
tcp6       0      0 [::]:domain             [::]:*                  LISTEN      4849/named


I'm put all info in to mysql tables, configure *.cf-files, clam, antispam etc

But postfix work very strange (not create mail folder, only receive mail's and so one). After long debug, i'm understand, that problem in mysql query from *.cf files – in %s variable (http://www.postfix.org/mysql_table.5.html). In this variable, in this situation, must be e-mail address of e-mail recipient (eg: admin@example.com), But...

If I'm write in mysql-virtual_mailboxes.cf

Code:
query = SELECT CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') FROM users WHERE email = '%s'


in mysql log file I see, that %s = example.com

But, if I'm write (only for test of course Smile ):

Code:
query = SELECT '%s'


I'm see in %s place my admin@example.com

I'm really don't understand, whats happen, and why in the same place I have different results...:confused:

Any ideas?..
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
The time now is Fri Sep 03, 2010 1:57 pm | All times are GMT
navigation Forum index » Apps » Postfix
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Configure Postfix to relay mail to multiple internal servers tristopherr Postfix 0 Fri Aug 06, 2010 7:03 pm
No new posts Internal Server Error 500 chrislo2004 networking 0 Fri Jul 30, 2010 3:04 am
No new posts Unable to send emails, postfix config issue. hhamilton networking 0 Mon Jul 26, 2010 8:20 pm
No new posts Postfix mail time out vanjre Postfix 0 Mon Jul 26, 2010 12:51 pm
No new posts Postfix 2.5 - reading email rumak18 Postfix 0 Wed May 26, 2010 7:24 am

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum |  email marketing service
 
Sponsors: Nikon D5000 | Download Anime | Myspace Layouts | Breast Enlargement | Storage Lockers
Privacy Policy
[ Time: 0.0836s ][ Queries: 17 (0.0549s) ][ GZIP on - Debug on ]