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 http://www.hyperxr.com/1.png

alt text http://www.hyperxr.com/2.png

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

4 Answers 4


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

  • it works from command
    – codex73
    Aug 5, 2009 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.

  • mydestination = $myhostname, localhost.$mydomain, localhost
    – codex73
    Aug 4, 2009 at 3:48
  • And $myhostname is what?
    – womble
    Aug 4, 2009 at 9:45
  • that is the output. hostname is www.domain.com
    – codex73
    Aug 5, 2009 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=<[email protected]>, size=4189, nrcpt=1 (queue active)
Aug  5 00:13:37 fjdx421 postfix/smtp[26029]: 930C317B539: to=<[email protected]>, 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...

  • see attached in the post.
    – codex73
    Aug 5, 2009 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .