Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have the following problem and scenario:

Fedora box hosting website: www.domain.com

PHP Helpdesk Script which sends email to users on submitted on that same box.

The problem is that email addresed to 'domain.com' is not leaving the server.

Email is hosted on another box.

My problem i know lies on DNS, Postfix Config or Hosts/. Attached some screen shots.

alt text

alt text

Output of postfix -n

allow_percent_hack = no
append_at_myorigin = no
append_dot_mydomain = no
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_protocols = all
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.5.5/README_FILES
relay_recipient_maps = hash:/etc/postfix/relay_recipients
sample_directory = /usr/share/doc/postfix-2.5.5/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_sasl_local_domain =
smtpd_sasl_security_options =
swap_bangpath = no
unknown_local_recipient_reject_code = 550
share|improve this question

4 Answers 4

up vote 0 down vote accepted

1st thing I always try to to rule out the MTA, by trying to send an email from the MTA machine using telnet. If that works - MTA should be troubleshooted, if it doesn't - check out MX records, RDNS and RBL listings

share|improve this answer
    
it works from command –  codex73 Aug 5 '09 at 12:36

I'll bet that Postfix on that server is setup to accept mail for domain.com, so it's getting delivered locally (or bounced, and your PHP script isn't checking and reporting errors like it should). Run postconf mydestination and if it's got domain.com in it (or whatever other domain you're trying to send mail to) you've found your answer. Edit /etc/postfix/main.cf and remove the offending entries.

share|improve this answer
    
mydestination = $myhostname, localhost.$mydomain, localhost –  codex73 Aug 4 '09 at 3:48
    
And $myhostname is what? –  womble Aug 4 '09 at 9:45
    
that is the output. hostname is www.domain.com –  codex73 Aug 5 '09 at 12:30

I'm betting womble is correct and that you've got the server configured to accept mail for domain.com. A better debug option would be to post the output of postconf -n here, as well as the actual domain & hostname. Also, run mailq to see if the mail is still sitting there in the queue. If it's not, include the output of "tail /var/log/maillog (or mail.log on Ubuntu)". Postfix assigns a randomly generated id to each message as it passes thru the system that looks thusly:

Aug  4 00:13:37 fjdx421 postfix/smtp[26029]: 930C317B539:

This makes it very easy to find the entire log output regarding an email with

grep 930C317B539 /var/log/maillog

This makes it super easy to see exactly what the system is doing with the message:

[root@fjdx421 postfix]# grep 930C317B539 /var/log/maillog
Aug  4 00:13:37 fjdx421 postfix/smtpd[26361]: 930C317B539: client=unknown[an.ip.add.ress]
Aug  4 00:13:37 fjdx421 postfix/cleanup[26024]: 930C317B539: message-id=<122424845.1249362817685.JavaMail.SYSTEM@WEB55>
Aug  4 00:13:37 fjdx421 postfix/qmgr[9519]: 930C317B539: from=<java@testing.somedomain.com>, size=4189, nrcpt=1 (queue active)
Aug  5 00:13:37 fjdx421 postfix/smtp[26029]: 930C317B539: to=<npg_error@somedomain.com>, relay=momail.somedomain.cfx[another.ip.add.ress], delay=0, status=sent (250 2.6.0  <122424845.1249362817685.JavaMail.SYSTEM@WEB55> Queued mail for delivery)
Aug  4 00:13:37 fjdx421 postfix/qmgr[9519]: 930C317B539: removed

btw...I love postfix...

share|improve this answer
    
see attached in the post. –  codex73 Aug 5 '09 at 12:27

The authoritative DNS for your domain will require an MX record in the zone file. How this is done varies depending on your provider.

The MX record identifies one or more servers which will handle mail for the domain. For further info see Wikipedia entry.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.