Postfix installation and configuration problem

Discussion in 'Server Operation' started by kdomrose, Sep 18, 2008.

  1. kdomrose

    kdomrose New Member

    RESOLVED Postfix installation and configuration problem

    Greetings,

    I am hoping someone might be able to help out here, or get me going in the right direction.

    I am attempting to setup a mail server and it is kicking my arse. :p

    Been trying now for about 2 weeks..

    I have Ubuntu 8.04 for an os

    I have installed LAMP server and SSH

    I have been following several different how to guides... I have reinstalled Linux between attempts so i always started out fresh.

    The latest guide I have tried is this one http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-ubuntu8.04-p4

    I really would like the virtual users and domains thing...

    I believe I have followed the guide but somewhere something is wrong.

    When I attempt to telnet to the localhost 25 to test postfix I get the following


    root@tweety:/home/centechadmin# telnet mail.centechcomputers.com 25 Trying 65.15.185.110...
    Connected to centechcomputers.com.
    Escape character is '^]'.
    Connection closed by foreign host.
    root@tweety:/home/centechadmin#

    The pop3 seems to be working fine

    My postfix/main.cf file is as follows

    myhostname = mail.centechcomputers.com
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu/GNU)
    biff = no
    append_dot_mydomain = no
    myorigin = centechcomputers.com
    mydestination = %myhostname, localhost, localhost.localdomain
    mynetworks = 127.0.0.1/8
    recipient_delimiter = +
    inet_interfaces = all
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domain $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    readme_directory = /usr/share/doc/postfix
    html_directory = /usr/share/doc/postfix/html
    mydestination = mail.centechcomputers.com, localhost, localhost.localdomain
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /home/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enabled = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_use_tls = yes
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_create_maildirsize = yes
    virtual_mailbox_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings

    anyone see anything obvious????

    Thanks in advance for any advice.

    Karl
     
    Last edited: Sep 19, 2008
  2. kdomrose

    kdomrose New Member

    Making progress...

    Ok..I found an error in my main.cf file.... had 127.0.0.1/8 instead of 127.0.0.0/8

    Now I can at least get some output from the telnet session. I and still not getting the correct output....Not giving me the 250-AUTH LOGIN PLAIN

    Will keep digging..

    Karl
     
  3. kdomrose

    kdomrose New Member

    The plot thickens...

    Ok...I discovered that I totally missed creating one of the MySQL tables needed...DOAH!!!!!

    I created it and now when I send a test email to the server it gets rejected with relaying is denied error

    I sent the email from an external account.

    The error was in a bounce message i got back.

    Failed to deliver to '[email protected]'
    SMTP module(domain centechcomputers.com) reports:
    host mail.centechcomputers.com says:
    554 5.7.1 <[email protected]>: Relay access denied

    Now I don't know where to look to figure this one out.....

    Here is from the mail log

    Sep 18 17:29:41 tweety postfix/smtpd[5926]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
    Sep 18 17:29:41 tweety postfix/smtpd[5926]: connect from mail.easycgi.com[66.245.177.160]
    Sep 18 17:29:42 tweety postfix/smtpd[5926]: NOQUEUE: reject: RCPT from mail.easycgi.com[66.245.177.160]: 554 5.7.1 <[email protected]>: Relay access denied; fro$
    Sep 18 17:29:42 tweety postfix/smtpd[5926]: disconnect from mail.easycgi.com[66.245.177.160]
    Sep 18 17:33:02 tweety postfix/anvil[5928]: statistics: max connection rate 1/60s for (smtp:66.245.177.160) at Sep 18 17:29:41
    Sep 18 17:33:02 tweety postfix/anvil[5928]: statistics: max connection count 1 for (smtp:66.245.177.160) at Sep 18 17:29:41
    Sep 18 17:33:02 tweety postfix/anvil[5928]: statistics: max cache size 1 at Sep 18 17:29:41
    Sep 18 17:34:32 tweety postfix/qmgr[5654]: AAFD32E1B7: from=<[email protected]>, size=982, nrcpt=1 (queue active)
    Sep 18 17:34:32 tweety postfix/smtp[5934]: AAFD32E1B7: to=<[email protected]>, orig_to=<postmaster>, relay=none, delay=960, delays=959/0.05/0.21/0, dsn=5.4.6, sta$
    Sep 18 17:34:32 tweety postfix/bounce[5935]: warning: AAFD32E1B7: undeliverable postmaster notification discarded
    Sep 18 17:34:32 tweety postfix/qmgr[5654]: AAFD32E1B7: removed



    Karl
     
    Last edited: Sep 19, 2008
  4. kdomrose

    kdomrose New Member

    can now send emails...

    I got the darn thing to send out an email my changing mynetworks parameter.

    I didn't think I needed to add my ip range into it as I had setup for virtual users and domains.... Kinda going to stink when one of us travels and is on a different ip scheme... any suggestions??? I really DON'T want to restrict ip ranges...I am willing to rely on password login to keep people from relaying...Can this be done????

    On another note..I still can not receive mail...It seems to get delivered into the que...and then goes away it seems...not able to get it...

    karl
     
  5. kdomrose

    kdomrose New Member

    almost working

    OK...

    I installed Squirrelmail and it is working fine...

    I can send and receive mail using Squirrelmail fine.

    I can not pull mail that is sent to the server using Mozilla Thunderbird on another computer.

    Example...

    I go into Thunderbird and send a message from an account on my new mail server it is delivered fine. If I send mail to the account on my mail server I can not retrieve it with Thunderbird. If I login to Squirrelmail then it is sitting there in the inbox..So the mail is moving....I just can't pull it from a remote machine.....

    Suggestions??? Would this be a setting in the Postfix/Main.cf???

    Karl
     
  6. mn1988

    mn1988 New Member

    Postfix basic installation

    Hi.. I am na newbie. Need some help. Here's the issue

    I Have : Fedora core 7 virtual image with default MTA sendmail
    Want to : Replace sendmail with Postfix.
    Tried :
    1. Disabled SElinux
    2. Used Linux RPM - yum install Postfix
    3. Switched from sendmail to postfix using system-switch-mail
    4. main.cf parameters-
    myhostname=machinename.domainname
    mydomain=domainname
    inet_interfaces=all

    Problem :mail command is not working as it did for sendmail

    Will be grateful for any help.
    Thanks.
     
  7. falko

    falko Super Moderator Howtoforge Staff

    You must enable "Server requires authentication" in your email client.

    Are there any errors in /var/log/mail.log?
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Please open a new thread.
     
  9. kdomrose

    kdomrose New Member

    log output

    Falco,

    Thanks for the assist..

    I turned on server authentication in email client..I should have thought of that...

    sad to report that makes no difference... The client says it connects and just sits there...never pulls email..

    Here is the tail of the mail log

    Sep 19 12:15:11 tweety postfix/smtp[5147]: 120CC2E1B3: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=13, delays=0.38/0/0.02/12,$
    Sep 19 12:15:11 tweety postfix/qmgr[4949]: 120CC2E1B3: removed
    Sep 19 12:15:11 tweety postfix/virtual[5170]: 6D52D2E295: to=<[email protected]>, relay=virtual, delay=0.31, delays=0.11/0.05/0/0.14, dsn=2.0.0, $
    Sep 19 12:15:11 tweety postfix/qmgr[4949]: 6D52D2E295: removed
    Sep 19 12:17:00 tweety pop3d: Disconnected, ip=[::ffff:65.15.185.108]
    Sep 19 12:17:09 tweety pop3d: Connection, ip=[::ffff:65.15.185.108]
    Sep 19 12:18:19 tweety postfix/anvil[5159]: statistics: max connection rate 1/60s for (smtp:66.245.177.160) at Sep 19 12:14:58
    Sep 19 12:18:19 tweety postfix/anvil[5159]: statistics: max connection count 1 for (smtp:66.245.177.160) at Sep 19 12:14:58
    Sep 19 12:18:19 tweety postfix/anvil[5159]: statistics: max cache size 1 at Sep 19 12:14:58
    Sep 19 12:20:58 tweety pop3d: Disconnected, ip=[::ffff:65.15.185.108]
    Sep 19 12:21:06 tweety pop3d: Connection, ip=[::ffff:65.15.185.108]

    It seems to connect then disconnect....To be fair I am NOT the worlds greatest at figuring out what logs are telling you...

    I also broke my Squirrelmail install somehow playing around...Back to square one on that...

    Any ideas on this POP thing???

    Karl
     
  10. kdomrose

    kdomrose New Member

    fixed squirrelmail

    got it fixed...just a setting in the config file for squirrelmail.

    Now back after the postfix issue...

    Karl
     
  11. kdomrose

    kdomrose New Member

    Resolved

    Got is all working now!!

    Dumbass I was..I checked server needs authentication and never checked SSL

    all good now..Thanks for the assist!!!

    Karl
     

Share This Page