Postfix chroot ?

Discussion in 'Server Operation' started by knivla, Jul 12, 2007.

  1. knivla

    knivla New Member

    hi
    i have a problem how to chroot the postfix? because my postfix don't have chroot, any docs,links are appreciated.

    i need to run the mailscanner but it doesn't work, all the messages are hold to queue.

    i read this howto :Virtual Users With Postfix, PostfixAdmin, Courier, Mailscanner, ClamAV On CentOS - Page 8
    Make sure you have the chroot jail set up in /var/spool/postfix. You should be able to see etc, usr and lib directories inside /var/spool/postfix). If you haven't got the chroot jail setup already, then look in the examples directory of the Postfix documentation and you will find a script in there to set up it up for your operating system. If you can't find that, then see the "Problems or Errors" section further down this page.

    and i can't find,


    waiting for reply
    knivla :)
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/postfix/master.cf?
     
  3. knivla

    knivla New Member

    cat /etc/resolv.conf, big thanks falko, you made me linux user.

    Step by step problem
    hi falko,

    this is my problem. i fallowed the perfect Server 4.5 centos. everything works fine. i can send mail to internet and received.
    i need to setup a mailscanner and the requirements is
    sh postfix-chroot.sh enable
    and i cant find the /etc/postfix/postfix-chroot.sh, so i download the rpm postfix-2.4.3-1.rhel4.i386.rpm & installed it. now the postfix-chroot.sh appear in /etc/postfix/postfix-chroot.sh and run the chroot script


    [root@dns1 tmp]# rpm -Uvh postfix-2.4.3-1.rhel4.i386.rpm
    Preparing... ########################################### [100%]
    1ostfix ########################################### [100%]
    postfix/postfix-script: warning: /var/spool/postfix/etc/passwd and /etc/passwd differ
    warning: /usr/lib/sasl2/smtpd.conf saved as /usr/lib/sasl2/smtpd.conf.rpmsave


    and telnet. no more plain login


    [root@dns1 tmp]# telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.localdomain (127.0.0.1).
    Escape character is '^]'.
    220 dns1.domain.edu.ph ESMTP Postfix
    ehhlo locahost
    502 5.5.2 Error: command not recognized
    ehlo localhost
    250-dns1.domain.edu.ph
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN


    all i notice is plain login is missing now.

    can i install the mailscanner without using the chroot ?if will, no need to update the postfix


    waiting for reply
    knivla
    Edit/Delete Message
     
    Last edited: Jul 9, 2009
  4. falko

    falko Super Moderator Howtoforge Staff

    What's in /usr/lib/sasl2/smtpd.conf now?
    Are /etc/postfix/main.cf and /var/spool/postfix/etc/postfix/main.cf identical? If not, copy /etc/postfix/main.cf to /var/spool/postfix/etc/postfix and restart Apache.
     
  5. knivla

    knivla New Member

    What's in /usr/lib/sasl2/smtpd.conf now?

    hi falko,

    the /usr/lib/sasl2/smtpd.conf now renamed to smtpd.conf.rpmsave
    and i renamed it to smtpd.conf and telnet..still the plain login is missing...


    Are /etc/postfix/main.cf and /var/spool/postfix/etc/postfix/main.cf identical? If not, copy /etc/postfix/main.cf to /var/spool/postfix/etc/postfix and restart Apache.



    There is no /var/spool/postfix/etc/postfix/main.cf do I need to copy the all files in /etc/postfix/ or just only main.cf ?


    if still doesn't work... i will not install the mailscanner. ;)


    Thanks Falko the great
     
  6. knivla

    knivla New Member

    Postfix chroot

    Hi falko,


    i have a question, why if i install from yum install postfix the smtpd.conf appear in /usr/lib/sasl2/smtpd.conf and no chroot script

    Why if i install this rpm postfix-2.4.3-1.rhel4.i386.rpm the smtpd doesn't appear ?and does have chroot script? any idea ?


    Thanks, waiting for your reply

    knivla:)
     
  7. falko

    falko Super Moderator Howtoforge Staff

    What's in /usr/lib/sasl2/smtpd.conf?

    Copy all files from /etc/postfix to /var/spool/postfix/etc/postfix and restart Postfix.
     
  8. knivla

    knivla New Member

    smtpd.conf

    hi falko,


    [alvin@dns1 sasl2]$ cat smtpd.conf
    pwcheck_method: saslauthd
    mech_list: plain login
     
  9. falko

    falko Super Moderator Howtoforge Staff

    Looks ok.
    What's in /etc/postfix/main.cf (please strip out the comments)?
     
  10. knivla

    knivla New Member

    What's in /etc/postfix/main.cf

    hi falko,


    I'm done,

    i din't use the chroot anymore .. maybe later... and no mailscanner


    and works like a charm...


    tnx falko the great
     
    Last edited: Jul 9, 2009

Share This Page