Trying to get authentication on my mail server (ubuntu 10.04) running but am having trouble. I have a server with postfix for smtp setup, imap server with courier setup. My postfix authentication is using cyrus (I haven't tried dovecot really) saslauth. The user name and password is stored in a MySql database. Logging in with imap-ssl works on a remote client (thunderbird), and I can read my mail. I can't get the SMTP side working, and have focused the issue down to saslauth.
testsaslauthd -u 'username' -p 'passowrd' -s smtp
connect() : Permission denied
the password in the database is encrypted and I guess this testsaslauthd will take a plain text password and encrypt it.
Looking for someone to walk me through getting this working. Im new to the mail server, and have never got one fully working. Thanks. Ask me which log files I should look at/post, which tests to run, permissions to check.
Edit: (3/26/2012) for more information I can't get any mail client to work, they give errors like
The message could not be sent because connecting to SMTP server <mydomain.com> failed. The server may be unavailable or is refusing SMTP connections
I have respective ports open on iptables, but i am guessing that it is an internal problem because of the test I ran above. I have also run
mail.mydomain.com 25 and run
ehlo localhost and get this in return
250-mail.domain.com 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN
EDIT: (3/28/2012 2:45pm)
~$ 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 inet_interfaces = all inet_protocols = all mailbox_size_limit = 0 mime_header_checks = regexp:/etc/postfix/mime_header_checks mydestination = mail.mydomain.co, localhost, localhost.localdomain myhostname = mail.mydomain.co mynetworks = 127.0.0.0/8 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 readme_directory = no recipient_delimiter = + relayhost = smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_authenticated_header = yes smtpd_tls_cert_file = /etc/ssl/certs/mailcert.pem smtpd_tls_key_file = $smtpd_tls_cert_file smtpd_tls_session_cache_timeout = 3600s smtpd_use_tls = yes virtual_alias_domains = virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-forwards.cf, mysql:/etc/postfix/mysql-email.cf virtual_gid_maps = static:5000 virtual_mailbox_base = /home/vmail virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-domains.cf virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-mailboxes.cf virtual_uid_maps = static:5000
EDIT: Solved (3/29/2012) Thanks to both @AveryPane and @malloc4k for pointing me in the right direction. A few things I had to do, make sure that my MX records were in proper order. I used the tool intodns.com and also http://www.mxtoolbox.com for checking whether my server was accepting connections. Then using tail -f I watched my logs for any errors, was excited to see that there was actually something being logged once I got my DNS records straightened out, and tweaked some config files.
Two things that I didn't know about one of which was some ISPs block port 25, which might have been in my case why thunderbird wasn't seeing my server on port 25. Second in the file
/etc/postfix/master.cf there are settings about which ports to allow postfix to listen on. The default port 25 is there the line
smtp inet n - - - - smtpd
which basically says hi im postfix, I run on port 25. If you want to run postfix on another port, 587 which is popular for mail servers, add this line near there in master.cf
587 inet n - - - - smtpd
run a restart
/etc/init.d/postfix restart and you should be set. That was the solution for me.