LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-12-2010, 10:21 AM   #1
novice32
LQ Newbie
 
Registered: Apr 2010
Posts: 8

Rep: Reputation: 0
Setup Postfix as Null Client (CentOS)


Hey everyone..I really need your help.. I setup postfix as a null client on my VPS to send only automated, outbound emails. I also have Google App mail for the domain (for sending receiving personalized emails), however, I receive the following in Gmail for emails sent by from Postfix. The destination email address are correct (tried a few of my personal email addresses). I once got Postfix to work, but no longer the case.

---------------------------------------------
host ASPMX.L.GOOGLE.com[209.85.223.16] said:
550-5.1.1 The email account that you tried to reach does not exist. Please
try 550-5.1.1 double-checking the recipient's email address for typos or
550-5.1.1 unnecessary spaces. Learn more at
550 5.1.1

------------------------------------------------
*** where you see EXAMPLE.com, my real domain is used.

"postconf -n" outputs

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
html_directory = no
inet_interfaces = loopback-only
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = example.com
myhostname = mail.example.com
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
relayhost = $mydomain
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

--------------------------------------------------------------
According to POSTFIX, a null client setup should follow:

1 /etc/postfix/main.cf:
2 myorigin = $mydomain
3 relayhost = $mydomain
4 inet_interfaces = loopback-only
5 local_transport = error:local delivery is disabled
6
7 /etc/postfix/master.cf:
8 Comment out the local delivery agent entry

---------------------------------------------------------------

Furthermore, I have DNS "A" record for mail.example.com that points to my IP address. My IP address is also listed in the SPF record.

WHAT AM I DOING WRONG?
 
Old 04-12-2010, 04:28 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
What do your mail logs say?
 
Old 04-13-2010, 04:21 PM   #3
novice32
LQ Newbie
 
Registered: Apr 2010
Posts: 8

Original Poster
Rep: Reputation: 0
It says basically the same as google:
----------------------------------------
Apr 11 23:46:59 hostname postfix/smtp[17965]: 5C3961D84B5: to=<user@domain.com>, relay=ASPMX.L.GOOGLE.com[209.85.223.16]:25, delay=3.3, delays=0.02/0.01/0.23/3, dsn=5.1.1, status=bounced (host ASPMX.L.GOOGLE.com[209.85.223.16] said: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 http://mail.google.com/support/bin/a...py?answer=6596 15si15905946iwn.6 (in reply to RCPT TO command))
---------------------------------------
The same reject occurred for another user and a few personal accounts I have.

I dabbled with the settings, and Postfix is now working. "relayhost = $mydomain" is no longer set in the latest settings. Could that be the cause? According to the guide, relayhost is supposed to be set. Here's the latest config output:

[root@hostname log]# postconf -n
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
html_directory = no
inet_interfaces = loopback-only
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = example.com
myhostname = mail.example.com
myorigin = $mydomain
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
unknown_local_recipient_reject_code = 550
 
Old 04-15-2010, 06:09 PM   #4
novice32
LQ Newbie
 
Registered: Apr 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Just wondering if anyone could confirm if "relayhost = $mydomain" should have made a difference, especially if not what was recommended.
 
  


Reply



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
How to setup reverse dns check in Postfix ( CENTOS 5 ) ? dlugasx Linux - Server 1 11-04-2009 07:51 AM
How to setup ASSP-1.5.x + Postfix in Redhat Linux 5.2 or Centos? abhandari Red Hat 1 08-20-2009 09:25 PM
How to setup mysql and saslauthd with postfix (CentOS 5.3) Guardian-Mage Linux - Server 10 04-21-2009 06:05 AM
Mrepo Client Setup for RHLES 5 and Centos 5 mzizana Linux - Server 0 01-21-2008 07:45 AM
postfix config as null client webwiznz Linux - Networking 0 05-31-2004 07:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:00 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration