Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 23rd February 2008, 17:45
tarasbuljba tarasbuljba is offline
Junior Member
 
Join Date: Dec 2007
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Angry Mail server using Postfix, Dovecot, Mysql... Postfix virtual maps doesn't work??

I have followed this guide

http://www.howtoforge.com/virtual-us...ysql-centos4.5

I change a little at me and edited custom postfix file as it is there, dovecot work, squiremail work and postfix work when i have no virtual aliases! When i add virtual things to postfix then it doesn't send/receive mail

In my configuration when i have this commented out all work fine and no errors, when it is use then postfix doesn't work

Code:
#virtual_mailbox_domains = mysql:$config_directory/mysql_virtual_domains_maps.cf
#virtual_mailbox_base = /var/vmail
#virtual_mailbox_maps = mysql:$config_directory/mysql_virtual_mailbox_maps.cf
#virtual_alias_maps = mysql:$config_directory/mysql_virtual_alias_maps.cf
#virtual_minimum_uid = 5000
#virtual_uid_maps = static:5000
#virtual_gid_maps = static:5000
#virtual_maildir_limit_message = "The user you are trying to reach is over quota."
#virtual_overquota_bounce = yes
#virtual_mailbox_extended = yes
#virtual_create_maildirsize = yes
Files i use for it are from that guide i posted link above... does anyone have any idea about why is this like that? I spent hours and hours trying all ways... Now i have dovecot and other running for nothing as this doesn't work

Thanks!
Reply With Quote
Sponsored Links
  #2  
Old 23rd February 2008, 18:00
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 154 Times in 151 Posts
Default

What do you see in the logs when postfix stops working ?
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
The Following User Says Thank You to topdog For This Useful Post:
tarasbuljba (24th February 2008)
  #3  
Old 23rd February 2008, 18:47
tarasbuljba tarasbuljba is offline
Junior Member
 
Join Date: Dec 2007
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Default

No no, postfix doesn't stop working, it loads normal as like without virtual things, and logs are empty...

I tested a bit more and it seems that problem is in virtual_mailbox_domains, virtual_alias_maps, virtual_mailbox_maps files because only they are commented now and postfix work, other i didn't comment... now i dunno if it is files from that guide or something wrong in that line? :O

EDIT: I forgot to add, when i have that virtual stuff mails seems to stay in quote on serv, when i comment them out later and restart postfix i receive emails sent by eg. forum on serv

Last edited by tarasbuljba; 23rd February 2008 at 18:54.
Reply With Quote
  #4  
Old 23rd February 2008, 19:37
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 154 Times in 151 Posts
Default

You can run strace to see what is actually happening what is causing postfix to hung and not deliver.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #5  
Old 23rd February 2008, 20:31
tarasbuljba tarasbuljba is offline
Junior Member
 
Join Date: Dec 2007
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I get this for strace -p on main master pid

Code:
time(NULL)                              = 1203790938
read(10, "\0", 1)                       = 1
read(10, 0xbfca762b, 1)                 = -1 EAGAIN (Resource temporarily unavailable)
waitpid(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], WNOHANG) = 22929
time(NULL)                              = 1203790938
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2917, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2917, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2917, ...}) = 0
send(3, "<20>Feb 23 19:22:18 postfix/mast"..., 120, MSG_NOSIGNAL) = 120
time(NULL)                              = 1203790938
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2917, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2917, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2917, ...}) = 0
send(3, "<20>Feb 23 19:22:18 postfix/mast"..., 123, MSG_NOSIGNAL) = 123
time(NULL)                              = 1203790938
waitpid(-1, 0xbfca7804, WNOHANG)        = 0
alarm(333)                              = 333
time(NULL)                              = 1203790938
select(94, [10 11 12 15 18 21 23 24 27 29 30 32 33 35 36 38 39 41 42 44 45 47 48 50 51 53 54 56 57 59 60 62 63 65 66 68 69 71 72 74 75 77 78 80 81 83 84 86 87 89 90 92 93], [], [10 11 12 15 18 21 23 24 27 29 30 32 33 35 36 38 39 41 42 44 45 47 48 50 51 53 54 56 57 59 60 62 63 65 66 68 69 71 72 74 75 77 78 80 81 83 84 86 87 89 90 92 93], {34, 0}
I noticed something else, when i use that virtual things with grep postfix i get
Code:
root     22887  0.0  0.1   6704  1748 ?        Ss   19:21   0:00 /usr/libexec/postfix/master
postfix  22889  0.0  0.1   6768  1736 ?        S    19:21   0:00 pickup -l -t fifo -u
postfix  22890  0.0  0.1   6828  1828 ?        S    19:21   0:00 qmgr -l -t fifo -u
And when i don't use them i get many more...
Code:
root     23114  0.0  0.1   6704  1748 ?        Ss   19:26   0:00 /usr/libexec/postfix/master
postfix  23116  0.0  0.1   6772  1784 ?        S    19:26   0:00 pickup -l -t fifo -u
postfix  23117  0.0  0.1   6828  1844 ?        S    19:26   0:00 qmgr -l -t fifo -u
postfix  23118  0.0  0.1   6892  1888 ?        S    19:26   0:00 cleanup -z -t unix -u
postfix  23119  0.0  0.1   6776  1736 ?        S    19:26   0:00 trivial-rewrite -n rewrite -t unix -u
postfix  23120  0.0  0.2   6932  2304 ?        S    19:26   0:00 smtp -t unix -u
postfix  23121  0.0  0.1   6764  1820 ?        S    19:26   0:00 tlsmgr -l -t unix -u
postfix  23122  0.0  0.1   6892  1884 ?        S    19:26   0:00 cleanup -z -t unix -u
postfix  23123  0.0  0.2   6936  2316 ?        S    19:26   0:00 smtp -t unix -u
postfix  23124  0.0  0.2   6936  2316 ?        S    19:26   0:00 smtp -t unix -u
postfix  23125  0.0  0.2   6936  2316 ?        S    19:26   0:00 smtp -t unix -u
Now that is weird a bit :/
Reply With Quote
  #6  
Old 24th February 2008, 08:10
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 154 Times in 151 Posts
Default

The master is unable to start the other processes that means something is hunging i cannot put my figure on it, I guess you need to run strace from when you start the process.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #7  
Old 24th February 2008, 09:20
tarasbuljba tarasbuljba is offline
Junior Member
 
Join Date: Dec 2007
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I don't know how to do that kind of strace really

But, i did some more starts and tests and i found this in logs!

Code:
Feb 24 08:14:06 server postfix/postfix-script: starting the Postfix mail system
Feb 24 08:14:06 server postfix/master[6211]: daemon started -- version 2.3.3, configuration /etc/postfix
Feb 24 08:14:06 server postfix/qmgr[6214]: C8D0122C8177: from=<apache@server.borgteam.com>, size=1249, nrcpt=2 (queue active)
Feb 24 08:14:06 server postfix/trivial-rewrite[6215]: fatal: unsupported dictionary type: mysql
Feb 24 08:14:07 server postfix/master[6211]: warning: process /usr/libexec/postfix/trivial-rewrite pid 6215 exit status 1
Feb 24 08:14:07 server postfix/master[6211]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Feb 24 08:15:07 server postfix/trivial-rewrite[6305]: fatal: unsupported dictionary type: mysql
Feb 24 08:15:08 server postfix/master[6211]: warning: process /usr/libexec/postfix/trivial-rewrite pid 6305 exit status 1
Feb 24 08:15:08 server postfix/master[6211]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Feb 24 08:15:25 server postfix/cleanup[6316]: fatal: unsupported dictionary type: mysql
Feb 24 08:15:26 server postfix/master[6211]: warning: process /usr/libexec/postfix/cleanup pid 6316 exit status 1
Feb 24 08:15:26 server postfix/master[6211]: warning: /usr/libexec/postfix/cleanup: bad command startup -- throttling
mysql is unsupported :/?
Reply With Quote
  #8  
Old 24th February 2008, 09:27
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 154 Times in 151 Posts
Default

Yep your postfix was built without mysql support.
Code:
ldd `which postfix`
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #9  
Old 24th February 2008, 10:03
tarasbuljba tarasbuljba is offline
Junior Member
 
Join Date: Dec 2007
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Third edit...

I go all to work now, virtual emails also work, i can send and receive emails, but... i hav eproblem with pop3 on windows mail when i add account

i can receive emails normal over windows mail but i can't send as i get relay reject message... over squiremail i can send...

I also tried to add imap account to windows mail and i get same error when i wanna send message... any ideas?

Last edited by tarasbuljba; 24th February 2008 at 13:30.
Reply With Quote
  #10  
Old 24th February 2008, 13:43
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 154 Times in 151 Posts
 
Default

You need to add your network to the mynetworks option, or use smtp authentication.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
procmail can't write Hellbound General 27 8th June 2009 22:51
Filtering emails using Spamassassin and Clamav for Exchange 2000 Server Rocky Server Operation 19 11th March 2008 09:27
The Perfect Setup - Debian Etch (Debian 4.0) some trouble daniel80 HOWTO-Related Questions 26 1st February 2008 17:30
Webmail Relay Error palkat General 17 23rd April 2006 19:12
postfix config jmroth Installation/Configuration 6 18th September 2005 16:58


All times are GMT +2. The time now is 06:53.


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