Request Tracker Installation on Ubuntu Server w/ Gmail Facility

Discussion in 'Suggest HOWTO' started by ciesel, Aug 25, 2010.

  1. ciesel

    ciesel New Member

    I'm a complete noob at linux and after slaving away at this for over 2 weeks. My vps host must really hate me, I must've deleted my ubuntu image over 15 times. trying to get it down just right, using only the essential commands. I finally have all the commands needed to start up an RT server with working email facility for google apps / gmail from a fresh install of Ubuntu 10.04 LTS Server. This guide is nearly identical to the guide at http://wiki.bestpractical.com/view/WithEmailFacility, but includes specifics for postfix and fetchmail.

    I hope this helps others.

    For Nano you can use vim, but i dont know how to use vim. =X

    # apt-get update
    # apt-get upgrade
    # tasksel install lamp-server
    give mysql password (write this down)
    # tasksel install mail-server
    ( i didn't install openssh server, as my virtual private host already had it, you may have to install it and i'm sorry i can't help you there. choose internet site in the pop up and then enter in your mail server name.(actually just put in your site domain name)

    # nano /etc/postfix/sasl_passwd
    gmail-smtp.l.google.com email@gmail.com:password
    # (save ctrl+x then y)

    # postmap hash:/etc/postfix/sasl_passwd
    # cp /etc/postfix/main.cf /etc/postfix/main.cf.old
    # nano /etc/postfix/main.cf
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_option =
    smtp_tls_security_level = may
    relayhost = smtp.gmail.com:587
    # (save ctrl+x then y)

    # /etc/init.d/postfix restart or service postfix restart
    # mail youremail@gmail.com
    # Subject: fill in
    # fill in
    # . (end the email with a period followed by enter)
    # Cc: (you can CC an another email or just press enter)
    # cat /var/log/mail.log | tail (ctrl+c to exit log)
    (you should receive an email to email address above)
    # apt-get install rt3.8-apache2 rt3.8-clients rt3.8-db-mysql request- tracker3.8 fetchmail
    (enter in your mysql password that you created earlier, then pick the RT database user password, confirm database user password. you should write this down, but it should autoconfigure into RT_SiteConfig.pm
    # cp /etc/request-tracker3.8/RT_SiteConfig.pm /etc/request-tracker3.8/RT_SiteConfig.pm.old
    # nano /etc/request-tracker3.8/RT_SiteConfig.pm
    Comment out Set($CorrespondAddress...
    Comment out Set($CommentAddress...
    (you comment out by placing a # at the beginning of the line)
    add
    Set($MaxAttachmentSize , 10000000);
    Set($FriendlyFromLineFormat, "\"%s\" <%s>");
    # (save ctrl+x then y)
    # nano /etc/apache2/apache2.conf
    (at the very bottom add)
    ServerName rt
    # (save ctrl+x then y)
    # nano /etc/apache2/sites-available/default
    (above </VirtualHost> add)
    Include /etc/request-tracker3.8/apache2-modperl2.conf
    RedirectMatch ^/$ /rt
    # (save ctrl+x then y)
    # a2enmod rewrite
    # service apache2 restart
    Now, goto your website URL or IP
    Login with root:password
    Navigate to Configuration | Global | Group rights
    Find "everyone" in system groups and grant the rights of:
    CommentOnTicket, ReplyToTicket, and CreateTicket
    Then Navigate to Configuration | Queues | General
    Set the reply and comment address to youremail@gmail.com
    Also change your root password in preferences | about me
    Go back to the server shell
    # nano /etc/default/fetchmail
    (change START_DAEMON=no to)
    START_DAEMON=yes
    # (save ctrl+x then y)
    # nano /etc/fetchmailrc
    set daemon 300
    set invisible
    set no bouncemail
    set no syslog
    set logfile /var/log/fetchmail.log
    poll imap.gmail.com protocol imap username "youremail@gmail.com" password "emailpassword" ssl mda "/usr/bin/rt-mailgate --queue General --url http://localhost/rt/" keep
    # touch /var/log/fetchmail.log
    # chown fetchmail /var/log/fetchmail.log
    # service fetchmail restart
    (send a test email too email@domain.com listed after poll)
    # tail -f /var/log/fetchmail.log
    if all is working, go back and edit /etc/fetchmailrc and comment out set logfile /var/log/fetchmail.log
    # chown root:root /etc/postfix/sasl_passwd
    # chmod 0600 /etc/postfix/sasl_passwd

    Links thats helped me:
    http://wiki.bestpractical.com/view/WithEmailFacility
    http://serverfault.com/questions/11...elay-emails-gmail-smtp-gmail-com-via-port-587
    http://www.felipe-alfaro.org/blog/2009/05/10/have-postfix-relay-e-mail-to-gmail/
    http://www.gossamer-threads.com/lists/rt/users/94330
     

Share This Page