Here is the main.cf, maybe I have created a problem within this:-
General configuration for Postfix
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
appending .domain is the MUA’s job.
append_dot_mydomain = no
Readme and compatibility
readme_directory = no
compatibility_level = 3.6
TLS parameters using custom Postfix certificates
smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem
smtpd_tls_key_file = /etc/postfix/postfix.key.pem
smtpd_tls_CAfile = /etc/postfix/postfix.ca.pem
smtpd_tls_security_level = may
Enable encryption for SMTP
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_security_level = encrypt
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
Set domain and hostname for mydomain
mydomain = mydomain
myhostname = server.mydomain
#myorigin = /etc/mailname
Ensure no conflicts in virtual domains
mydestination = $myhostname, localhost.$mydomain, localhost
Relay settings
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
Network settings
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
inet_interfaces = all
inet_protocols = all
Mailbox setup
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
recipient_delimiter = +
DNS settings
smtp_dns_support_level = disabled
smtp_host_lookup = dns
Security settings (TLS)
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
tls_server_sni_maps = hash:/etc/postfix/sni_map
Virtual alias and mailbox maps
virtual_alias_maps = hash:/etc/postfix/virtual
home_mailbox = Maildir/
SASL authentication
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated
reject_rbl_client b.barracudacentral.org
reject_rbl_client dsn.rfc-ignorant.org
reject_rbl_client list.dsbl.org
reject_rbl_client sbl-xbl.spamhaus.org
reject_rbl_client cbl.abuseat.org
reject_rbl_client ix.dnsbl.manitu.net
reject_rbl_client combined.rbl.msrbl.net
reject_rbl_client rabl.nuclearelephant.com
reject_unknown_recipient_domain
reject_unknown_reverse_client_hostname
SASL settings
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
Enable TLS (recommended)
smtpd_use_tls = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_use_tls = yes
Greylisting with milter
milter_default_action = accept
smtpd_milters = local:/var/run/milter-greylist/milter-greylist.sock
non_smtpd_milters = local:/var/run/milter-greylist/milter-greylist.sock
Define the alias and virtual users
Ensure that this matches your virtual alias settings in /etc/postfix/virtual
Example virtual alias mapping
Use postmap /etc/postfix/virtual
to generate the hash file
smtpd_client_restrictions = check_client_access hash:/etc/postfix/client_access
sender_dependent_default_transport_maps = hash:/etc/postfix/sender_dependent_default_transport_maps