Postfix and relay problem

Discussion in 'Server Operation' started by chrees, Dec 9, 2013.

  1. chrees

    chrees New Member

    I have installed postfix 2.3.6. on my server. For some time I have a problem with spam: the server is used to send spam by unauthorized users. Most spam is sent from an address localhost.mydomain.tld where mydomain.tld course is swapped for my domain. Server URL is a myserver.mydomain.tld. Practically, I do not see spam sent from this address. For this reason, a lot of public servers reject emails from my server.
    How can I solve this problem?
    Best regards*

    ps. I attach the configuration of postfix (
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/lib/postfix
    mail_owner = postfix
    myhostname = myserver.mydomain.tld
    mydomain = mydomain.tld
    myorigin = $myhostname
    inet_interfaces = all
    mydestination = $myhostname
    unknown_local_recipient_reject_code = 550
    mynetworks =
    :relay_domains = $mydestination
    home_mailbox = .maildir/
    smtpd_banner = $myhostname System
    local_destination_concurrency_limit = 2
    default_destination_concurrency_limit = 20
    debug_peer_level = 2
    debugger_command =
    	 xxgdb $daemon_directory/$process_name $process_id & sleep 5
    sendmail_path = /usr/sbin/sendmail
    newaliases_path = /usr/bin/newaliases
    mailq_path = /usr/bin/mailq
    setgid_group = postdrop
    html_directory = /usr/share/doc/postfix-2.3.6/html
    manpage_directory = /usr/share/man
    sample_directory = /etc/postfix
    home_mailbox = .maildir/
    smtpd_sasl_auth_enable = yes
    smtpd_sasl2_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_sasl_local_domain =
    smtpd_recipient_restrictions =
    smtp_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_use_tls = yes
    smtpd_tls_key_file = /etc/ssl/postfix/key.pem
    smtpd_tls_cert_file = /etc/ssl/postfix/cert.pem
    smtpd_tls_CAfile = /etc/ssl/postfix/ca.pem
    smtpd_tls_loglevel = 3
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    message_size_limit = 150000000
    mailbox_size_limit = 200000000
    virtual_mailbox_limit = 200000000
    local_transport = local
    local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname
    virtual_alias_maps = mysql:/etc/postfix/mysql/
    virtual_alias_domains = $virtual_alias_maps
    virtual_uid_maps = static:1000
    virtual_gid_maps = static:1000
    virtual_minimum_uid = 1000
    virtual_mailbox_base = /
    virtual_mailbox_domains = mysql:/etc/postfix/mysql/
    virtual_mailbox_maps = mysql:/etc/postfix/mysql/
    transport_maps = mysql:/etc/postfix/mysql/
    biff = no
    empty_address_recipient = MAILER-DAEMON 
    queue_minfree = 120000000
    maximal_queue_lifetime = 6h
    delay_warning_time = 0h
  2. DanielP

    DanielP New Member

    are everything set correct with mydomain.tld and FQDN of the server

    it easy to get in RBL's with incomplete server setup if you send mails (wiht -f) I got one vbulletin forum which got that function you can manually troubleshoot every reject

    You need manually unblock your IP/s from RBLs

    (but only after problem is solved) there is email by hours limit in cpanel

    one solution i found in these forums for ISPConfig and postfix is

    (use forum search for integration tips there are several topics here)

    so even some of your sites got hacked and spam is send you can got a policy to be send for example no more than 50 emails per hour or no more than 500 for the day from a domain so yo do not get in trouble with RBLs... or not in big one you can choose lower limits for more paranoid setup
    Last edited: Dec 9, 2013

Share This Page