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 18th September 2006, 19:56
wmrwl wmrwl is offline
Member
 
Join Date: Sep 2006
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default Virtual Users And Domains With Postfix, Courier And MySQL

Hi, I am using the Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV) and am having some trouble. I can't get my MS Outlook to communicate with the mail server. I have the "my server requires authentication" checked off.

The install is on debian sarge 3.1.

#The output of telnet localhost 25 is:
telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.domain.com ESMTP Postfix (Debian/GNU)
ehlo localhost
250-mail.domain.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250 8BITMIME


#The output of /var/log/mail.err is:

Sep 18 04:30:18 back1 postfix/trivial-rewrite[6269]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
Sep 18 04:30:20 back1 postfix/trivial-rewrite[6272]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
Sep 18 04:31:21 back1 postfix/trivial-rewrite[6274]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
Sep 18 04:32:22 back1 postfix/trivial-rewrite[6277]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
Sep 18 04:33:23 back1 postfix/trivial-rewrite[6280]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
Sep 18 04:34:24 back1 postfix/trivial-rewrite[6283]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
Sep 18 04:35:25 back1 postfix/trivial-rewrite[6286]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
Sep 18 04:36:26 back1 postfix/trivial-rewrite[6289]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
Sep 18 04:37:27 back1 postfix/trivial-rewrite[6292]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
Sep 18 04:38:28 back1 postfix/trivial-rewrite[6295]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem
Sep 18 04:39:29 back1 postfix/trivial-rewrite[6306]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf(0,100): table lookup problem

# The /etc/postfix/mysql-virtual_mailboxes.cf reads as follows:
user = mail_admin
password = mypassword
dbname = mail
table = users
select_field = CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
where_field = email
hosts = 10.0.0.3

What exactly is wrong here?

Thanks,

Rob

Last edited by wmrwl; 18th September 2006 at 22:50.
Reply With Quote
Sponsored Links
  #2  
Old 19th September 2006, 15:17
grasomega grasomega is offline
Member
 
Join Date: Sep 2006
Posts: 43
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Hi, there!

Make the following line look like this in main.cf:

virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf

Delete the 'proxy' in front of the 'mysql:/etc/postfix/mysql-virtual_mailboxes.cf'.
If still nothing, try to remove all the 'proxy' specifications in main.cf.

grasomega
Reply With Quote
  #3  
Old 19th September 2006, 15:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,702 Times in 2,545 Posts
Default

Also compare your configuration files with those from the tutorial. Also check their formatting as it matters.
__________________
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 20th September 2006, 07:38
wmrwl wmrwl is offline
Member
 
Join Date: Sep 2006
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by grasomega
Hi, there!

Make the following line look like this in main.cf:

virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf

Delete the 'proxy' in front of the 'mysql:/etc/postfix/mysql-virtual_mailboxes.cf'.
If still nothing, try to remove all the 'proxy' specifications in main.cf.

grasomega
I did this.

Quote:
Originally Posted by falko
Also compare your configuration files with those from the tutorial. Also check their formatting as it matters.
I did this too. I did notice that /var/log/mail.log contained some errors about my host not being able to connect to mysql, so I fixed that up and it helped the mailbox to pass this diagnostic test (it was previously timing out): http://www.mxtoolbox.com/diagnostic.aspx, but i still cant get MS Outlook to work properly with the mail server.

I chose "this server requires authentication" and I chose the radio box that says "use the same settings as my incoming mail server".

I also checked off boxes that said "this server requires an encrypted connection (SSL)" for both the incoming imap (port 993) and outgoing mail smtp (port 25).

Is there anything else I could be doing wrong.
Reply With Quote
  #5  
Old 20th September 2006, 12:01
grasomega grasomega is offline
Member
 
Join Date: Sep 2006
Posts: 43
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Now I saw this:

Quote:

# The /etc/postfix/mysql-virtual_mailboxes.cf reads as follows:
user = mail_admin
password = mypassword
dbname = mail
table = users
select_field = CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
where_field = email
hosts = 10.0.0.3
If the MySql server is on the same machine, your 'hosts' statement should look like this:

hosts = 127.0.0.1

Otherwise, the "My server requires authentication" box must be checked, no SSL, no Secure Password Authentication (SPA).
The logon name is the e-mail address, not the name.
It should be working, if anything else is in the right place.

grasomega
Reply With Quote
  #6  
Old 20th September 2006, 23:45
wmrwl wmrwl is offline
Member
 
Join Date: Sep 2006
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by grasomega
Now I saw this:



If the MySql server is on the same machine, your 'hosts' statement should look like this:

hosts = 127.0.0.1

Otherwise, the "My server requires authentication" box must be checked, no SSL, no Secure Password Authentication (SPA).
The logon name is the e-mail address, not the name.
It should be working, if anything else is in the right place.

grasomega
I tried Outlook with all of those options and it still cant connect to the server.
________
BDSM FETISH

Last edited by wmrwl; 30th March 2011 at 08:19.
Reply With Quote
  #7  
Old 21st September 2006, 00:13
grasomega grasomega is offline
Member
 
Join Date: Sep 2006
Posts: 43
Thanks: 5
Thanked 0 Times in 0 Posts
Default

So, your log is still filled with the info you posted in your first post, right?
I don't really know what can be wrong, but please check again that the right password is specified in _every_ file .cf, also in /etc/amavis/amavisd.conf, /etc/postfix/sasl/smtpd.conf, /etc/pam.d/smtp, /etc/courier/authmysqlrc. I'm not sure if there are other files with the database password...

One other thing I would do: drop the database and create it again and make sure that the mail_admin user has the correct permissions on the database.

If there are other related errors on your log, please post them.

grasomega

edit:

And, by the way, have you tried any other e-mail client? Is squirrelmail working?

Last edited by grasomega; 21st September 2006 at 00:15.
Reply With Quote
  #8  
Old 21st September 2006, 01:20
wmrwl wmrwl is offline
Member
 
Join Date: Sep 2006
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default I am getting some new and different errors in mail.log

Here are the new and different errors in mail.log:

Sep 20 06:49:19 myboxname postfix/qmgr[2194]: 1D612234287: from=<myotheremail@ddress.com>, size=1248, nrcpt=1 (queue active)
Sep 20 06:49:19 myboxname postfix/qmgr[2194]: 9173F234285: from=<myotheremail@ddress.com>, size=2414, nrcpt=1 (queue active)
Sep 20 06:49:19 myboxname postfix/qmgr[2194]: 943F8234286: from=<myotheremail@ddress.com>, size=2394, nrcpt=1 (queue active)
Sep 20 06:49:19 myboxname postfix/smtp[2731]: connect to 10.0.0.3[10.0.0.3]: Connection refused (port 10024)
Sep 20 06:49:19 myboxname postfix/smtp[2732]: connect to 10.0.0.3[10.0.0.3]: Connection refused (port 10024)
Sep 20 06:49:20 myboxname postfix/smtp[2731]: 1D612234287: to=<admin@domain.com>, relay=none, delay=15123, status=deferred (connect to 10.0.0.3[10.0.0.3]: Connection refused)
Sep 20 06:49:20 myboxname postfix/smtp[2732]: 9173F234285: to=<admin@domain.com>, relay=none, delay=15855, status=deferred (connect to 10.0.0.3[10.0.0.3]: Connection refused)
Sep 20 06:49:20 myboxname postfix/smtp[2731]: connect to 10.0.0.3[10.0.0.3]: Connection refused (port 10024)
Sep 20 06:49:20 myboxname postfix/smtp[2731]: 943F8234286: to=<admin@domain.com>, relay=none, delay=15855, status=deferred (connect to 10.0.0.3[10.0.0.3]: Connection refused)
Sep 20 07:05:59 myboxname postfix/qmgr[2194]: 390EB23427E: from=<myotheremail@ddress.com>, size=2411, nrcpt=1 (queue active)

########
mail.err is now empty

Last edited by wmrwl; 21st September 2006 at 01:42.
Reply With Quote
  #9  
Old 21st September 2006, 09:31
grasomega grasomega is offline
Member
 
Join Date: Sep 2006
Posts: 43
Thanks: 5
Thanked 0 Times in 0 Posts
Default

It looks like you have a problem related to amavis.
Try to put back 127.0.0.1 in your config files, as per the how-to.

Can you please post all your config( the .cf files, main.cf, master.cf, /etc/postfix/sasl/smtpd.conf, /etc/amavis.amavisd.conf, /etc/courier/authmysqlrc, /etc/pam.d/smtp) files? Feel free to replace your real domain with anything, just be consistent about changes.

I can compare them with mine, and mine work

grasomega
Reply With Quote
  #10  
Old 22nd September 2006, 09:31
wmrwl wmrwl is offline
Member
 
Join Date: Sep 2006
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by grasomega
It looks like you have a problem related to amavis.
Try to put back 127.0.0.1 in your config files, as per the how-to.

Can you please post all your config( the .cf files, main.cf, master.cf, /etc/postfix/sasl/smtpd.conf, /etc/amavis.amavisd.conf, /etc/courier/authmysqlrc, /etc/pam.d/smtp) files? Feel free to replace your real domain with anything, just be consistent about changes.

I can compare them with mine, and mine work

grasomega
/etc/mysql/my.cnf reads as
Code:
bind-address            = 10.0.0.3
because I use this machine as a mysql server and other machines on the network need to connect to this machine. If this file had 127.0.0.1 instead, then the other machines cannot connect to it (I've tried to change it as you suggested, but the other machines on the network failed to connect to it.)

The replacements I made for the domain name and the mysql password are in italics. Thanks!

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

smtpd_banner = $myhostname ESMTP $mail_name (mail)
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 = mail.domain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.domain.com, localhost, localhost.localdomain
relayhost =
mynetworks = 10.0.0.0/24
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_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.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
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
content_filter = amavis:[10.0.0.3]:10024
#receive_override_options = no_address_mappings

Last edited by wmrwl; 22nd September 2006 at 09:37.
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... killfrog HOWTO-Related Questions 3 25th September 2009 21:45
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 - "apt-get" and Courier burritonator HOWTO-Related Questions 3 15th March 2006 20:11
Problem with Virtual Users And Domains With Postfix, Courier And MySQL Howto fenix Server Operation 4 11th March 2006 02:53
Another Problem: Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP bluegrass Installation/Configuration 24 8th March 2006 01:41


All times are GMT +2. The time now is 21:35.


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