First off all Server was running couple of months without any problems directly connected to ISP, but I had to change ISP and now server is behind NAT/Router with internal static IP and redirected ports on Router.
Now the difficult part, Apache/FTP is working without any problems but postfix have problems with accepting mails, I know that it has something to do with my networking config, postfix cannot resolve incoming hostnames and sends it to spam (only warns now after re-configuring)
LOG:
Code
- Jun 22 19:21:52 data postfix/smtpd[2862]: connect from unknown[192.168.1.1]Jun 22 19:21:53 data postfix/policyd-weight[2507]: weighted check: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 IN_IPv6_RBL=4.25 CL_IP_NE_HELO=5.75 RESOLVED_IP_IS_NOT_HELO=1.5 (check from: .otodom. - helo: .smtpfarm2.allegro. - helo-domain: .allegro.) FROM_NOT_FAILED_HELO(DOMAIN)=7.25; <client=192.168.1.1> <helo=smtpfarm2.allegro.pl> <from=otodom@otodom.pl> <to=biuro@m4-nieruchomosci.pl>; rate: 14.25Jun 22 19:21:53 data postfix/policyd-weight[2507]: decided action=550 Mail appeared to be SPAM or forged. Ask your Mail/DNS-Administrator to correct HELO and DNS MX settings or to get removed from DNSBLs; MTA helo: smtpfarm2.allegro.pl, MTA hostname: unknown[192.168.1.1] (helo/hostname mismatch); <client=192.168.1.1> <helo=smtpfarm2.allegro.pl> <from=otodom@otodom.pl> <to=biuro@m4-nieruchomosci.pl>; delay: 1s
main.cf
Code
- # ====================================================================
- # i-MSCP Internet - Multi Server Control Panel
- #
- # @copyright 2010-2012 by i-MSCP | http://www.i-mscp.net
- # @link http://www.i-mscp.net
- # @author i-MSCP Team
- # Postfix directory settings; These are critical for normal Postfix MTA functionallity
- command_directory = /usr/sbin
- daemon_directory = /usr/lib/postfix
- # Some common configuration parameters
- inet_protocols = ipv4, ipv6
- inet_interfaces = all
- mynetworks_style = host
- myhostname = data.goldcart.pl
- mydomain = data.goldcart.pl.local
- myorigin = $myhostname
- smtpd_banner = $myhostname ESMTP i-MSCP 1.0.2.1 Managed
- setgid_group = postdrop
- # Receiving messages parameters
- mydestination = $myhostname, $mydomain
- append_dot_mydomain = no
- append_at_myorigin = yes
- local_transport = local
- transport_maps = hash:/etc/postfix/imscp/transport
- alias_maps = hash:/etc/aliases
- alias_database = hash:/etc/aliases
- # Delivering local messages parameters
- mail_spool_directory = /var/mail
- # Mailboxquota
- # => 0 for unlimited
- # => 104857600 for 100 MB
- mailbox_size_limit = 0
- mailbox_command = procmail -a "$EXTENSION"
- # Message size limit
- # => 0 for unlimited
- # => 104857600 for 100 MB
- message_size_limit = 0
- biff = no
- recipient_delimiter = +
- local_destination_recipient_limit = 1
- local_recipient_maps = unix:passwd.byname $alias_database
- # i-MSCP Autoresponder parameters
- imscp-arpl_destination_recipient_limit = 1
- # Delivering virtual messages parameters
- virtual_mailbox_base = /var/mail/virtual
- virtual_mailbox_limit = 0
- virtual_mailbox_domains = hash:/etc/postfix/imscp/domains
- virtual_mailbox_maps = hash:/etc/postfix/imscp/mailboxes
- virtual_alias_maps = hash:/etc/postfix/imscp/aliases
- virtual_minimum_uid = 999
- virtual_uid_maps = static:999
- virtual_gid_maps = static:8
- # SASL parameters
- smtpd_sasl_auth_enable = yes
- smtpd_sasl_security_options = noanonymous
- broken_sasl_auth_clients = yes
- smtpd_sasl_authenticated_header = yes
- smtpd_helo_required = yes
- smtpd_helo_restrictions = permit_mynetworks,
- permit_sasl_authenticated,
- reject_invalid_helo_hostname,
- reject_non_fqdn_helo_hostname
- smtpd_sender_restrictions = reject_non_fqdn_sender,
- reject_unknown_sender_domain,
- permit_mynetworks,
- permit_sasl_authenticated
- smtpd_recipient_restrictions = reject_non_fqdn_recipient,
- reject_unknown_recipient_domain,
- permit_mynetworks,
- permit_sasl_authenticated,
- reject_unauth_destination,
- reject_unlisted_recipient,
- check_client_access hash:/etc/postfix/policyd_whitelist,
- warn_if_reject check_policy_service inet:127.0.0.1:12525,
- check_policy_service inet:127.0.0.1:10023,
- permit
- smtpd_data_restrictions = reject_multi_recipient_bounce,
- reject_unauth_pipelining
- # TLS parameters
- smtpd_tls_security_level = may
- smtpd_tls_loglevel = 2
- smtpd_tls_cert_file = /etc/imscp/data.goldcart.pl.pem
- smtpd_tls_key_file = /etc/imscp/data.goldcart.pl.pem
- smtpd_tls_auth_only = no
- smtpd_tls_received_header = yes
- # AMaViS parameters; activate, if available/used
- #content_filter = amavis:[127.0.0.1]:10024
- # Quota support; activate, if available/used
- #virtual_create_maildirsize = yes
- #virtual_mailbox_extended = yes
- #virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
- #virtual_mailbox_limit_override = yes
- #virtual_maildir_limit_message = "The user you're trying to reach is over mailbox quota."
- #virtual_overquota_bounce = yes
- smtpd_sasl_local_domain =
- virtual_transport = virtual
What I have done wrong ?