Thread, trying to get postfix working with mysql + courier on Mandrake 10.1 and having issues.
THE PROBLEM
I can send email from the local machine or from another machine, so accepting mail by SMTP is fine, it's the fetching that's a problem.
The logs show
Code:
authdaemond.mysql: failed to connect to mysql server (server=localhost, userid=<removed>)
pop3d: LOGIN FAILED, ip=[::ffff:192.168.1.50]
over and over again.
I get this error message even if I am telnetting to localhost 110. I've included all relevant info if some one is up to the challenge of figuring this out. It's got me stumped. Help is hugely appreciated.
cheers,
-S
@@@INSTALLED RPMs@@@
Code:
libpostfix1-2.1.4-2mdk
postfix-mysql-2.1.4-2mdk
libmysql12-4.0.20-3.4.101mdk
postfix-2.1.4-2mdk
courier-imap-mysql-3.0.8-1mdk
courier-imap-pop-3.0.8-1mdk
courier-imap-3.0.8-1mdk
mysql-4.0.24 - via compiled source not RPM
@@@ postfix main.cf @@@
Code:
readme_directory = /usr/share/doc/postfix-2.1.4/README_FILES
sample_directory = /usr/share/doc/postfix-2.1.4/samples
mhtml_directory = /usr/share/doc/postfix-2.1.4/html
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/share/man
daemon_directory = /usr/lib/postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
queue_directory = /var/spool/postfix
mail_owner = postfix
debug_peer_level=7
# Rewrite parameters #
append_dot_mydomain = yes
append_at_myorigin = yes
masquerade_domains = $mydomain
# System settings
mydestination = localhost
myhostname = mail.exampledomain.net
myorigin = $mydomain
mynetworks = 192.168.1.0/24
# Tell Postfix where to find the virtual tables
virtual_alias_domains = #intentionally blank
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_forwardings.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
# Methods Postfix uses to deliver to local recipients
local_recipient_maps = $alias_maps $virtual_mailbox_maps unix: passwd.byname
#SASL activation
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
broken_sasl_auth_clients = yes
#smtpd_sasl_auth_enable = yes
#smtpd_sasl_security_options = noanonymous
#smtpd_sasl_path = /etc/postfix/
#smtpd_sasl_local_domain =
inet_interfaces = localhost
delay_warning_time = 4h
smtpd_banner = $myhostname ESMTP $mail_name
unknown_local_recipient_reject_code = 550
smtp-filter_destination_concurrency_limit = 2
lmtp-filter_destination_concurrency_limit = 2
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
@@@ master.cf @@@
Code:
smtp inet n - y - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
smtps inet n - y - - smtpd
-o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
submission inet n - y - - smtpd
-o smtpd_etrn_restrictions=reject
-o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - y 60 1 pickup
-o content_filter=
-o receive_override_options=
cleanup unix n - y - 0 cleanup
qmgr fifo n - y 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr fifo - - y 300 1 tlsmgr
rewrite unix - - y - - trivial-rewrite
bounce unix - - y - 0 bounce
defer unix - - y - 0 bounce
trace unix - - y - 0 bounce
verify unix - - y - 1 verify
flush unix n - y 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - y - - smtp
relay unix - - y - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - y - - showq
error unix - - y - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - y - - lmtp
anvil unix - - y - 1 anvil
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop unix - n n - - pipe
flags=DRhu user=nobody argv=/usr/bin/maildrop -d ${recipient}
cyrus-deliver unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# for default cyrus socket placement
cyrus unix - n n - - lmtp
-o lmtp_cache_connection=yes
#
# if you configure cyrus socket in the chroot jail
cyrus-chroot unix - - y - - lmtp
-o lmtp_cache_connection=yes
#
# for lmtp to cyrus via tcp
cyrus-inet unix - - y - - lmtp
-o lmtp_cache_connection=yes
-o lmtp_sasl_auth_enable=yes
-o lmtp_sasl_password_maps=hash:/etc/postfix/cyrus_lmtp_sasl_pass
-o lmtp_sasl_security_options=noanonymous
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=/usr/bin/uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
127.0.0.1:10026 inet n - y - - smtpd
-o content_filter=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o mynetworks_style=host
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_client_connection_limit_exceptions=127.0.0.0/8
lmtp-filter unix - - y - - lmtp
-o lmtp_data_done_timeout=1200
-o disable_dns_lookups=yes
smtp-filter unix - - y - - smtp
-o smtp_data_done_timeout=1200
-o disable_dns_lookups=yes
@@@ SASL SMPT.CONF @@@
Code:
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: <removed>
sql_passwd: <removed>
sql_database: provider
sql_statement: SELECT password FROM users WHERE email ='%u@%r'
log_level: 10
@@@ authmysqlrc @@@
Code:
# authmysqlrc
MYSQL_SERVER localhost
MYSQL_USERNAME <removed>
MYSQL_PASSWORD <removed>
MYSQL_PORT 0
MYSQL_DATABASE provider
MYSQL_USER_TABLE users
MYSQL_LOGIN_FIELD email
#MYSQL_CRYPT_PWFIELD crypt
MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_HOME_FIELD "/home/vmail"
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
#MYSQL_NAME_FIELD
@@@ Additional INFO@@@
Code:
[root@mail postfix]# netstat -ap | grep pop
tcp 0 0 *: pop3s *:* LISTEN 5203/couriertcpd
tcp 0 0 *: pop3 *:* LISTEN 5190/couriertcpd
[root@mail courier]# netstat -nap | grep 110
tcp 0 0 :::110 :::* LISTEN 5190/couriertcpd
The if I uncomment out the information in
ITALICS above, I can't even connect.
thanks again