LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 09-29-2008, 11:41 PM   #1
bornfree
LQ Newbie
 
Registered: Dec 2007
Posts: 3

Rep: Reputation: 0
Unhappy Postfix returns "Relay Access Denied (smtp code 554)"


Dear Experts
i am having trouble setting up an antispam system for my mail server. here is my situation.
i have a mail server running on novell groupwise, it is hosting 2 different domains.
now i wan to implement an antispam system for it, on CentOS 5.2. the CentOS is created on a virtual box using vmware, with 30gb of free space and 256mb ram. on the centos hosts postfix, mailscanner, spamassassin and clamav.
i manage to install these components without any problem. after the setup, from the local network, i can telnet into the antispam and send a test mail. if i telnet from an external location, it will give me the error message at the "rcpt to:test@example.com" saying relay access denied.

below is the settings of my /etc/postfix.main.cf

Code:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
myhostname = antispam.example.com
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost
local_recipient_maps =
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
luser_relay = $user@mailserver

debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.3.3/samples
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
header_checks = regexp:/etc/postfix/header_checks
transport_maps = hash:/etc/postfix/transport
there is a firewall(shorewall) to divert the mail to the antispam server. for now the mails are directed into the mail server.

i am not sure what more information you need. feel free to ask me.

Thanks a million!

Last edited by bornfree; 09-29-2008 at 11:42 PM.
 
Old 09-30-2008, 12:47 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
Show postconf -n output please, and the actual log message(s) relevant to the problem.
 
Old 09-30-2008, 03:29 AM   #3
bornfree
LQ Newbie
 
Registered: Dec 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Dear Mr C.
output of postconf -n
Code:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
header_checks = regexp:/etc/postfix/header_checks
html_directory = no
inet_interfaces = all
local_recipient_maps =
luser_relay = $user@10.10.10.3
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
myhostname = antispam.example.com
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
this is the error message from my email to the antispam

Code:
Sep 28 04:18:12 antispam postfix/smtp[17126]: connect to mx.domain.com[202.186.166.226]: Connection refused (port 25)
Sep 28 04:18:12 antispam postfix/smtp[17125]: connect to mx.domain.com[202.186.166.226]: Connection refused (port 25)
Sep 28 04:18:13 antispam postfix/smtp[17125]: E70823000CD: to=<jason@domain.com>, relay=none, delay=126712, delays=126701/0.24/11/0, dsn=4.4.1, status=deferred (connect to mx.domain.com[202.186.166.226]: Connection refused)
Sep 28 04:18:13 antispam postfix/smtp[17126]: B3B8F3000C8: to=<jason@domain.com>, relay=none, delay=127057, delays=127046/0.1/11/0, dsn=4.4.1, status=deferred (connect to mx.domain.com[202.186.166.226]: Connection refused)
also i found it kept generating the following every 2-3 seconds.. and my maillog on the antispam is growing very fast..and now it grew to over 800k lines.

Code:
Sep 28 04:18:19 antispam MailScanner[17141]: Using SpamAssassin results cache
Sep 28 04:18:19 antispam MailScanner[17141]: Connected to SpamAssassin cache database
Sep 28 04:18:19 antispam MailScanner[17141]: Enabling SpamAssassin auto-whitelist functionality...
Sep 28 04:18:21 antispam MailScanner[17141]: Using locktype = flock
Sep 28 04:18:21 antispam MailScanner[17141]: New Batch: Scanning 1 messages, 15465 bytes
Sep 28 04:18:21 antispam MailScanner[17141]: Spam Checks: Starting
Sep 28 04:18:24 antispam MailScanner[17146]: MailScanner E-Mail Virus Scanner version 4.64.3 starting...
Sep 28 04:18:24 antispam MailScanner[17146]: Read 850 hostnames from the phishing whitelist
Sep 28 04:18:24 antispam MailScanner[17146]: Read 5139 hostnames from the phishing blacklist
Sep 28 04:18:24 antispam MailScanner[17146]: Config: calling custom init function SQLBlacklist
Sep 28 04:18:24 antispam MailScanner[17146]: Config: calling custom init function MailWatchLogging
Sep 28 04:18:24 antispam MailScanner[17146]: Started SQL Logging child
Sep 28 04:18:24 antispam MailScanner[17146]: Config: calling custom init function SQLWhitelist
Sep 28 04:18:24 antispam MailScanner[17146]: SpamAssassin temporary working directory is /var/spool/MailScanner/incoming/SpamAssassin-Temp
is this normal?

Thank you very much!!

Last edited by bornfree; 09-30-2008 at 10:51 AM.
 
Old 09-30-2008, 11:01 AM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
Ok, so we need to see the log message and postconf -n from the antispam machine,
as that is the machine doing the rejecting. The actual connection was refused, so
something on your system is disallowing the postfix smtp client from even making the connection.

The mailscanner (startup) messages you see in the log file every 2 - 3 seconds might be the result of:

http://forums.theplanet.com/index.php?showtopic=88194
or
http://lists.mailscanner.info/piperm...er/078532.html

Last edited by Mr. C.; 09-30-2008 at 11:02 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TFTP server returns "Error Code 0: Permission Denied" gi99 Linux - Networking 2 04-19-2011 06:17 AM
Postfix "Relay access denied" cant send to other domain Proxx Linux - Server 6 01-11-2008 09:10 AM
postfix - Relay access denied 554 mhmfasy Linux - Networking 2 06-18-2006 08:00 PM
Postfix "554 Relay access denied" alexpopescu Linux - Software 1 10-17-2005 03:22 AM
Postfix - "Relay Access Denied" clickster Linux - Software 1 09-12-2005 04:28 PM


All times are GMT -5. The time now is 03:52 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration