Hi there i'm having problems with my postfix installation. I used the following guide: Postfix Courier MySQL Guide Now i can connect to everything. But if i send mail i get: relay rejected. I've added my subnet to the subnet list but still i get rejected. Then i added 10.10.10.10 since my PC is apperently identified by that according to the logs, and it accepts the mail. But nothing happens with it. Plus i don't want 10.10.10.10 in that list! Sending to a non-existing e-mail adres however DOES bounce te message. alteast withing my domain. If i send a mail to myself (from info to info) it sends it away, but i don't get it in my inbox. So i'm kinda confused. My logs give the following messages: Mail.err Code: Apr 11 21:34:06 server postfix/smtpd[30970]: connect from unknown[10.10.10.10] Apr 11 21:34:06 server postfix/smtp[30975]: warning: host mail.a3-solutions.eu[62.163.185.59]:25 greeted me with my own hostname server.a3-solutions.eu Apr 11 21:34:06 server postfix/smtp[30975]: warning: host mail.a3-solutions.eu[62.163.185.59]:25 replied to HELO/EHLO with my own hostname server.a3-solutions.eu Apr 11 21:34:06 server postfix/smtp[30975]: 59D674C055: to=<*****@a3-solutions.eu>, orig_to=<*****@biljartsuite.com>, relay=mail.a3-solutions.eu[62.163.185.59]:25, delay=0.25, delays=0.22/0/0.03/0, dsn=5.4.6, status=bounced (mail for mail.a3-solutions.eu loops back to myself) Apr 11 21:34:06 server postfix/smtp[30975]: 59D674C055: to=<*****@a3-solutions.eu>, orig_to=<*****@biljartsuite.com>, relay=mail.a3-solutions.eu[62.163.185.59]:25, delay=0.25, delays=0.22/0/0.03/0, dsn=5.4.6, status=bounced (mail for mail.a3-solutions.eu loops back to myself) Apr 11 21:34:06 server postfix/smtpd[30970]: disconnect from unknown[10.10.10.10] Apr 11 21:34:06 server postfix/cleanup[30973]: 972994C05A: message-id=<[email protected]> Apr 11 21:34:06 server postfix/bounce[30977]: 59D674C055: sender non-delivery notification: 972994C05A Apr 11 21:34:06 server postfix/qmgr[4386]: 972994C05A: from=<>, size=7741, nrcpt=1 (queue active) Apr 11 21:34:06 server postfix/qmgr[4386]: 59D674C055: removed Apr 11 21:34:06 server postfix/smtpd[30970]: connect from unknown[10.10.10.10] Apr 11 21:34:06 server postfix/smtp[30975]: warning: host mail.a3-solutions.eu[62.163.185.59]:25 greeted me with my own hostname server.a3-solutions.eu Apr 11 21:34:06 server postfix/smtp[30975]: warning: host mail.a3-solutions.eu[62.163.185.59]:25 replied to HELO/EHLO with my own hostname server.a3-solutions.eu Apr 11 21:34:06 server postfix/smtp[30975]: 972994C05A: to=<*****@ccbanana.com>, relay=mail.a3-solutions.eu[62.163.185.59]:25, delay=0.04, delays=0.01/0/0.03/0, dsn=5.4.6, status=bounced (mail for mail.a3-solutions.eu loops back to myself) Apr 11 21:34:06 server postfix/smtpd[30970]: disconnect from unknown[10.10.10.10] Apr 11 21:34:06 server postfix/qmgr[4386]: 972994C05A: removed Apr 11 21:34:06 server postfix/smtpd[30976]: disconnect from host86-143-244-58.range86-143.btcentralplus.com[86.143.244.58] Apr 11 21:37:26 server postfix/anvil[31326]: statistics: max connection rate 1/60s for (smtp:86.143.244.58) at Apr 11 21:34:06 Apr 11 21:37:26 server postfix/anvil[31326]: statistics: max connection count 1 for (smtp:86.143.244.58) at Apr 11 21:34:06 Apr 11 21:37:26 server postfix/anvil[31326]: statistics: max cache size 1 at Apr 11 21:34:06 Apr 11 21:41:31 server postfix/smtpd[31949]: connect from localhost[127.0.0.1] Apr 11 21:41:31 server postfix/smtpd[31949]: lost connection after CONNECT from localhost[127.0.0.1] Apr 11 21:41:31 server postfix/smtpd[31949]: disconnect from localhost[127.0.0.1] Apr 11 21:45:00 server courierpop3login: LOGIN, user=*****@a3-solutions.eu, ip=[::ffff:10.10.10.10] Apr 11 21:45:00 server courierpop3login: LOGOUT, user=*****@a3-solutions.eu, ip=[::ffff:10.10.10.10], top=0, retr=0, rcvd=12, sent=39, time=0 Apr 11 21:51:23 server postfix/master[4380]: terminating on signal 15 Apr 11 21:51:23 server postfix/master[32680]: daemon started -- version 2.3.8, configuration /etc/postfix Apr 11 21:52:10 server postfix/smtpd[366]: connect from unknown[10.10.10.10] Apr 11 21:52:10 server postfix/smtpd[366]: NOQUEUE: reject: RCPT from unknown[10.10.10.10]: 554 5.7.1 <*****@hotmail.com>: Relay access denied; from=<*****@a3-solutions.eu> to=<*****@hotmail.com> proto=ESMTP helo=<XASERV6000A> Apr 11 21:52:13 server postfix/smtpd[366]: disconnect from unknown[10.10.10.10] Apr 11 21:52:16 server postfix/smtpd[366]: connect from unknown[10.10.10.10] Apr 11 21:52:16 server postfix/smtpd[366]: 6B66B4C055: client=unknown[10.10.10.10] Apr 11 21:52:16 server postfix/cleanup[371]: 6B66B4C055: message-id=<*****@eu> Apr 11 21:52:16 server postfix/qmgr[32683]: 6B66B4C055: from=<*****@a3-solutions.eu>, size=2640, nrcpt=1 (queue active) Apr 11 21:52:16 server postfix/smtpd[373]: connect from unknown[10.10.10.10] Apr 11 21:52:16 server postfix/smtp[372]: warning: host mail.a3-solutions.eu[62.163.185.59]:25 greeted me with my own hostname server.a3-solutions.eu Apr 11 21:52:16 server postfix/smtp[372]: warning: host mail.a3-solutions.eu[62.163.185.59]:25 replied to HELO/EHLO with my own hostname server.a3-solutions.eu Apr 11 21:52:16 server postfix/smtp[372]: 6B66B4C055: to=<*****@a3-solutions.eu>, orig_to=<*****@a3-solutions.nl>, relay=mail.a3-solutions.eu[62.163.185.59]:25, delay=0.16, delays=0.05/0.01/0.09/0, dsn=5.4.6, status=bounced (mail for mail.a3-solutions.eu loops back to myself) Apr 11 21:52:16 server postfix/cleanup[371]: 8FD434C05A: message-id=<[email protected]> Apr 11 21:52:16 server postfix/smtpd[373]: disconnect from unknown[10.10.10.10] Apr 11 21:52:16 server postfix/qmgr[32683]: 8FD434C05A: from=<>, size=4544, nrcpt=1 (queue active) Apr 11 21:52:16 server postfix/bounce[375]: 6B66B4C055: sender non-delivery notification: 8FD434C05A Apr 11 21:52:16 server postfix/qmgr[32683]: 6B66B4C055: removed Apr 11 21:52:16 server postfix/smtpd[373]: connect from unknown[10.10.10.10] Apr 11 21:52:16 server postfix/smtp[372]: warning: host mail.a3-solutions.eu[62.163.185.59]:25 greeted me with my own hostname server.a3-solutions.eu Apr 11 21:52:16 server postfix/smtp[372]: warning: host mail.a3-solutions.eu[62.163.185.59]:25 replied to HELO/EHLO with my own hostname server.a3-solutions.eu Apr 11 21:52:16 server postfix/smtp[372]: 8FD434C05A: to=<*****@a3-solutions.eu>, relay=mail.a3-solutions.eu[62.163.185.59]:25, delay=0.04, delays=0.01/0/0.03/0, dsn=5.4.6, status=bounced (mail for mail.a3-solutions.eu loops back to myself) Apr 11 21:52:16 server postfix/smtpd[373]: disconnect from unknown[10.10.10.10] Apr 11 21:52:16 server postfix/qmgr[32683]: 8FD434C05A: removed Apr 11 21:52:17 server courierpop3login: LOGIN, user=*****@a3-solutions.eu, ip=[::ffff:10.10.10.10] Apr 11 21:52:18 server courierpop3login: LOGOUT, user=*****@a3-solutions.eu, ip=[::ffff:10.10.10.10], top=0, retr=0, rcvd=12, sent=39, time=1 Apr 11 21:52:18 server courierpop3login: LOGIN, user=*****@a3-solutions.eu, ip=[::ffff:10.10.10.10] Apr 11 21:52:18 server postfix/smtpd[366]: disconnect from unknown[10.10.10.10] Apr 11 21:52:19 server courierpop3login: LOGOUT, user=*****@a3-solutions.eu, ip=[::ffff:10.10.10.10], top=0, retr=0, rcvd=12, sent=39, time=1 Secure connecting to the SMTP doesn't work eather, then it says my login credentials are not correct. To me it looks like the guide uses plain text storing accoridng to postfix in the DB while in the DB i have to use encrypt on the password? Any help would be greatly appriciated!
First, make sure that you list mail.a3-solutions.eu in the mydestination line in /etc/postfix/main.cf. Then you should enable "Server requires authentication." in your email client (afterwards, you can remove everything except 127.0.0.0/8 from the mynetworks line in main.cf). Did you configure Postfix to deliver mails to Maildir instead of mbox?
My config files: /etc/postfix/main.cf Code: # See /usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. #myorigin = /etc/mailname smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h # TLS parameters smtpd_tls_cert_file = /etc/postfix/smtpd.cert smtpd_tls_key_file = /etc/postfix/smtpd.key smtpd_use_tls = yes smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. myhostname = server.a3-solutions.eu alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = server.a3-solutions.eu, localhost, localhost.localdomain, mail.a3-solutions.eu relayhost = mynetworks = 127.0.0.0/8, 192.168.1.0/24 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all virtual_alias_domains = virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf virtual_mailbox_base = /home/vmail virtual_uid_maps = static:5000 virtual_gid_maps = static:5000 smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf virtual_create_maildirsize = yes virtual_mailbox_extended = yes virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf virtual_mailbox_limit_override = yes virtual_maildir_limit_message = "The user you are trying to reach is over quota." virtual_overquota_bounce = yes 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 /etc/postfix/mysql-virtual_domains.cf Code: user = mail_admin password = mail_admin_password dbname = mail table = domains select_field = 'virtual' where_field = domain hosts = 127.0.0.1 /etc/postfix/mysql-virtual_email2email.cf Code: user = mail_admin password = mail_admin_password dbname = mail table = users select_field = email where_field = email hosts = 127.0.0.1 /etc/postfix/mysql-virtual_forwardings.cf Code: user = mail_admin password = mail_admin_password dbname = mail table = forwardings select_field = destination where_field = source hosts = 127.0.0.1 /etc/postfix/mysql-virtual_mailbox_limit_maps.cf Code: user = mail_admin password = mail_admin_password dbname = mail table = users select_field = quota where_field = email hosts = 127.0.0.1 /etc/postfix/mysql-virtual_mailboxes.cf Code: user = mail_admin password = mail_admin_password dbname = mail table = users select_field = CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') where_field = email hosts = 127.0.0.1 /etc/postfix/mysql-virtual_transports.cf Code: user = mail_admin password = mail_admin_password dbname = mail table = transport select_field = transport where_field = domain hosts = 127.0.0.1 /etc/postfix/sasl/smtpd.conf Code: pwcheck_method: saslauthd mech_list: plain login # mecho_list: digest-md5 cram-md5 allow_plaintext: true auxprop_plugin: mysql sql_hostnames: 127.0.0.1 sql_user: mail_admin sql_passwd: mail_admin_password sql_database: mail sql_select: select password from users where email = '%u' Note that i'm changing the DB passwords once it works, untill then i used the basic guide ones to prevent from making typo's in them With this configuration i get these errors If i check login using secure SMTP connection it asks for user name and password and DOES NOT accept the same one as the POP3 one which is in the DB
Please try this: Code: postconf -e 'home_mailbox = Maildir/' postconf -e 'mailbox_command =' /etc/init.d/postfix restart Did you take a look at this tutorial? http://www.howtoforge.com/virtual_postfix_mysql_quota_courier