LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-18-2008, 01:10 PM   #1
tmaleshafske
LQ Newbie
 
Registered: Jan 2008
Posts: 13

Rep: Reputation: 0
mail server issues


Hello everyone.. I just got done following Virtual Users And Domains With Postfix, Courier And MySQL (CentOS 5.1)

everything seems to be working but i can't login to download emails with Thunderbird.

when I look in the log files i get the following error message:
Feb 18 12:05:15 maleshafske pop3d: LOGIN FAILED, user=test@maleshafske.com, ip=[::ffff:192.168.1.22]

I also notice a chain of more error messages related to amavis:
Feb 18 12:21:46 maleshafske amavis[4654]: (04654-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=mail;host=127.0.0.1;port=3306' : Access denied for user 'mail_admin'@'localhost' (using password: YES)
Feb 18 12:21:46 maleshafske amavis[4654]: (04654-01) (!!)TROUBLE in process_request: connect_to_sql: unable to connect to any dataset at (eval 76) line 244, <GEN9> line 5.
Feb 18 12:21:46 maleshafske amavis[4654]: (04654-01) (!)Requesting process rundown after fatal error
Feb 18 12:21:46 maleshafske amavis[4762]: (04762-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=mail;host=127.0.0.1;port=3306' : Access denied for user 'mail_admin'@'localhost' (using password: YES)
Feb 18 12:21:46 maleshafske amavis[4762]: (04762-01) (!!)TROUBLE in process_request: connect_to_sql: unable to connect to any dataset at (eval 76) line 244, <GEN9> line 5.
Feb 18 12:21:46 maleshafske amavis[4762]: (04762-01) (!)Requesting process rundown after fatal error


here is my output from postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = males001.maleshafske.com, localhost, localhost.localdomain
myhostname = males001.maleshafske.com
mynetworks = 127.0.0.0/8
newaliases_path = /usr/bin/newaliases.postfix
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
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
receive_override_options = no_address_mappings
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_create_maildirsize = yes
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
virtual_uid_maps = static:5000



Anyone have any ideas?
 
Old 02-18-2008, 02:46 PM   #2
guglielmo
LQ Newbie
 
Registered: Feb 2008
Location: milano,italia
Distribution: server::debian desktop::ubuntu
Posts: 5

Rep: Reputation: 0
it seems to be a problem with mysql user

you should have defined a user to access your mail db

first check if the user have access to the db

sif your db user is for example mail-admin
from the server where postfix is installed run these commands

mysql - p -u mail_admin
at the prompt type the mail_admin password

you should have a db named mail or qhatever you choose during setup
with the following tables

+----------------+
| Tables_in_mail |
+----------------+
| domains |
| forwardings |
| transport |
| users |
+----------------+

otherwise check the following files you should have settings like that at bottom

-rw-r----- 1 root postfix 130 2008-02-18 00:25 mysql-virtual_domains.cf
-rw-r----- 1 root postfix 124 2008-02-18 00:31 mysql-virtual_email2email.cf
-rw-r----- 1 root postfix 135 2008-02-18 00:27 mysql-virtual_forwardings.cf
-rw-r----- 1 root postfix 192 2008-02-18 00:28 mysql-virtual_mailboxes.cf
-rw-r----- 1 root postfix 123 2008-02-18 00:33 mysql-virtual_mailbox_limit_maps.cf
-rw-r----- 1 root postfix 133 2008-02-18 00:32 mysql-virtual_transports.cf

user = mail_admin
password =xxxx
dbname = mail
table = domains
select_field = 'virtual'
where_field = domain
hosts = 127.0.0.1
 
Old 02-18-2008, 02:53 PM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Are you sure you have mysql support compiled in? if you are using a packaged version of postfix, this may not be the case. RedHat rpms for example don't have support built in.
 
Old 02-18-2008, 03:09 PM   #4
tmaleshafske
LQ Newbie
 
Registered: Jan 2008
Posts: 13

Original Poster
Rep: Reputation: 0
I have no issues logging into sql with the mail_admin profile. As far as I know I compiled postfix with sql support....How do I check that?
 
Old 02-18-2008, 03:18 PM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Try postconf -m
 
Old 02-18-2008, 05:04 PM   #6
tmaleshafske
LQ Newbie
 
Registered: Jan 2008
Posts: 13

Original Poster
Rep: Reputation: 0
I am working on a reload from scratch here is the output of postconf -m

[root@adsl-75-18-14-103 ~]# postconf -m
btree
cidr
environ
hash
ldap
mysql
nis
pcre
proxy
regexp
static
unix


which includes mysql
 
Old 02-19-2008, 09:03 AM   #7
tmaleshafske
LQ Newbie
 
Registered: Jan 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Resolved

Hey everyone I have this issue resolved, it was a combination of rights and config files. Once I finished up the reloading of the server and got everything straight it works great. Now on to the next project.
 
Old 03-22-2008, 01:25 AM   #8
nglbrkr
Member
 
Registered: May 2005
Location: hiroshima
Distribution: debian
Posts: 75
Blog Entries: 9

Rep: Reputation: 17
please specify

Quote:
Originally Posted by tmaleshafske View Post
Hey everyone I have this issue resolved, it was a combination of rights and config files. Once I finished up the reloading of the server and got everything straight it works great. Now on to the next project.
I'm glad you solved it. Could you please tell me how, so that I can also get it working?
Thanks!

nigel

Never Mind - got it. What I did was used wget to retrieve a file and put it in /etc/amavis/conf.d

I then cat-ted the file into 50-user, but didn't delete it. It contained a dummy password for the database. So since it was unnumbered, it must have been read after 50-user. I for some reason assumed it would be ignored.

Last edited by nglbrkr; 03-22-2008 at 02:35 AM. Reason: solved!
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Server Issues; Can't Send E-mail (using sendmail) Vegetarian Smoker Linux - Software 1 06-18-2006 02:16 PM
custom mail server issues htm Linux - Software 15 03-18-2004 10:21 AM
mail server and mail client setup issues htm Linux - General 1 03-16-2004 09:32 AM
mail server issues - POSTFIX macdafoe Linux - Newbie 2 09-14-2003 09:09 PM
<confused> mail server issues... busbyjon Linux - Networking 1 07-08-2003 07:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration