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 24th September 2006, 22:21
k1piee k1piee is offline
Junior Member
 
Join Date: Sep 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs

hello!

i have a problem whit my mail server. i can't loggin with the users I add to the mysql-database.
I get this error in /var/log/mail.log :

Quote:
Sep 24 22:05:10 server1 courierpop3login: Connection, ip=[::ffff:85.228.206.67]
Sep 24 22:05:34 server1 courierpop3login: LOGIN FAILED, ip=[::ffff:85.228.206.67]
and i get some other errors too:

Quote:
Sep 24 21:46:10 server1 postfix/proxymap[10120]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
Sep 24 21:46:10 server1 postfix/proxymap[10120]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
Sep 24 21:46:10 server1 postfix/trivial-rewrite[10495]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,100): table lookup problem
Sep 24 21:46:10 server1 postfix/trivial-rewrite[10496]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,100): table lookup problem
Sep 24 21:46:10 server1 postfix/trivial-rewrite[10497]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,100): table lookup problem
Sep 24 21:46:11 server1 postfix/smtpd[10119]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Sep 24 21:46:11 server1 postfix/smtpd[10356]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Sep 24 21:46:11 server1 postfix/master[10077]: warning: process /usr/lib/postfix/trivial-rewrite pid 10495 exit status 1
Sep 24 21:46:11 server1 postfix/smtpd[10119]: warning: problem talking to service rewrite: Success
Sep 24 21:46:11 server1 postfix/smtpd[10356]: warning: problem talking to service rewrite: Connection reset by peer
Sep 24 21:46:11 server1 postfix/master[10077]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling
Sep 24 21:46:11 server1 postfix/smtpd[10357]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Sep 24 21:46:11 server1 postfix/smtpd[10125]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Sep 24 21:46:11 server1 postfix/master[10077]: warning: process /usr/lib/postfix/trivial-rewrite pid 10496 exit status 1
Sep 24 21:46:11 server1 postfix/smtpd[10357]: warning: problem talking to service rewrite: Success
Sep 24 21:46:11 server1 postfix/smtpd[10125]: warning: problem talking to service rewrite: Connection reset by peer
Sep 24 21:46:11 server1 postfix/smtpd[10355]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Sep 24 21:46:11 server1 postfix/smtpd[10442]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Sep 24 21:46:11 server1 postfix/master[10077]: warning: process /usr/lib/postfix/trivial-rewrite pid 10497 exit status 1
Sep 24 21:46:11 server1 postfix/smtpd[10355]: warning: problem talking to service rewrite: Success
Sep 24 21:46:11 server1 postfix/smtpd[10442]: warning: problem talking to service rewrite: Connection reset by peer
Sep 24 21:46:12 server1 postfix/smtpd[10498]: fatal: /etc/postfix/mysql-virtual_email2email.cf: bad string length 0 < 1: table =
Sep 24 21:46:13 server1 postfix/master[10077]: warning: process /usr/lib/postfix/smtpd pid 10498 exit status 1
Sep 24 21:46:13 server1 postfix/master[10077]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
these files are exakt like he describes in the howto!
exept the passwoef!
Quote:
-rw-r----- 1 root postfix 134 2006-09-24 22:02 mysql-virtual_domains.cf
-rw-r----- 1 root postfix 127 2006-09-24 22:03 mysql-virtual_email2email.cf
-rw-r----- 1 root postfix 140 2006-09-24 22:03 mysql-virtual_forwardings.cf
-rw-r----- 1 root postfix 196 2006-09-24 22:03 mysql-virtual_mailboxes.cf
-rw-r----- 1 root postfix 127 2006-09-24 22:04 mysql-virtual_mailbox_limit_maps.cf
-rw-r----- 1 root postfix 136 2006-09-24 22:04 mysql-virtual_transports.cf
and my main.cf :
Quote:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

myhostname = Dad3L.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = Dad3L.org, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
someone who knows what the problem is?
sorry for my bad english!
Reply With Quote
Sponsored Links
  #2  
Old 25th September 2006, 10:24
k1piee k1piee is offline
Junior Member
 
Join Date: Sep 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i don't understand why I get this error:

Quote:
Sep 24 21:46:10 server1 postfix/proxymap[10120]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
Sep 24 21:46:10 server1 postfix/proxymap[10120]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
becuse i can connect to mysql whith phpmyadmin
and the password are right in the mysql-virtual_domains.cf and the other files,
someone please help me!! I need to get my mail-server up running as soon as possible!!!
Reply With Quote
  #3  
Old 25th September 2006, 13:30
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

What's the output of
Code:
netstat -tap
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 25th September 2006, 13:36
k1piee k1piee is offline
Junior Member
 
Join Date: Sep 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

here is my netstat -tap:
Quote:
Dad3L:~# netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:glftpd *:* LISTEN 5206/inetd
tcp 0 0 localhost.localdo:10024 *:* LISTEN 18214/amavisd (mast
tcp 0 0 localhost.localdo:10025 *:* LISTEN 19969/master
tcp 0 0 *:ftp *:* LISTEN 10245/proftpd: (acc
tcp 0 0 *:smtp *:* LISTEN 19969/master
tcp6 0 0 *:imaps *:* LISTEN 18094/couriertcpd
tcp6 0 0 *op3s *:* LISTEN 18010/couriertcpd
tcp6 0 0 *op3 *:* LISTEN 19796/couriertcpd
tcp6 0 0 *:imap2 *:* LISTEN 19811/couriertcpd
tcp6 0 0 *:www *:* LISTEN 7705/apache2
tcp6 0 0 *:ssh *:* LISTEN 1997/sshd
tcp6 0 0 *:smtp *:* LISTEN 19969/master
tcp6 0 0 *:https *:* LISTEN 7705/apache2
tcp6 0 0 ::ffff:192.168.0.4:ssh ::ffff:192.168.0.:39888 ESTABLISHED18339/sshd: k1piee
Dad3L:~#
I see that mysql isn't there!
but what should I do to get it working?
Reply With Quote
  #5  
Old 25th September 2006, 14:41
k1piee k1piee is offline
Junior Member
 
Join Date: Sep 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i've got mysql working proporly now, i think
but now i get this in tunderbird when i try to update my mail:

Sending of password did not succseed. Mail server Dad3L.org responded: Maildir: No such file or directory.

whats wrong now?
Reply With Quote
  #6  
Old 25th September 2006, 14:57
k1piee k1piee is offline
Junior Member
 
Join Date: Sep 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

haha, i can send mail without a problem, but when i recive i mail, its not in /home/vmail, its in /var/mail/k1piee.

this is my main.cf :

Quote:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

myhostname = Dad3L.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = Dad3L.org, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps =mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
transport_maps = mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
i tought that virtual_mailbox_base = /home/vmail put the mail in "/home/vmail" but apperently not!
any idea what i should do?
Reply With Quote
  #7  
Old 25th September 2006, 19:44
k1piee k1piee is offline
Junior Member
 
Join Date: Sep 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

isn't there anyone who can help me?
please, I need to get this working!
the only problem now is that the mails i receive is in /var/mail/<user>
and not in /home/vmail/<domain-name>/...and so on.
here is som files you can take o look at if you want, and maybe can find the problem!
main.cf
master.cf
mysql-virtual_domains.cf
mysql-virtual_email2email.cf
mysql-virtual_forwardings.cf
mysql-virtual_mailboxes.cf
mysql-virtual_mailbox_limit_maps.cf
mysql-virtual_transports.cf
authmysqlrc
Reply With Quote
  #8  
Old 25th September 2006, 23:22
k1piee k1piee is offline
Junior Member
 
Join Date: Sep 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

never mind! got the shit worikng now
apparently i couldn't have "mydestination" and "virtual_alias_domains" as the same value or something, so I change "mydestination" and now it works just fine
Reply With Quote
  #9  
Old 26th September 2006, 02:46
tommytomato tommytomato is offline
Senior Member
 
Join Date: Aug 2006
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by k1piee
never mind! got the shit worikng now
apparently i couldn't have "mydestination" and "virtual_alias_domains" as the same value or something, so I change "mydestination" and now it works just fine
thats what I get in my log as well "mydestination" and "virtual_alias_domains"

my log errors are like so, /var/log/mail.err

Code:
Sep 25 14:48:16 localhost courierpop3login: LOGIN FAILED, ip=[::ffff:192.168.1.7]
Sep 25 15:05:48 localhost dccproc[20028]: socket(UDP): Address family not supported by protocol
/var/log/mail.warn
Code:
Sep 26 00:40:29 localhost postfix/trivial-rewrite[20927]: warning: do not list domain rockinghamgateway.com in BOTH mydestination and virtual_mailbox_domains
/etc/postfix/mail.cf
Code:
recipient_delimiter = +
inet_interfaces = all
virtual_alias_domains = 
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
How do I correct the prolbem

TT
Reply With Quote
  #10  
Old 26th September 2006, 17:20
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
 
Default

Have a look here: http://www.howtoforge.com/forums/sho...7&postcount=12
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
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
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs ruskicar HOWTO-Related Questions 26 20th July 2007 16:28
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs hdtpsi HOWTO-Related Questions 10 24th September 2006 13:52
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs mholownych HOWTO-Related Questions 10 29th May 2006 03:39
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs ebbay Installation/Configuration 9 4th March 2006 11:47
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs Rocky Installation/Configuration 24 9th February 2006 11:08


All times are GMT +2. The time now is 14:04.


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