TurnKey Linux Virtual Appliance Library

Problem sending messages with Turnkey 11.1/Joomla16 postfix server

Andy's picture

Hi there --

I completed the installation of the TurnKey 11.1/Joomla16 appliance onto one of our servers, and I am testing the postfix server. The test that I am doing involves running the following command

mail ahkaplan@partners.org < /etc/fstab && tail -f /var/log/mail.log

The e-mail does not reach the intended recipient, and the text shown below was taken from the mail.log file:

Sep  9 22:16:24 joomla16 postfix/pickup[4179]: C967E9C0FB7: uid=0 from=<root>
Sep  9 22:16:24 joomla16 postfix/cleanup[4273]: C967E9C0FB7: message-id=<20110909221624.C967E9C0FB7@localhost>
Sep  9 22:16:24 joomla16 postfix/qmgr[4180]: C967E9C0FB7: from=<root@localhost>, size=1011, nrcpt=1 (queue active)
Sep  9 22:16:24 joomla16 postfix/local[4277]: C967E9C0FB7: to=<ahkaplan@partners.org>, relay=local, delay=0.2, delays=0.12/0/0/0.08, dsn=5.1.1, status=bounced (unknown user: "ahkaplan")
Sep  9 22:16:24 joomla16 postfix/cleanup[4273]: F1B409C0FBD: message-id=<20110909221624.F1B409C0FBD@localhost>
Sep  9 22:16:25 joomla16 postfix/bounce[4278]: C967E9C0FB7: sender non-delivery notification: F1B409C0FBD
Sep  9 22:16:25 joomla16 postfix/qmgr[4180]: F1B409C0FBD: from=<>, size=2666, nrcpt=1 (queue active)
Sep  9 22:16:25 joomla16 postfix/qmgr[4180]: C967E9C0FB7: removed
Sep  9 22:16:25 joomla16 postfix/local[4277]: F1B409C0FBD: to=<root@localhost>, relay=local, delay=0.16, delays=0.08/0/0/0.09, dsn=2.0.0, status=sent (delivered to mailbox)
Sep  9 22:16:25 joomla16 postfix/qmgr[4180]: F1B409C0FBD: removed

I went through the motions of modifying the /etc/postfix/main.cf file so that the mydestination line includes the domain suffixes of my company, and the inet_interfaces line has the all option.  What other step(s) do I need to take in order get e-mail delivery working for the server?

 

Thanks.

Postfix config issue

Open file:

/etc/postfix/main.cf

Locate the line

myhostname = localhost

Alter it to your domain's FQDN like for example:

myhostname = ourclient.joomlawebsite.com

restart postfix

 

Test with simple email script:

 

<?php
$to    = 'ouremail@ourdomain.com';
$subject= 'Email Subject';
$body    = 'This is the body of the email';
$headers='From: ouremail@ourdomain.com' . "\r\n" .
'Reply-To: ouremail' . "\r\n" .
'X-Mailer: itoctopus!';
$mail_sent = mail($to, $subject, $body, $headers);
if ($mail_sent)
    echo('Email sent');
else
    echo('Email not sent');
?>

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)