PDA

View Full Version : Postfix Virtual Users - doesnt work


vargadanis
30th August 2007, 00:04
Hi!
I promise I will give as much info as I can. I followed everything according to:
http://howtoforge.com/virtual_users_and_domains_with_postfix_debian_etch _p6

Everything seems to work.
dani@dani-laptop:~$ telnet 192.168.0.119 25
Trying 192.168.0.119...
Connected to 192.168.0.119.
Escape character is '^]'.
220 danis.myip.hu ESMTP Postfix (Debian/GNU)
ehlo localhost
250-danis.myip.hu
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
221 2.0.0 Bye
Connection closed by foreign host.

That is good, isn't it? I tried to send a mail to the root.
mail root@localhost
Subject: Test
Test
Ctrl+D
Cc:
su - dani
mail
1 new mail
That is working too. Dani is a local user that is in the /etc/aliases file. It gets the mails that are sent to root.
So local delivery is working fine.
I added a domain in the MySQL DB and then a user. I sent a mail to the created user but nothing happened. in the /home/vmail/ dir there should be a dir like example.com and some more stuff, right? It is completly empty.

I tried to log on via pop3:
chdir danis.myip.hu/test/ failed
syslog
Aug 29 18:03:22 danis postfix/smtp[16186]: D149F8FE25: to=<test@danis.myip.hu>, relay=127.0.0.1[127.0.0.1]:10024, delay=9.3, delays=0.23/0.04/0.09/8.9, dsn=4.6.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.6.0 Failed, id=15779-02, from MTA([127.0.0.1]:10025): 451 4.3.0 Error: queue file write error (in reply to end of DATA command))
Aug 29 18:03:47 danis courierpop3login: Connection, ip=[::ffff:192.168.0.101]
Aug 29 18:03:47 danis courierpop3login: chdir danis.myip.hu/test/: No such file or directory
Aug 29 18:08:09 danis postfix/smtpd[16209]: connect from unknown[192.168.0.101]
Aug 29 18:08:13 danis postfix/smtpd[16209]: disconnect from unknown[192.168.0.101]
Aug 29 18:09:01 danis /USR/SBIN/CRON[16212]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Aug 29 18:10:52 danis courierpop3login: Connection, ip=[::ffff:192.168.0.101]
Aug 29 18:10:53 danis courierpop3login: chdir danis.myip.hu/test/: No such file or directory
mail.err
Aug 28 11:42:59 mail postfix/smtpd[16186]: fatal: non-null host address bits in "xx.xx.xx.xx/24", perhaps you should use "xx.xx.xx.xx/24" instead
Aug 29 15:40:28 danis postfix[2228]: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: danis,myip.hu
Aug 29 17:40:30 danis postfix/master[15329]: fatal: /etc/postfix/master.cf: line 78: bad transport type: smtp_data_done_timeout=1200
Aug 29 17:41:49 danis postfix/master[15394]: fatal: /etc/postfix/master.cf: line 78: bad transport type: smtp_data_done_timeout=1200
Aug 29 17:42:29 danis postfix/master[15458]: fatal: /etc/postfix/master.cf: line 78: bad transport type: smtp_data_done_timeout=1200

I corrected the master.cf file. It is good now

If u need anything else, pls let me know

vargadanis
30th August 2007, 00:37
This is odd
I added a new domain in the MySQL db. I sent a mail:
mail test@mytestdomain.hu
also I added a forwarder so a local user would get it too.
I chk the local user's mail and here is the mail
but there is nothing in the /home/vmail dir and I cannot find any errors in the logs. Any clue?

falko
30th August 2007, 22:56
Aug 29 15:40:28 danis postfix[2228]: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: danis,myip.huPlease correct this error. I guess it should be danis.myip.hu.

vargadanis
30th August 2007, 23:53
I corrected it. However the problem still exists.
What if I removed the computer from the internet just to test it locally. I installed bind9 on it and set up another computer to serve as NS2. So I have two NS servers on a LAN. I set up the computer to search those nameservers.
Do u think it is a problem that that domain I wanted to test is actually not pointing to my computer and postfix was sending the emails out to the internet instead of local delivery? If it is so, than all my problems are solved.

vargadanis
31st August 2007, 10:19
Peeps... I am sorry... I found the solution for the problem. Actually it was there during the whole time.
The only problem was that there was not MX pointing to my computer therefore the mail could not be delivered. So all u need to do is to edit the bind9 zone file and add and MX record. :)