LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 06-30-2008, 09:08 AM   #1
bambeklis
Member
 
Registered: Aug 2005
Posts: 58

Rep: Reputation: 15
FreeBSD 7.0 + postfix + mysql


Hi,

Jun 30 12:44:36 ist imapd: LOGIN, user=admin@xx.xx.lt, ip=[xx.xx.xx.xx], port=[61077], protocol=IMAP
Jun 30 15:44:45 ist postfix/smtpd[1626]: connect from unknown[xx.xx.xx.xx]
Jun 30 15:44:47 ist postfix/smtpd[1626]: warning: SASL authentication failure: Password verification failed
Jun 30 15:44:47 ist postfix/smtpd[1626]: warning: unknown[xx.xx.xx.xx]: SASL PLAIN authentication failed: authentication failure
Jun 30 15:44:47 ist postfix/smtpd[1626]: warning: unknown[xx.xx.xx.xx]: SASL LOGIN authentication failed: authentication failure
Jun 30 15:44:49 ist postfix/smtpd[1626]: disconnect from unknown[xx.xx.xx.xx]
Jun 30 12:44:53 ist imapd: LOGOUT, user=admin@xx.xx.lt, ip=[xx.xx.xx.xx], headers=0, body=0, rcvd=216, sent=876, time=17

What's wrong? Here's main.cf:

alias_database = hash:/usr/local/etc/postfix/aliases
alias_maps = hash:/usr/local/etc/postfix/aliases
command_directory = /usr/local/sbin
config_directory = /usr/local/etc/postfix
daemon_directory = /usr/local/libexec/postfix
debug_peer_level = 2
default_destination_concurrency_limit = 10
disable_vrfy_command = yes
home_mailbox = Maildir/
inet_interfaces = all
local_destination_concurrency_limit = 2
mail_name = Postfix
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_size_limit = 10000000
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
maximal_queue_lifetime = 3d
message_size_limit = 5000000
mydestination = localhost.$mydomain
mydomain = namai
myhostname = xx.xx.lt
mynetworks = 10.0.1.0/24, 127.0.0.0/8
myorigin = xx.xx.lt
newaliases_path = /usr/local/bin/newaliases
queue_directory = /var/spool/postfix
queue_run_delay = 30m
readme_directory = no
relay_domains = 127.0.0.0/8
relayhost = mail.isp.lt
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_error_sleep_time = 3
smtpd_hard_error_limit = 5
smtpd_recipient_limit = 10
smtpd_soft_error_limit = 3
unknown_local_recipient_reject_code = 550

virtual_mailbox_base = /usr/local/virtual
virtual_alias_maps = mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_limit = 51200000
virtual_gid_maps = static:125
virtual_minimum_uid = 125
virtual_uid_maps = static:125
virtual_transport = virtual

smtpd_sender_restrictions = reject_unknown_sender_domain
smtpd_client_restrictions = reject_unknown_sender_domain
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain = smtpd_sasl_security_options = noanonymous

Thanks
 
Old 06-30-2008, 03:14 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Well how do you have SASL configured? It's a separate authentication daemon, you didn't post that configuration.
 
Old 06-30-2008, 04:19 PM   #3
bambeklis
Member
 
Registered: Aug 2005
Posts: 58

Original Poster
Rep: Reputation: 15
I'm tired of searching helpful information, i've red all mailing lists but it still not working. Now im running it in non chroot environment. Im thinking what i need to change in my configuration files to get it working. Im running freebsd 7.0 and postfix + sasl2 + mysql + postfixadmin. I can't login with my email client (thunderbird). The log file says:

Jul 10 19:34:31 ist imapd: LOGIN FAILED, user=admin, ip=[MYIPADDRESS]

But when i use for the username "admin@sub.domain.com" (not only "admin") then i can login successfully.

There are my configuration files:
main.cf:

alias_database = hash:/usr/local/etc/postfix/aliases
alias_maps = hash:/usr/local/etc/postfix/aliases
command_directory = /usr/local/sbin
config_directory = /usr/local/etc/postfix
daemon_directory = /usr/local/libexec/postfix
debug_peer_level = 2
default_destination_concurrency_limit = 10
disable_vrfy_command = yes
home_mailbox = Maildir/
inet_interfaces = all
local_destination_concurrency_limit = 2
mail_name = Postfix
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_size_limit = 10000000
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
#maximal_queue_lifetime = 3d
message_size_limit = 5000000
mydestination = 127.0.0.1
myhostname = sub.domain.com
mynetworks = 10.0.1.0/24, 127.0.0.0/8
myorigin = $myhostname
newaliases_path = /usr/local/bin/newaliases
queue_directory = /var/spool/postfix
queue_run_delay = 30m
readme_directory = no
relay_domains = 127.0.0.0/8
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_error_sleep_time = 3
smtpd_hard_error_limit = 5
smtpd_recipient_limit = 10
smtpd_soft_error_limit = 3
unknown_local_recipient_reject_code = 550

virtual_mailbox_base = /usr/local/virtual
virtual_alias_maps = mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_limit = 51200000
virtual_gid_maps = static:125
virtual_minimum_uid = 125
virtual_uid_maps = static:125
virtual_transport = virtual

smtpd_sender_restrictions = reject_unknown_sender_domain
smtpd_client_restrictions = reject_unknown_sender_domain
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain = smtpd_sasl_security_options = noanonymous

mysql_virtual_alias_maps.cf:

user = postfix
password = postfix
hosts = 127.0.0.1
dbname = postfix
table = alias
select_field = goto
where_field = address

mysql_virtual_domains_maps.cf:

user = postfix
password = postfix
hosts = 127.0.0.1
dbname = postfix
table = domain
select_field = description
where_field = domain

mysql_virtual_mailbox_maps.cf

user = postfix
password = postfix
hosts = 127.0.0.1
dbname = postfix
table = mailbox
select_field = maildir
where_field = username


smtpd.conf:

pwcheck_method: auxprop
auxprop_plugin: sql
sql_engine: mysql
mech_list: login plain
sql_user: postfix
sql_passwd: postfix
sql_database: postfix
sql_select: select password from mailbox where username = '%u@%r'
sql_verbose: yes


ls -la /usr/local/virtual:

/usr/local/virtual:
total 6
drwxr-x--x 3 postfix postfix 512 Jul 10 18:53 .
drwxr-xr-x 17 root wheel 512 Jul 8 15:44 ..
drwx------ 5 postfix postfix 512 Jul 10 18:53 admin@sub.domain.com

Thank you for your patience.

Last edited by bambeklis; 07-10-2008 at 12:00 PM.
 
Old 07-10-2008, 12:35 PM   #4
bambeklis
Member
 
Registered: Aug 2005
Posts: 58

Original Poster
Rep: Reputation: 15
Now i can login on my imap server, but i can't send emails, the log file says:

Jul 10 20:34:31 ist imapd: LOGIN, user=admin@sub.domain.com, ip=[MYIPADDRESS], port=[60955], protocol=IMAP
Jul 10 20:34:39 ist postfix/smtpd[1245]: connect from unknown[MYIPADDRESS]
Jul 10 20:34:41 ist postfix/smtpd[1245]: warning: SASL authentication failure: Password verification failed
Jul 10 20:34:41 ist postfix/smtpd[1245]: warning: unknown[MYIPADDRESS]: SASL PLAIN authentication failed: authentication failure
Jul 10 20:34:41 ist postfix/smtpd[1245]: warning: unknown[MYIPADDRESS]: SASL LOGIN authentication failed: authentication failure
Jul 10 20:34:42 ist postfix/smtpd[1245]: disconnect from unknown[MYIPADDRESS]
Jul 10 20:34:45 ist imapd: LOGOUT, user=admin@sub.domain.com, ip=[MYIPADDRESS], headers=0, body=0, rcvd=216, sent=876, time=14
 
  


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
FreeBSD-MySQL Cluster - Your Opinions? zivota *BSD 0 01-19-2006 12:47 AM
FreeBSD with MySQL/Apache Temujin_12 *BSD 2 11-15-2005 04:43 AM
Apache, MySQL and PHP with FreeBSD? Mega Man X *BSD 9 01-24-2005 05:08 PM
Freebsd + Mysql ??? Atrocity *BSD 4 06-15-2004 01:28 PM
freebsd and mysql error Zac2003 Linux - Software 1 05-16-2003 08:25 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 01:51 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