I have Windows 2008 sever with Virtual box running Ubuntu 12.04 server. I have named the server "mailserver". The mx recordentry is mailserver.ormondkwikstop.com. I am trying to run Postfix mail server but even after reading extensively, I seem not to configure it right.
I am trying to get my feet wet with web server and mail server, especially outgoing, so that I can have web server and mail server on a separate server (virtual or physical). Meanwhile I am trying to integrate clamav and other spam filter by reading https://help.ubuntu.com/community/PostfixAmavisNew
What am I doing wrong?
Here is my main.cf file:
***************************************************
# 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 (Ubuntu)
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
readme_directory = no
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_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 = mailserver.ormondkwikstop.com
mydomain = mailserver.ormondkwikstop.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $mydomain, mailserver, localhost.localdomain, localhost
myorigin = $mydomain
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
notify_classes = bounce
smtpd_recipient_restrictions = reject_non_fqdn_recipient reject_unknown_recipient_domain permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_non_fqdn_hostname reject_invalid_hostname check_helo_access pcre:/etc/postfix/helo_checks check_sender_mx_access cidr:/etc/postfix/bogus_mx reject_rbl_client zen.spamhaus.org reject_rbl_client cbl.abuseat.org reject_rbl_client dnsbl-1.uceprotect.net permit
*******************************************************************
Here is mail.log file:
****************************************************************
Feb 27 12:41:21 mailserver spamd[1369]: spamd: server started on port 783/tcp (running version 3.3.2)
Feb 27 12:41:21 mailserver spamd[1369]: spamd: server pid: 1369
Feb 27 12:41:21 mailserver spamd[1369]: spamd: server successfully spawned child process, pid 1370
Feb 27 12:41:21 mailserver spamd[1369]: spamd: server successfully spawned child process, pid 1372
Feb 27 12:41:21 mailserver spamd[1369]: prefork: child states: IS
Feb 27 12:41:21 mailserver spamd[1369]: prefork: child states: II
Feb 27 12:41:49 mailserver postfix/master[1839]: daemon started -- version 2.9.6, configuration /etc/postfix
Feb 27 12:57:43 mailserver postfix/pickup[1844]: 62FDA2E1799: uid=0 from=<bharatpatel@mailserver>
Feb 27 12:57:43 mailserver postfix/cleanup[2658]: 62FDA2E1799: message-id=<1393523863.2649@mailserver>
Feb 27 12:57:43 mailserver postfix/qmgr[1845]: 62FDA2E1799: from=<bharatpatel@mailserver>, size=601, nrcpt=1 (queue active)
Feb 27 12:57:43 mailserver postfix/smtp[2664]: warning: relayhost configuration problem
Feb 27 12:57:43 mailserver postfix/smtp[2664]: 62FDA2E1799: to=<yugpatel@hotmail.com>, relay=none, delay=0.4, delays=0.22/0.11/0.08/0, dsn=4.3.5, status=deferred (Host or domain name not found. Name service error for name=smtp.localdomain type=AAAA: Host not found)
Feb 27 13:06:49 mailserver postfix/qmgr[1845]: 62FDA2E1799: from=<bharatpatel@mailserver>, size=601, nrcpt=1 (queue active)
Feb 27 13:06:49 mailserver postfix/smtp[2851]: warning: relayhost configuration problem
Feb 27 13:06:49 mailserver postfix/smtp[2851]: 62FDA2E1799: to=<yugpatel@hotmail.com>, relay=none, delay=546, delays=546/0.17/0/0, dsn=4.3.5, status=deferred (Host or domain name not found. Name service error for name=smtp.localdomain type=AAAA: Host not found)
Feb 27 13:09:22 mailserver postfix/postfix-script[3523]: refreshing the Postfix mail system
Feb 27 13:09:22 mailserver postfix/master[1839]: reload -- version 2.9.6, configuration /etc/postfix
Feb 27 13:19:22 mailserver postfix/qmgr[3528]: 62FDA2E1799: from=<bharatpatel@mailserver>, size=601, nrcpt=1 (queue active)
Feb 27 13:19:24 mailserver postfix/smtp[3756]: 62FDA2E1799: to=<yugpatel@hotmail.com>, relay=mx3.hotmail.com[65.54.188.110]:25, delay=1301, delays=1299/0.12/1.6/0.34, dsn=2.0.0, status=sent (250 <1393523863.2649@mailserver> Queued mail for delivery)
Feb 27 13:19:24 mailserver postfix/qmgr[3528]: 62FDA2E1799: removed
*****************************************************************
I am trying to get my feet wet with web server and mail server, especially outgoing, so that I can have web server and mail server on a separate server (virtual or physical). Meanwhile I am trying to integrate clamav and other spam filter by reading https://help.ubuntu.com/community/PostfixAmavisNew
What am I doing wrong?
Here is my main.cf file:
***************************************************
# 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 (Ubuntu)
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
readme_directory = no
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_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 = mailserver.ormondkwikstop.com
mydomain = mailserver.ormondkwikstop.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $mydomain, mailserver, localhost.localdomain, localhost
myorigin = $mydomain
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
notify_classes = bounce
smtpd_recipient_restrictions = reject_non_fqdn_recipient reject_unknown_recipient_domain permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_non_fqdn_hostname reject_invalid_hostname check_helo_access pcre:/etc/postfix/helo_checks check_sender_mx_access cidr:/etc/postfix/bogus_mx reject_rbl_client zen.spamhaus.org reject_rbl_client cbl.abuseat.org reject_rbl_client dnsbl-1.uceprotect.net permit
*******************************************************************
Here is mail.log file:
****************************************************************
Feb 27 12:41:21 mailserver spamd[1369]: spamd: server started on port 783/tcp (running version 3.3.2)
Feb 27 12:41:21 mailserver spamd[1369]: spamd: server pid: 1369
Feb 27 12:41:21 mailserver spamd[1369]: spamd: server successfully spawned child process, pid 1370
Feb 27 12:41:21 mailserver spamd[1369]: spamd: server successfully spawned child process, pid 1372
Feb 27 12:41:21 mailserver spamd[1369]: prefork: child states: IS
Feb 27 12:41:21 mailserver spamd[1369]: prefork: child states: II
Feb 27 12:41:49 mailserver postfix/master[1839]: daemon started -- version 2.9.6, configuration /etc/postfix
Feb 27 12:57:43 mailserver postfix/pickup[1844]: 62FDA2E1799: uid=0 from=<bharatpatel@mailserver>
Feb 27 12:57:43 mailserver postfix/cleanup[2658]: 62FDA2E1799: message-id=<1393523863.2649@mailserver>
Feb 27 12:57:43 mailserver postfix/qmgr[1845]: 62FDA2E1799: from=<bharatpatel@mailserver>, size=601, nrcpt=1 (queue active)
Feb 27 12:57:43 mailserver postfix/smtp[2664]: warning: relayhost configuration problem
Feb 27 12:57:43 mailserver postfix/smtp[2664]: 62FDA2E1799: to=<yugpatel@hotmail.com>, relay=none, delay=0.4, delays=0.22/0.11/0.08/0, dsn=4.3.5, status=deferred (Host or domain name not found. Name service error for name=smtp.localdomain type=AAAA: Host not found)
Feb 27 13:06:49 mailserver postfix/qmgr[1845]: 62FDA2E1799: from=<bharatpatel@mailserver>, size=601, nrcpt=1 (queue active)
Feb 27 13:06:49 mailserver postfix/smtp[2851]: warning: relayhost configuration problem
Feb 27 13:06:49 mailserver postfix/smtp[2851]: 62FDA2E1799: to=<yugpatel@hotmail.com>, relay=none, delay=546, delays=546/0.17/0/0, dsn=4.3.5, status=deferred (Host or domain name not found. Name service error for name=smtp.localdomain type=AAAA: Host not found)
Feb 27 13:09:22 mailserver postfix/postfix-script[3523]: refreshing the Postfix mail system
Feb 27 13:09:22 mailserver postfix/master[1839]: reload -- version 2.9.6, configuration /etc/postfix
Feb 27 13:19:22 mailserver postfix/qmgr[3528]: 62FDA2E1799: from=<bharatpatel@mailserver>, size=601, nrcpt=1 (queue active)
Feb 27 13:19:24 mailserver postfix/smtp[3756]: 62FDA2E1799: to=<yugpatel@hotmail.com>, relay=mx3.hotmail.com[65.54.188.110]:25, delay=1301, delays=1299/0.12/1.6/0.34, dsn=2.0.0, status=sent (250 <1393523863.2649@mailserver> Queued mail for delivery)
Feb 27 13:19:24 mailserver postfix/qmgr[3528]: 62FDA2E1799: removed
*****************************************************************