PDA

View Full Version : Postfix Error (Bouncing Emails with "in reply to end of DATA command")


freetan
13th November 2006, 17:24
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

falko
14th November 2006, 16:00
Is your server hosted on a dynamic IP address or blacklisted? Please check on http://www.mxtoolbox.com/blacklists.aspx

freetan
14th November 2006, 18:49
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.

falko
15th November 2006, 17:24
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 ? :( You could relay through a mail server that is not blacklisted: http://www.howtoforge.com/forums/showthread.php?t=72&highlight=relayhost

Can you tell me how can I check if my mail server is using a wrong blacklist ? :confused:

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

clay2k
29th November 2006, 23:49
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.

clay2k
29th November 2006, 23:51
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.