postfix on LAMP setup with fc6

Discussion in 'HOWTO-Related Questions' started by m61, Nov 23, 2006.

  1. m61

    m61 New Member

    i followed the LAMP set up for FC6 and everything installed fine [no errors or anything], but i did not install ISPconfig, and now whenever i try to send an email to my email server, it gets returned with the error message as "relaying denied", any help would be muchly appreciated
     
  2. falko

    falko Super Moderator Howtoforge Staff

  3. m61

    m61 New Member

    did that, and i still get the "relaying denied" error
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Please post the exact error message here. What's in /etc/postfix/main.cf (please strip out the comments)?
     
  5. m61

    m61 New Member

    main.cf
    Code:
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/libexec/postfix
    mail_owner = postfix
    inet_interfaces = all
    mydestination = /etc/postfix/local-host-names
    unknown_local_recipient_reject_code = 550
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    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
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    mynetworks = [URL="http://127.0.0.0/8"]127.0.0.0/8[/URL]
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtpd_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    home_mailbox = Maildir/
    mailbox_command =
    relay_domains_reject_code = 572
    virtual_maps = hash:/etc/postfix/virtusertable
    
    error message:
    Code:
    Nov 27 07:25:25 www1 postfix/smtpd[6103]: connect from shawidc-mo1.cg.shawcable.net[24.71.223.10]
    Nov 27 07:25:25 www1 postfix/smtpd[6103]: 6010A4E15FB: client=shawidc-mo1.cg.shawcable.net[24.71.223.10]
    Nov 27 07:25:25 www1 postfix/cleanup[6107]: 6010A4E15FB: message-id=<[EMAIL="[email protected]"][email protected][/EMAIL]>
    Nov 27 07:25:25 www1 postfix/qmgr[6236]: 6010A4E15FB: from=<[EMAIL="[email protected]"][email protected][/EMAIL]>, size=1378, nrcpt=1 (queue active)
    Nov 27 07:25:25 www1 postfix/smtpd[6103]: disconnect from shawidc-mo1.cg.shawcable.net[24.71.223.10]
    Nov 27 07:25:25 www1 postfix/smtpd[6103]: connect from S0106000f3d5c1bc9.ok.shawcable.net[24.71.95.166]
    Nov 27 07:25:25 www1 postfix/smtp[6108]: warning: host mail.hitmenforhire.com[24.71.95.166]:25 greeted me with my own hostname www1.hitmenforhire.com
    Nov 27 07:25:25 www1 postfix/smtp[6108]: warning: host mail.hitmenforhire.com[24.71.95.166]:25 replied to HELO/EHLO with my own hostname www1.hitmenforhire.com
    Nov 27 07:25:25 www1 postfix/smtp[6108]: 6010A4E15FB: to=<[EMAIL="[email protected]"][email protected][/EMAIL]>, orig_to=<[EMAIL="[email protected]"][email protected][/EMAIL]>, relay=mail.hitmenforhire.com[24.71.95.166]:25, delay=0.34, delays=0.07/0.02/0.26/0, dsn=5.4.6, status=bounced (mail for www1.hitmenforhire.com loops back to myself)
    Nov 27 07:25:25 www1 postfix/smtpd[6103]: disconnect from S0106000f3d5c1bc9.ok.shawcable.net[24.71.95.166]
    Nov 27 07:25:25 www1 postfix/cleanup[6107]: B93D74E1600: message-id=<[EMAIL="[email protected]"][email protected][/EMAIL]>
    Nov 27 07:25:25 www1 postfix/qmgr[6236]: B93D74E1600: from=<>, size=3333, nrcpt=1 (queue active)
    Nov 27 07:25:25 www1 postfix/bounce[6110]: 6010A4E15FB: sender non-delivery notification: B93D74E1600
    Nov 27 07:25:25 www1 postfix/qmgr[6236]: 6010A4E15FB: removed
    Nov 27 07:25:32 www1 postfix/smtp[6111]: B93D74E1600: to=<[EMAIL="[email protected]"][email protected][/EMAIL]>, relay=idcmail.shaw.ca[64.59.134.8]:25, delay=6.5, delays=0.01/0.02/5.9/0.55, dsn=2.5.0, status=sent (250 2.5.0 Ok.)
    Nov 27 07:25:32 www1 postfix/qmgr[6236]: B93D74E1600: removed
    
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Please add www1.hitmenforhire.com to /etc/postfix/local-host-names and restart Postfix.
     
  7. m61

    m61 New Member

    did that and it still doesn't work, thunderbird keeps comming back saying "An error occured while sending the mail. The mail server responded: 5.7.1 <[email protected]>... Relyaing denied. Please verify that your email address is correct in your mail preferences and try again"

    and there is nothing in the mail log so it doesn't even seem it gets that far
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Also make sure that hitmenforhire.com is listed in /etc/postfix/local-host-names.
     
  9. m61

    m61 New Member

    it is, here is local-host-names
    Code:
    localhost
    www1.hitmenforhire.com
    hitenforhire.com
    localhost.hitmenforhire.com
    localhost.www1.hitmenforhire.com
    
     
  10. falko

    falko Super Moderator Howtoforge Staff

    I only see
    www1.hitmenforhire.com
    hitenforhire.com

    but not hitmenforhire.com...
     
  11. m61

    m61 New Member

    oh boy, if all this was was a type-o, i will cry :eek:
     
  12. m61

    m61 New Member

    well, after a hard drive crash, and then a reinstall on a fresh drive, email is working perfectly, thanks!
     
  13. m61

    m61 New Member

    ok, after a few days of running i have noticed one thing with the emails, all the automated emails that get sent, do not actually get sent, they get stuck in the mail queue and eventually when they do get delivered they are appeneded to another email [that is titled 'Warning: could not send message for the past 4 hours']

    and i believe the problem is that all the email is [by default] being sent to the root account, and i know with sendmail you can add a new alias to have all root email sent to a user account [which i have done and run the 'newalias' command] and yet all root email does not get forwarded. does this work the same in postfix? or would i have to add a line in the virtusertable file?
     
  14. falko

    falko Super Moderator Howtoforge Staff

    It works exactly the same with Postfix.
     

Share This Page