Postfix Error (Bouncing Emails with "in reply to end of DATA command")

Discussion in 'HOWTO-Related Questions' started by freetan, Nov 13, 2006.

  1. freetan

    freetan New Member

    Hi, I urgently need some help here. I followed the Howto guide (Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV) by Falko to setup my mail server.

    Now the server is behaving irratic, when I try to send an email using squirrelmail to a proper email account on another server, it gives me the error:

    Nov 13 22:35:56 mail postfix/smtp[23660]: 866CAE08715E: to=<test@test.com>, relay=mxgate.test.com.sg[123.123.55.217], delay=1, status=bounced (host mxgate.test.com.sg[123.123.55.217] said: 550 5.7.1 System Error. Please retry (in reply to end of DATA command))

    note: I have changed the actual email address and IP address.

    The irratic part is:
    (1) When I use the same squirrelmail account to send an email to my yahoo account or gmail account, it works.

    (2) When I try to send an email using my yahoo or gmail account to the above test@test.com mail account it works.

    It only fails when I try to send the email using my squirrelmail (postfix) server.

    Can someone please help me solve this ? :confused:

    This is my postfix main.cf file:

    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

    myhostname = mail.mailserver.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = mail.mailserver.com, localhost, localhost.localdomain
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    virtual_alias_domains =
    virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_forwardings.cf,mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = 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
    smtpd_use_tls = yes
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    transport_maps = mysql:/etc/postfix/mysql-virtual_transports.cf
    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 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_reci$
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    bounce_queue_lifetime = 5h
    maximal_queue_lifetime = 5h
     
  2. falko

    falko Super Moderator

  3. freetan

    freetan New Member

    My server is using the static IP address 202.56.133.248

    I have check for blacklist listing on www.mxtoolbox.com and my IP address was listed on 2:

    (1) BLARSBL
    (2) JAMMDNSBL

    Both these sites are blocking entire segment of IP addresses based on country which unfortunately, I reside in a country they have chosen to block. Even though my mail server does not send spam nor is it an open relay. Any suggestions ? :(

    Another thought is that the target mail server that I'm trying to send email to is blacklisted as well, thus my mail server cannot send to it...... Can you tell me how can I check if my mail server is using a wrong blacklist ? :confused:

    P.S. I'm using the same setup for Amavis, Spamassassin, Razor, DCC, etc from your Virtual Users And Domains With Postfix, Courier And MySQL SMTP-AUTH, Quota, SpamAssassin, ClamAV Howto gude.
     
  4. falko

    falko Super Moderator

    You could relay through a mail server that is not blacklisted: http://www.howtoforge.com/forums/showthread.php?t=72&highlight=relayhost

    Please check your amavisd.conf and your main.cf.
     
  5. clay2k

    clay2k New Member

    a fix that worked for me

    you may be experiencing something totally different, or maybe only appearing to but i came across the same returned error today and guess what fixed it... removing margins on the embedded gif in a signature that is automatically placed in all emails in my outlook. Fun fun. Obviously if you are blocked you are blocked, but i usually a blocked sender will receive a 553 error not a 554...

    so if outlook is used with images in the email and the margin setting was set, it could be the culprit. It also causes outlook itself to mark the email as junk mail (tested it through a different network/email addy and it came into my junk email folder). pretty funny result to the programs own usage of the insert image command.

    This may be limited to images in the edit signature window, also may be limited to HTML type emails, possibly even with default Western European encoding (outlook 'auto' default i think) and possibly even with word as the email editor. I did not go too crazy with my testing but that is the jist of what happened with me today when sending email through GoDaddy's email system.
     
  6. clay2k

    clay2k New Member

    whoops wrong post

    i had keyed on the phrase "in reply to end of DATA command" during my search for my particular error, i thought this was the browser window with a similar issue this is instead a 550 error and not the browser window i thought it was... sorry disregard.
     

Share This Page