MRatWork Forum by Mustafa Ramadhan - Permanent Setting IP di /var/qmail/control/outgoingips

Sponsor:
Server and Web Integrator
Link:
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:

MRatWork Forum | Please login or register. | 2017-11-07, 23:45:22

- MRatWork Forum by Mustafa Ramadhan »
- Language Specific Discussions »
- Indonesia Users »
- Permanent Setting IP di /var/qmail/control/outgoingips

« previous next »

- Print

Pages: [1] Go Down

### Author Topic: Permanent Setting IP di /var/qmail/control/outgoingips (Read 1275 times)

0 Members and 1 Guest are viewing this topic.

#### opotoiki

- Senior Member
- Posts: 151
- Karma: +0/-0

##### Permanent Setting IP di /var/qmail/control/outgoingips

« on: 2015-06-04, 10:33:42 »
Halo Pak,
masih lanjutan dari indonesia-userssend-mail-hanya-sampai-mail-queue.html
di cloud vds, ip public hanya ada di nat bukan di node, jadi cuma routing saja, nah sepertinya /var/qmail/control/outgoingips ngambil ip dari settingan mx DNS, hasilnya mail out ketahan di queue karena ip tidak dikenali node. jika /var/qmail/control/outgoingips saya kosongin atau pakai ip privatenya (ganti manual) mail out lancar tapi jika pakai ip publicnya ketahan di queue walaupun ip public di declare di /etc/hosts.
masalahnya setiap saya add domain atau add subdomain atau update KloxoMR, /var/qmail/control/outgoingips berubah lagi.
bagaimana caranya biar /var/qmail/control/outgoingips yang saya ubah manual jadi permanen?
atau settingannya pakai ip private node, bukan ip dari mx dns?
Logged
belajar yang banyak, masih goblok soalnya...

#### MRatWork

- Administrator
- The Elite
- Posts: 15,381
- Karma: +112/-9
- Gender:

##### Re: Permanent Setting IP di /var/qmail/control/outgoingips

« Reply #1 on: 2015-06-04, 11:17:32 »
Coba saja isi outgoingips dibuat kosong dan file tersebut 'dikunci' agar tidak bisa di-overwrite dengan 'chattr +i /var/qmail/control/outgoingips'.
Logged
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

#### opotoiki

- Senior Member
- Posts: 151
- Karma: +0/-0

##### Re: Permanent Setting IP di /var/qmail/control/outgoingips

« Reply #2 on: 2015-06-04, 11:33:07 »
o ia tambahin attibut saja ya pak
makasih pak, mungkin next update scriptnya ngambil ip dari yang kedetek KloxoMr saja pak, jangan dari dns
Logged
belajar yang banyak, masih goblok soalnya...

#### MRatWork

- Administrator
- The Elite
- Posts: 15,381
- Karma: +112/-9
- Gender:

##### Re: Permanent Setting IP di /var/qmail/control/outgoingips

« Reply #3 on: 2015-06-04, 11:38:02 »
Atau ubah /usr/local/lxlabs/kloxo/bin/fix-outgoingips.php menjadi:
Code: [Select]

    <?php

    include_once "lib/html/include.php";

    initProgram('admin');

    $login->loadAllObjects('client');
    $list = $login->getList('client');

    log_cleanup("Fixing Mail Outgoing IP", $nolog);

    $t = '';

    if (file_exists("/usr/local/lxlabs/kloxo/etc/flag/manualoutgoingips.flg")) {
    	print("- No process because '/usr/local/lxlabs/kloxo/etc/flag/manualoutgoingips.flg' exists\n");
    } else {
    	foreach($list as $c) {
    		$dlist = $c->getList('domain');

    		foreach($dlist as $l) {
    			$dns = $l->getObject('dns');

    			foreach($dns->dns_record_a as $drec) {
    				if (($drec->ttype === 'a') && ($drec->hostname === '__base__')) {
    					print("- For '{$dns->nname}' ('{$c->nname}') at '{$c->syncserver}'\n");
    					$t .= "{$dns->nname}:{$drec->param}\n";
    				}
    			}

    			$dns->was();
    		}

    		file_put_contents("/var/qmail/control/outgoingips", $t);
    	}
    }

dan tambahkan file kosong '/usr/local/lxlabs/kloxo/etc/flag/manualoutgoingips.flg'.
Isi outgoingips file sesuka anda dimana sebelumnya lakukan 'chattr -i /var/qmail/control/outgoingips'.
Logged
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

#### opotoiki

- Senior Member
- Posts: 151
- Karma: +0/-0

##### Re: Permanent Setting IP di /var/qmail/control/outgoingips

« Reply #4 on: 2015-06-05, 00:50:54 »
ok terimaksih pak
Logged
belajar yang banyak, masih goblok soalnya...

- Print

Pages: [1] Go Up
« previous next »

- MRatWork Forum by Mustafa Ramadhan »
- Language Specific Discussions »
- Indonesia Users »
- Permanent Setting IP di /var/qmail/control/outgoingips

MRatWork Affiliates: BIGRAF(R) Inc. House of LMAR EFARgrafix

..:: Monetize your Website or Blog with BidVertiser ::.. ..:: Sell your ad space with BidVertiser ::..

- Design By SMFSimple.com
- SMF 2.0.14 | SMF © 2017, Simple Machines

Page created in 0.039 seconds with 16 queries.

Mirror created by MasterkinG32.CoM