OVH Community, votre nouvel espace communautaire.

Changement du hostname


Isendel
21/04/2015, 19h08
Quelques infos complémentaires, je gratte je gratte...

telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 reverse.mondomaine.org ESMTP Postfix

puis plus rien ça coince...

Et quand je tente un :
[root@reverse ~]#echo test | /usr/sbin/sendmail -f root root
[root@reverse ~]# tail -f /var/log/maillog
Apr 21 18:55:06 reverse postfix/pickup[8238]: CEBA411C2D4: uid=0 from=
Apr 21 18:55:06 reverse postfix/cleanup[8321]: CEBA411C2D4: message-id=<20150421165506.CEBA411C2D4@reverse.mondomaine.org>
Apr 21 18:55:06 reverse opendkim[5596]: CEBA411C2D4: no signing table match for 'postmaster@vps....ovh.net' => encore VPS ?!?
Apr 21 18:55:06 reverse opendkim[5596]: CEBA411C2D4: no signature data
Apr 21 18:55:06 reverse postfix/qmgr[8239]: CEBA411C2D4: from=<postmaster@vps....ovh.net>, size=335, nrcpt=1 (queue active)
Apr 21 18:55:06 reverse postfix/trivial-rewrite[8322]: warning: do not list domain reverse.mondomaine.org in BOTH mydestination and virtual_mailbox_domains
Apr 21 18:55:06 reverse postfix/cleanup[8321]: D6AEE11C2CD: message-id=<20150421165506.CEBA411C2D4@reverse.mondomaine. org>
Apr 21 18:55:06 reverse postfix/qmgr[8239]: D6AEE11C2CD: from=<postmaster@vps....ovh.net>, size=472, nrcpt=1 (queue active)
Apr 21 18:55:06 reverse postfix/local[8329]: CEBA411C2D4: to=<root@reverse.mondomaine.org>, orig_to=, relay=local, delay=0.06, delays=0.04/0.01/0/0.01, dsn=2.0.0, status=sent (forwarded as D6AEE11C2CD)
Apr 21 18:55:06 reverse postfix/qmgr[8239]: CEBA411C2D4: removed
Apr 21 18:55:06 reverse postfix/error[8263]: D6AEE11C2CD: to=, orig_to=, relay=none, delay=0.01, delays=0.01/0/0/0.01, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with mx0.ovh.net[213.186.33.32] while receiving the initial server greeting)
Apr 21 18:55:46 reverse postfix/smtpd[8339]: connect from unknown[unknown]
Apr 21 18:55:46 reverse postfix/smtpd[8339]: lost connection after CONNECT from unknown[unknown]
Apr 21 18:55:46 reverse postfix/smtpd[8339]: disconnect from unknown[unknown]
A la base je voulais changer le hostname car quand j'écrivais d'un mail vers lui-même j'avais cette erreur du MX d'ovh : status=deferred (delivery temporarily suspended: lost connection with mx0.ovh.net[213.186.33.32] while receiving the initial server greeting

Depuis que j'ai changé le hostname j'ai cette erreur sur tous les emails.

Je piétine, dois-je creuser du côté de mydestination et virtual_mailbox_domains ?

Merci à quiconque pourrait aider.

Isendel
21/04/2015, 18h31
Deux mois plus tard, j'ai enfin pris le temps de tester tout cela ^^

J'ai créé sur le vps un domaine du type mondomaine.org et j'ai créé un reverse dans le bind du domaine avec reverse.mondomaine.org qui pointe vers l'ip du serveur.

Alors j'ai dû modifier quelques fichiers supplémentaires dans lesquels j'ai trouvé référence du nom du serveur :
/etc/hostname
/etc/mailname
/etc/postfix/main.cf
/etc/hosts
/etc/sysconfig/network

Mais je pense qu'il en manque encore, d'ailleurs dans mes logs certains mails tentent encore de partir de postmaster@vps...ovh.net

D'ailleurs plus aucun mail ne part et j'ai des choses très space dans les logs.

Apr 21 18:26:20 reverse postfix/smtpd[5226]: disconnect from localhost.localdomain[127.0.0.1]
Apr 21 18:26:22 reverse amavis[5583]: starting. /usr/sbin/amavisd at reverse.mondomaine.org amavisd-new-2.8.0 (20120630), Unicode aware, LANG="fr_FR.UTF-8"
Apr 21 18:26:22 reverse amavis[5584]: Net::Server: Group Not Defined. Defaulting to EGID '496 496'
Apr 21 18:26:22 reverse amavis[5584]: Net::Server: User Not Defined. Defaulting to EUID '497'
Apr 21 18:26:22 reverse amavis[5584]: Net::Server: Group Not Defined. Defaulting to EGID '496 496'
Apr 21 18:26:22 reverse amavis[5584]: Net::Server: User Not Defined. Defaulting to EUID '497'
Apr 21 18:26:22 reverse amavis[5584]: Module Amavis::Conf 2.316
Apr 21 18:26:22 reverse amavis[5584]: Module Archive::Zip 1.30
Apr 21 18:26:22 reverse amavis[5584]: Module BerkeleyDB 0.43
Apr 21 18:26:22 reverse amavis[5584]: Module Compress::Zlib 2.021
Apr 21 18:26:22 reverse amavis[5584]: Module Convert::TNEF 0.17
Apr 21 18:26:22 reverse amavis[5584]: Module Convert::UUlib 1.4
Apr 21 18:26:22 reverse amavis[5584]: Module Crypt::OpenSSL::RSA 0.25
Apr 21 18:26:22 reverse amavis[5584]: Module DBD::mysql 4.013
Apr 21 18:26:22 reverse amavis[5584]: Module DBI 1.609
Apr 21 18:26:22 reverse amavis[5584]: Module DB_File 1.82
Apr 21 18:26:22 reverse amavis[5584]: Module Digest::MD5 2.39
Apr 21 18:26:22 reverse amavis[5584]: Module Digest::SHA 5.47
Apr 21 18:26:22 reverse amavis[5584]: Module Encode 2.35
Apr 21 18:26:22 reverse amavis[5584]: Module File::Temp 0.22
Apr 21 18:26:22 reverse amavis[5584]: Module IO::Socket::INET6 2.56
Apr 21 18:26:22 reverse amavis[5584]: Module MIME::Entity 5.427
Apr 21 18:26:22 reverse amavis[5584]: Module MIME::Parser 5.427
Apr 21 18:26:22 reverse amavis[5584]: Module MIME::Tools 5.427
Apr 21 18:26:22 reverse amavis[5584]: Module Mail:KIM::Signer 0.37
Apr 21 18:26:22 reverse amavis[5584]: Module Mail:KIM::Verifier 0.37
Apr 21 18:26:22 reverse amavis[5584]: Module Mail::Header 2.04
Apr 21 18:26:22 reverse amavis[5584]: Module Mail::Internet 2.04
Apr 21 18:26:22 reverse amavis[5584]: Module Mail::SPF v2.008
Apr 21 18:26:22 reverse amavis[5584]: Module Mail::SpamAssassin 3.003001
Apr 21 18:26:22 reverse amavis[5584]: Module Net:NS 0.65
Apr 21 18:26:22 reverse amavis[5584]: Module Net::Server 2.007
Apr 21 18:26:22 reverse amavis[5584]: Module NetAddr::IP 4.027
Apr 21 18:26:22 reverse amavis[5584]: Module Razor2::Client::Version 2.84
Apr 21 18:26:22 reverse amavis[5584]: Module Scalar::Util 1.21
Apr 21 18:26:22 reverse amavis[5584]: Module Socket 1.82
Apr 21 18:26:22 reverse amavis[5584]: Module Socket6 0.23
Apr 21 18:26:22 reverse amavis[5584]: Module Time::HiRes 1.9721
Apr 21 18:26:22 reverse amavis[5584]: Module URI 1.40
Apr 21 18:26:22 reverse amavis[5584]: Module Unix::Syslog 1.1
Apr 21 18:26:22 reverse amavis[5584]: Amavis::ZMQ code NOT loaded
Apr 21 18:26:22 reverse amavis[5584]: Amavis:B code loaded
Apr 21 18:26:22 reverse amavis[5584]: SQL base code loaded
Apr 21 18:26:22 reverse amavis[5584]: SQL::Log code NOT loaded
Apr 21 18:26:22 reverse amavis[5584]: SQL::Quarantine NOT loaded
Apr 21 18:26:22 reverse amavis[5584]: Lookup::SQL code loaded
Apr 21 18:26:22 reverse amavis[5584]: Lookup::LDAP code NOT loaded
Apr 21 18:26:22 reverse amavis[5584]: AM.PDP-in proto code loaded
Apr 21 18:26:22 reverse amavis[5584]: SMTP-in proto code loaded
Apr 21 18:26:22 reverse amavis[5584]: Courier proto code NOT loaded
Apr 21 18:26:22 reverse amavis[5584]: SMTP-out proto code loaded
Apr 21 18:26:22 reverse amavis[5584]: Pipe-out proto code NOT loaded
Apr 21 18:26:22 reverse amavis[5584]: BSMTP-out proto code NOT loaded
Apr 21 18:26:22 reverse amavis[5584]: Local-out proto code loaded
Apr 21 18:26:22 reverse amavis[5584]: OS_Fingerprint code NOT loaded
Apr 21 18:26:22 reverse amavis[5584]: ANTI-VIRUS code loaded
Apr 21 18:26:22 reverse amavis[5584]: ANTI-SPAM code loaded
Apr 21 18:26:22 reverse amavis[5584]: ANTI-SPAM-EXT code NOT loaded
Apr 21 18:26:22 reverse amavis[5584]: ANTI-SPAM-C code NOT loaded
Apr 21 18:26:22 reverse amavis[5584]: ANTI-SPAM-SA code loaded
Apr 21 18:26:22 reverse amavis[5584]: Unpackers code loaded
Apr 21 18:26:22 reverse amavis[5584]: DKIM code loaded
Apr 21 18:26:22 reverse amavis[5584]: Unpackers code loaded
Apr 21 18:26:22 reverse amavis[5584]: DKIM code loaded
Apr 21 18:26:22 reverse amavis[5584]: Tools code NOT loaded
Apr 21 18:26:22 reverse amavis[5584]: Found $file at /usr/bin/file
Apr 21 18:26:22 reverse amavis[5584]: Found $altermime at /usr/bin/altermime
Apr 21 18:26:22 reverse amavis[5584]: Internal decoder for .mail
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .F at /usr/bin/unfreeze
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .Z at /usr/bin/gzip -d
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .gz at /usr/bin/gzip -d
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .bz2 at /usr/bin/bzip2 -d
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .xz at /usr/bin/xzdec
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .lzma at /usr/bin/lzmadec
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .lrz at /usr/bin/lrzip -q -k -d -o -
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .lzo at /usr/bin/lzop -d
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .rpm at /usr/bin/rpm2cpio
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .cpio at /bin/cpio
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .tar at /bin/cpio
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .deb at /usr/bin/ar
Apr 21 18:26:22 reverse amavis[5584]: No ext program for .rar, tried: unrar, rar
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .arj at /usr/bin/unarj
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .arc at /usr/bin/nomarch
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .zoo at /usr/bin/unzoo
Apr 21 18:26:22 reverse amavis[5584]: No ext program for .doc, tried: ripole
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .cab at /usr/bin/cabextract
Apr 21 18:26:22 reverse amavis[5584]: No ext program for .tnef, tried: tnef
Apr 21 18:26:22 reverse amavis[5584]: Internal decoder for .tnef
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .zip at /usr/bin/7za
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .kmz at /usr/bin/7za
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .7z at /usr/bin/7za
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .jar at /usr/bin/7z
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .rar at /usr/bin/7z
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .swf at /usr/bin/7z
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .lha at /usr/bin/7z
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .iso at /usr/bin/7z
Apr 21 18:26:22 reverse amavis[5584]: Found decoder for .exe at /usr/bin/unarj
Apr 21 18:26:22 reverse amavis[5584]: No decoder for .doc
Apr 21 18:26:22 reverse amavis[5584]: Using primary internal av scanner code for ClamAV-clamd
Apr 21 18:26:22 reverse amavis[5584]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
Apr 21 18:26:22 reverse amavis[5584]: Deleting db files snmp.db,__db.002,__db.004,nanny.db,__db.003,__db.0 01 in /var/spool/amavisd/db
Apr 21 18:26:22 reverse amavis[5584]: Creating db in /var/spool/amavisd/db/; BerkeleyDB 0.43, libdb 4.7
Apr 21 18:26:23 reverse opendkim[5596]: OpenDKIM Filter v2.10.1 starting (args: -x /etc/opendkim.conf -P /var/run/opendkim/opendkim.pid)
Apr 21 18:26:32 reverse postfix/postfix-script[6235]: stopping the Postfix mail system
Apr 21 18:26:32 reverse postfix/master[3359]: terminating on signal 15
Apr 21 18:26:32 reverse postfix/postfix-script[6308]: starting the Postfix mail system
Apr 21 18:26:32 reverse postfix/master[6309]: daemon started -- version 2.6.6, configuration /etc/postfix
Any idea ?

Isendel
27/02/2015, 19h29
Merci bien je vais tester tout cela.

shirokoweb
27/02/2015, 15h47
Editer le fichier network :

Code:
nano /etc/sysconfig/network
ajouter :
Code:
HOSTNAME=nomduserveur.nomdudomaine.tld
enregistrer (CTRL+O) > fermer (CTRL+W)

Editer le fichier hosts :

Code:
nano /etc/hosts
ajouter :
Code:
ip.du.serveur.123 [Tabulation] nomduserveur.nomdudomaine.tld [Tabulation] hostname 
Ce qui est en italique est optionnel
enregistrer (CTRL+O) > fermer (CTRL+W)

Vérifier que les modifications ont bien été prises en compte en saisissant la commande :
Code:
hostname
si vous obtenez la réponse :
Code:
nomduserveur.nomdudomaine.tld
C'est gagné, il ne vous reste plus qu'à redémarrer le service :

Code:
/etc/init.d/network restart

Isendel
26/02/2015, 16h13
CentOS release 6.6 (Final)

shirokoweb
26/02/2015, 15h24
Quelle version de CentOS ?
Code:
cat /etc/*-release

Isendel
26/02/2015, 15h17
Bonjour à tous,

J'ai pas mal creusé la question des emails ces derniers temps et j'arrive enfin à obtenir 10/10 chez mail tester.
Malgré tout, il reste un paramètre qu'il serait bon de modifier, à mon avis, c'est le nom de la machine.

Je précise que j'ai une R3 donc centos.

Pour trouver et éditer le nom de la machine j'ai trouvé /etc/hostname
J'ai en amont créé un reverse sur un domaine que je pensais utiliser en tant qu'hostname.

Ma question est simple, une fois que j'aurai modifié le nom d'hôte, il en est fait référence dans beaucoup de fichiers de conf (entre autre). Auriez-vous une liste exhaustive ou à peu près des fichiers à éditer pour que tout soit en ordre ?

Si le nom de la machine demeure celui par défaut, quels sont les risques ?