Paramétrer OTRS pour OVH

  • Paramétrer le serveur entrant (POP, POPS, IMAP, IMAPS ..) :
    Menu Admininistrateur OTRS > Param Email > Compte Mail Postmaster

Type : POP3S
Nom Utilisateur : adresse email du compte OVH
Mot de passe : celui de ce compte
Hote : pop3.domaine.com

  • Paramétrer le serveur sortant (sendmail > SMTP) :  ls -la /usr/sbin/sendmail  (pour vérifier si lien vers ssmtp ?)
root@bravo:/etc/ssmtp# more ssmtp.conf
# Config file for sSMTP sendmail  :
# Effectuer les 2 commandes suivantes après MaJ : # chown root:mail /etc/ssmtp/ssmtp.conf  # chmod 640 /etc/ssmtp/ssmtp.conf
# Tester si OK en envoyant email avec : # echo "test" | mail -s "test smtp hitec" pjm@1ere-page.fr
#
# The person who gets all mail for userids < 1000. Make this empty to disable rewriting.
root=lan...@hitec.fr

# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=ssl0.ovh.net:587

# Where will the mail seem to come from?
rewriteDomain=hitec.fr

# The full hostname
hostname=bravo.hitec

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address / envoi les messages avec les adresses email de chaque expediteur
# NO - Use the system generated From: address
FromLineOverride=YES

# Auth User (compte mail OVH)
AuthUser=hitec@hitec.fr
AuthPass=......
  • # chown root:mail /etc/ssmtp/ssmtp.conf  
    # chmod 640 /etc/ssmtp/ssmtp.conf
  • Tester le paramétrage sendmail/smtp ci-dessus – d’abord sans OTRS : echo “test” | mail -s “test mail” pjm@1ere-page.fr
  • Réglage du Cron de OTRS : Fichier /etc/otrs/cron : de manière à ne pas avoir des tâches simultanées ?

OTRS - Fichier Cron

# Who gets the cron emails?
MAILTO="root@hitec.fr"
# delete expired cache weekly (Sunday mornings)
20 0 * * 0 otrs test -x $HOME/bin/otrs.DeleteCache.pl && $HOME/bin/otrs.DeleteCache.pl --expired > /dev/null
30 0 * * 0 otrs test -x $HOME/bin/otrs.LoaderCache.pl && $HOME/bin/otrs.LoaderCache.pl -o delete > /dev/null
# start generic agent every 10 minutes
*/10 * * * *   otrs test -x $HOME/bin/otrs.GenericAgent.pl &&  $HOME/bin/otrs.GenericAgent.pl -c db > /dev/null
# start generic agent every 20 minutes (mais décalé de 5 minutes pour ne pas s'executer en meme temps)
5,25,45 * * * * otrs test -x $HOME/bin/otrs.GenericAgent.pl && $HOME/bin/otrs.GenericAgent.pl > /dev/null
# check every 120 min the pending jobs
45 */2 * * *  otrs test -x $HOME/bin/otrs.PendingJobs.pl && $HOME/bin/otrs.PendingJobs.pl > /dev/null
# check daily the spool directory of OTRS
10 0 * * * otrs [ -x $HOME/bin/otrs.cleanup ] && $HOME/bin/otrs.cleanup > /dev/null
# fetch emails every 3 minutes
*/3 * * * * otrs $HOME/bin/otrs.PostMasterMailbox.pl > /dev/null
# just every day
01 01 * * * otrs test -x $HOME/bin/otrs.RebuildTicketIndex.pl && $HOME/bin/otrs.RebuildTicketIndex.pl > /dev/null
# delete every 120 minutes old/idle session ids
55 */2 * * * otrs test -x $HOME/bin/otrs.DeleteSessionIDs.pl && $HOME/bin/otrs.DeleteSessionIDs.pl --expired > /dev/null
t receive this file, see http://www.gnu.org/licenses/agpl.txt.
# unlock every hour old locked tickets
35 * * * * otrs test -x $HOME/bin/otrs.UnlockTickets.pl && $HOME/bin/otrs.UnlockTickets.pl --timeout > /dev/null
  • Mise en place d’un fichier .log (pour les 1ers jours…)
  1. Dans OTRS / Admin / Core:Log (fichier / nom du fichier / date)

OTRS - Fichier Log pour 1ers jours

  1. root@bravo:   more /tmp/otrs.log.2016-6   (visualiser les éventuelles erreurs …)   # grep ‘failed‘ /tmp/otrs.log*

Réf. pour OVH : https://inios.fr/recevoir-des-mails-provenant-de-son-serveur
Paramétrage SSMTP (OVH ou sinon utiliser le smtp de Google !) : https://wiki.debian.org/sSMTP
Param exemple Gmail : http://www.samba-edu.ac-versailles.fr/Configurer-l-envoi-de-courriels-derriere-Amon-avec-un-SMTP-authentifie

Post-Install : https://otrs.github.io/doc/manual/admin/stable/en/html/performance-tuning.html

Doc OTRS 5 : http://ftp.otrs.org/pub/otrs/doc/doc-admin/5.0/en/pdf/otrs_admin_book.pdf