HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Virtual Users And Domains With Postfix, Courier And MySQL can't login (http://www.howtoforge.com/forums/showthread.php?t=13897)

wildgoosed 6th July 2007 23:19

Virtual Users And Domains With Postfix, Courier And MySQL can't login
 
Hey everyone,

I just finished following the Virtual Users And Domains With Postfix, Courier And MySQL guide which was very well done :D

I tried connecting with outlook express and squirremail but both clients cannot connect. I always get a invalid user name or password error :/

I have added the domain and user into my mysql database as instructed.

Can anyone help?

Thanks

falko 7th July 2007 17:20

Do you use the right username? It must be of the form user@domain.com.

MattijsR 8th July 2007 19:42

I have the same problem... Trying to connect with Eudora.

The settings in Eudora are this:
email address: user@xxxxx.nl
user name: user@xxxxx.nl
smtp server: smtp.xxxxx.nl
authentication allowed
incomming mail server: mail.xxxxx.nl
authentication style: passwords
secure sockets when receiving: never

maillog:
Jul 8 19:24:56 fedora pop3d: Connection, ip=[::ffff:192.168.0.1]
Jul 8 19:24:56 fedora pop3d: LOGIN FAILED, user=user@xxxxx.nl, ip=[::ffff:192.168.0.1]
Jul 8 19:24:56 fedora pop3d: authentication error: Input/output error

postconf -n:
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/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 = /usr/share/doc/postfix-2.4.3-documentation/html
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = mail.xxxxx.nl, localhost, localhost.localdomain
myhostname = mail.xxxxx.nl
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.4.3-documentation/readme
receive_override_options = no_address_mappings
sample_directory = /etc/postfix
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.crt
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

Any ideas where I went wrong?

Thanks,
Mitzi

MattijsR 8th July 2007 22:20

After searching some more I found a post from Falco that en email has to be send to the account before the Maildir is created.

But doing that got the following result in maillog:
Jul 8 22:17:47 fedora postfix/smtpd[11686]: fatal: open database /etc/postfix/aliases.db: No such file or directory
Jul 8 22:17:48 fedora postfix/master[11075]: warning: process /usr/libexec/postfix/smtpd pid 11686 exit status 1
Jul 8 22:17:48 fedora postfix/master[11075]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling

falko 9th July 2007 17:04

Quote:

Originally Posted by Mitzi
Jul 8 22:17:47 fedora postfix/smtpd[11686]: fatal: open database /etc/postfix/aliases.db: No such file or directory

What are the outputs of
Code:

ls -l /etc/aliases*
and
Code:

ls -l /etc/postfix/aliases*
?

wildgoosed 9th July 2007 18:34

These are my outputs...

root@test:~# ls -l /etc/aliases*
-rw-r--r-- 1 root root 68 2007-07-06 14:11 /etc/aliases
-rw-r--r-- 1 root root 12288 2007-07-06 14:11 /etc/aliases.db
root@test:~# ls -l /etc/postfix/aliases*
-rw-r--r-- 1 root root 68 2007-07-06 11:48 /etc/postfix/aliases
root@test:~#

What log files should I be checking ?

wildgoosed 9th July 2007 22:52

I did a tail -f on /var/log/syslog and this is how my attempted login went...

Jul 9 14:48:01 test imaplogin: Connection, ip=[::ffff:127.0.0.1]
Jul 9 14:48:01 test imaplogin: LOGIN: DEBUG: ip=[::ffff:127.0.0.1], command=LOGIN
Jul 9 14:48:01 test imaplogin: LOGIN: DEBUG: ip=[::ffff:127.0.0.1], username=david@test.iainc.local
Jul 9 14:48:01 test imaplogin: LOGIN: DEBUG: ip=[::ffff:127.0.0.1], password=fred
Jul 9 14:48:01 test imaplogin: authdaemon: starting client module
Jul 9 14:48:02 test imaplogin: authdaemon: REJECT
Jul 9 14:48:07 test imaplogin: LOGIN FAILED, ip=[::ffff:127.0.0.1]
Jul 9 14:48:07 test imaplogin: LOGIN: DEBUG: ip=[::ffff:127.0.0.1], command=LOGOUT
Jul 9 14:48:07 test imaplogin: LOGOUT, ip=[::ffff:127.0.0.1]


I figured perhaps its a problem with authmysql ? This is what my authmysqlrc file looks like under /etc/courier/authmysqlrc...

MYSQL_SERVER localhost

MYSQL_USERNAME mail_admin

MYSQL_PASSWORD test

MYSQL_PORT 0

MYSQL_DATABASE mail

MYSQL_USER_TABLE users

MYSQL_CRYPT_PWFIELD password

#MYSQL_CLEAR_PWFIELD password

MYSQL_UID_FIELD 5000

MYSQL_GID_FIELD 5000

MYSQL_LOGIN_FIELD email

MYSQL_HOME_FIELD "/home/vmail"

MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')

#MYSQL_NAME_FIELD

MYSQL_QUOTA_FIELD quota

wildgoosed 9th July 2007 22:55

Also, here is my postconf -n output...

root@test:/var/log# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = amavis:[127.0.0.1]:10024
delay_warning_time = 4h
disable_vrfy_command = yes
inet_interfaces = all
local_recipient_maps =
mailbox_size_limit = 0
maximal_backoff_time = 8000s
maximal_queue_lifetime = 7d
minimal_backoff_time = 1000s
mydestination = test.iainc.local, localhost, localhost.localdomain
myhostname = test.iainc.local
mynetworks = 127.0.0.0/8
mynetworks_style = host
myorigin = /etc/mailname
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
receive_override_options = no_address_mappings
recipient_delimiter = +
relayhost =
smtp_helo_timeout = 60s
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org, reject_rbl_client relays.ordb.org, reject_rbl_client blackholes.e asynet.nl, reject_rbl_client dnsbl.njabl.org
smtpd_hard_error_limit = 12
smtpd_recipient_limit = 16
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth _pipelining, permit
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_use_tls = yes
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
unknown_local_recipient_reject_code = 450
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_uid_maps = static:5000

wildgoosed 9th July 2007 23:05

Can someone post the correct commands to use telnet with smtp-auth to send an email? I wanna test that things are actually working :/

MattijsR 10th July 2007 07:34

Quote:

Originally Posted by falko
What are the outputs of
Code:

ls -l /etc/aliases*
and
Code:

ls -l /etc/postfix/aliases*
?


[root@fedora ~]# ll /etc/aliases*
-rw-r--r-- 1 root root 1512 2005-04-25 18:48 /etc/aliases
-rw-r----- 1 root smmsp 12288 2007-07-07 05:51 /etc/aliases.db
[root@fedora ~]# ll /etc/postfix/aliases*
ls: cannot access /etc/postfix/aliases*: No such file or directory
[root@fedora ~]#

Seeing my problem... Thanks

Other problem is that telnet localhost 25 hangs after Escape character is '^]'.
And other things got messed up also.
I'll do a clean install.


All times are GMT +2. The time now is 20:57.

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