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)
-   -   Mail server using Postfix, Dovecot, Mysql... Postfix virtual maps doesn't work?? (http://www.howtoforge.com/forums/showthread.php?t=20660)

tarasbuljba 23rd February 2008 16:45

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!

topdog 23rd February 2008 17:00

What do you see in the logs when postfix stops working ?

tarasbuljba 23rd February 2008 17:47

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

topdog 23rd February 2008 18:37

You can run strace to see what is actually happening what is causing postfix to hung and not deliver.

tarasbuljba 23rd February 2008 19:31

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 :/

topdog 24th February 2008 07:10

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.

tarasbuljba 24th February 2008 08:20

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 :/?

topdog 24th February 2008 08:27

Yep your postfix was built without mysql support.
Code:

ldd `which postfix`

tarasbuljba 24th February 2008 09:03

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?

topdog 24th February 2008 12:43

You need to add your network to the mynetworks option, or use smtp authentication.


All times are GMT +2. The time now is 15:49.

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