Postfix spf - delivers spoofing emails. Not fail - postfix-mta

I started receiving spoofing emails. So I set up my server and domain but I still receive emails. SPF is not rejecting emails.
Can anyone help?
dns records
myserver.com. IN TXT "v=spf1 a mx a:myserver.com ip4:50.111.111.111 -all"
_dmarc.myserver.com. IN TXT "v=DMARC1; p=reject; fo=1; ri=3600; pct=100; rua=mailto:info#myserver.com; ruf=mailto:info#myserver.com
/etc/postfix-policyd-spf-python/policyd-spf.conf
debugLevel = 1
HELO_reject = Fail
Mail_From_reject = Fail
PermError_reject = False
TempError_Defer = False
skip_addresses = 127.0.0.0/8,::ffff:127.0.0.0/104,::1
postfix - main.cnf
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination unix check_policy_service: private / policyd-SPF reject_unauth_pipelining, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, reject_unknown_recipient_domain, reject_rbl_client zen.spamhaus.org, bl.spamcop.net reject_rbl_client, check_policy_service inet: 127.0.0.1: 10023
postfix - master.cf
policyd-spf unix - n n - 0 spawn
user = policyd-spf argv = /usr/bin/policyd-spf
mail.log
Oct 12 21:13:36 myserver policyd-spf [26371]: None; identity = helo; client-ip = 72,167,234,237; helo = p3nlsmtp12.shr.prod.phx3.secureserver.net; envelope-from=test#baddkim.com; receiver=mymail#myserver.com
Oct 12 21:13:36 myserver policyd-spf [26371]: None; identity = mailfrom; client-ip = 72,167,234,237; helo = p3nlsmtp12.shr.prod.phx3.secureserver.net; envelope-from=test#baddkim.com; receiver=mymail#myserver.com
Oct 12 21:13:36 myserver policyd-spf [26369]: Pass; identity = mailfrom; client-ip = 72,167,234,237; helo = p3nlsmtp12.shr.prod.phx3.secureserver.net; envelope-from=test#emailspooftest.com; receiver=mymail#myserver.com
Oct 12 21:13:36 myserver postfix / smtpd [22955]: BFA1981347: client = p3nlsmtp12.shr.prod.phx3.secureserver.net [72.167.234.237]
Oct 12 21:13:36 myserver postgrey [2322]: action = pass, reason = triplet found, client_name = p3nlsmtp12.shr.prod.phx3.secureserver.net, client_address = 72.167.234.237, sender=test#baddkim.com, recipient=mymail#myserver.com
Oct 12 21:13:36 myserver postfix / smtpd [26363]: C1ADE814FA: client = p3nlsmtp12.shr.prod.phx3.secureserver.net [72.167.234.237]
Oct 12 21:13:36 myserver postgrey [2322]: action = pass, reason = triplet found, client_name = p3nlsmtp12.shr.prod.phx3.secureserver.net, client_address = 72.167.234.237, sender=test#emailspooftest.com, recipient=mymail#myserver.com

Related

ORA-12505 + "network adapter could not establish the connection" on Oracle11g/VirtualBox

I have Oracle 11g installed locally on each of my virtualbox machines (working under Windows 7 64bit). Suddenty, after a simple reboot, the database on one of the 5 virtual machines doesn't want to connect anymore.
With SID connection I obtain ORA-12505 error, and with service name : "Network adapter could not establish the connection", in SqlDeveloper with both cases. If I try a connection with SqlPlus as sysdba, I obtain the connection but with "connected to an idle instance". Hence if I try to see, for example, the list of sessions and processes working, I have the error 01034 ("ORACLE not available"). I tried a lot of tricks but nothing works. Could it be a specific problem with virtual machines ?
Here what I tried :
the services (of my base and of the listener) are working (and I wait enough between relaunch and connection retry) ;
the files tnsnames.ora, listener.ora and sqlnet.ora seem correct (see below) ;
If I force localhost to be 127.0.0.1 in hosts file, I have the 12514 error ;
ORACLE_HOME and ORACLE_SID are correctly set ;
It can't a priori be a memory problem (I even try to allow more memory to the specific VM which doesn't work) ;
If I force "startup" on sysdba session, the next requests obtain : ORA-03114 : not connected to ORACLE ;
It's not a priori a problem of system files size. In all cases, the not working database is not my biggest database among all my databases (and any file in oradata are bigger than in others VMs which have exactly the same configurations).
# tnsnames.ora Network Configuration File: C:\oracle_32\product\11.2.0\dbhome_2\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
# listener.ora Network Configuration File: C:\oracle_32\product\11.2.0\dbhome_2\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oracle_32\product\11.2.0\dbhome_2)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\oracle_32\product\11.2.0\dbhome_2\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = C:\oracle_32
Thank you to read !
Here the alert log for the first connection of this morning :
Fri Jun 23 11:08:13 2017
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 2
Using LOG_ARCHIVE_DEST_1 parameter default value as USE_DB_RECOVERY_FILE_DEST
Autotune of undo retention is turned on.
IMODE=BR
ILAT =167
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
Using parameter settings in server-side spfile C:\ORACLE_32\PRODUCT\11.2.0\DBHOME_2\DATABASE\SPFILEORCL.ORA
System parameters with non-default values:
processes = 1000
sessions = 1524
memory_target = 1232M
control_files = "C:\ORACLE_32\ORADATA\ORCL\CONTROL01.CTL"
control_files = "C:\ORACLE_32\FLASH_RECOVERY_AREA\ORCL\CONTROL02.CTL"
db_block_size = 8192
compatible = "11.2.0.0.0"
db_recovery_file_dest = "C:\oracle_32\flash_recovery_area"
db_recovery_file_dest_size= 3852M
undo_tablespace = "UNDOTBS1"
remote_login_passwordfile= "EXCLUSIVE"
db_domain = ""
dispatchers = "(PROTOCOL=TCP) (SERVICE=orclXDB)"
local_listener = "LISTENER_ORCL"
audit_file_dest = "C:\ORACLE_32\ADMIN\ORCL\ADUMP"
audit_trail = "DB"
db_name = "orcl"
open_cursors = 300
diagnostic_dest = "C:\ORACLE_32"
Fri Jun 23 11:08:20 2017
PMON started with pid=2, OS id=2160
Fri Jun 23 11:08:20 2017
VKTM started with pid=3, OS id=2164 at elevated priority
VKTM running at (10)millisec precision with DBRM quantum (100)ms
Fri Jun 23 11:08:21 2017
GEN0 started with pid=4, OS id=2168
Fri Jun 23 11:08:21 2017
DIAG started with pid=5, OS id=2172
Fri Jun 23 11:08:21 2017
DBRM started with pid=6, OS id=2176
OER 7451 in Load Indicator : Error Code = OSD-04500: option indiquée interdite !
Fri Jun 23 11:08:21 2017
PSP0 started with pid=7, OS id=2180
Fri Jun 23 11:08:21 2017
DIA0 started with pid=8, OS id=2184
Fri Jun 23 11:08:21 2017
MMAN started with pid=9, OS id=2188
Fri Jun 23 11:08:21 2017
DBW0 started with pid=10, OS id=2192
Fri Jun 23 11:08:21 2017
LGWR started with pid=11, OS id=2196
Fri Jun 23 11:08:21 2017
CKPT started with pid=12, OS id=2200
Fri Jun 23 11:08:21 2017
SMON started with pid=13, OS id=2204
Fri Jun 23 11:08:21 2017
RECO started with pid=14, OS id=2208
Fri Jun 23 11:08:21 2017
MMON started with pid=15, OS id=2212
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
Fri Jun 23 11:08:21 2017
MMNL started with pid=16, OS id=2216
starting up 1 shared server(s) ...
ORACLE_BASE from environment = C:\oracle_32
Fri Jun 23 11:08:22 2017
alter database mount exclusive
Successful mount of redo thread 1, with mount id 1475182246
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: alter database mount exclusive
alter database open
Fri Jun 23 11:08:31 2017
Errors in file c:\oracle_32\diag\rdbms\orcl\orcl\trace\orcl_lgwr_2196.trc:
ORA-00338: log 3 of thread 1 is more recent than control file
ORA-00312: online log 3 thread 1: 'C:\ORACLE_32\ORADATA\ORCL\REDO03.LOG'
Errors in file c:\oracle_32\diag\rdbms\orcl\orcl\trace\orcl_lgwr_2196.trc:
ORA-00338: log 3 of thread 1 is more recent than control file
ORA-00312: online log 3 thread 1: 'C:\ORACLE_32\ORADATA\ORCL\REDO03.LOG'
Errors in file c:\oracle_32\diag\rdbms\orcl\orcl\trace\orcl_ora_2232.trc:
ORA-00338: fichier journal 1 du thread plus recent que le fichier de controle
ORA-00312: journal en ligne 3 thread 1 : 'C:\ORACLE_32\ORADATA\ORCL\REDO03.LOG'
USER (ospid: 2232): terminating the instance due to error 338
Fri Jun 23 11:08:34 2017
Instance terminated by USER, pid = 2232`
Did you check the alert log of the database? that could be a good place to start looking.
Also when logged as sysdba, did you try to start the database: startup ?
If yes, what is the error message if any?

I dont get HTTP answer with sr function. Just an ACK

I am trying to send an HTTP GET request to google.com, but the answer I get is an ACK and not the HTML file. Here is the code:
def Make_Get():
synR = IP(dst = 'www.google.com', ttl = 64)/TCP(dport = 80,sport = randint(1024,65535), flags = 'S')
synAckAN = sr1(synR)
req = (IP(dst='www.google.com') / TCP(dport=80, sport=synAckAN[TCP].dport, seq=synAckAN[TCP].ack, ack=synAckAN[TCP].seq + 1, flags='A')/"GET / HTTP/1.0 \n\n")
ans, a = sr(req)
return ans
and this are the two packets I got in return of this function:
###[ IP ]###
version = 4
ihl = None
tos = 0x0
len = None
id = 1
flags =
frag = 0
ttl = 64
proto = tcp
chksum = None
src = 192.168.233.128
dst = 216.58.214.100
\options \
###[ TCP ]###
sport = 35534
dport = http
seq = 1
ack = 1964930533
dataofs = None
reserved = 0
flags = A
window = 8192
chksum = None
urgptr = 0
options = {}
###[ Raw ]###
load = 'GET / HTTP/1.0 \n\n'
None
###[ IP ]###
version = 4L
ihl = 5L
tos = 0x0
len = 40
id = 32226
flags =
frag = 0L
ttl = 128
proto = tcp
chksum = 0x6425
src = 216.58.214.100
dst = 192.168.233.128
\options \
###[ TCP ]###
sport = http
dport = 35534
seq = 1964930533
ack = 18
dataofs = 5L
reserved = 0L
flags = A
window = 64240
chksum = 0xe5e6
urgptr = 0
options = {}
###[ Padding ]###
load = '\x00\x00\x00\x00\x00\x00'
None
When I sniffed the traffic while I sent this packet, I got this:
###[ Ethernet ]###
dst= 00:0c:29:bb:8e:79
src= 00:50:56:e9:b8:b1
type= 0x800
###[ IP ]###
version= 4L
ihl= 5L
tos= 0x0
len= 517
id= 32136
flags=
frag= 0L
ttl= 128
proto= tcp
chksum= 0x5004
src= 172.217.20.100
dst= 192.168.233.128
\options\
###[ TCP ]###
sport= http
dport= 1928
seq= 1828330545
ack= 18
dataofs= 5L
reserved= 0L
flags= FPA
window= 64240
chksum= 0x8b5f
urgptr= 0
options= []
###[ HTTP ]###
###[ HTTP Response ]###
Status-Line= u'HTTP/1.0 302 Found'
Accept-Ranges= None
Age= None
E-Tag= None
Location= u'http://www.google.co.il/?gfe_rd=cr&ei=9fiTV6P6FuWg8weei7rQDA'
Proxy-Authenticate= None
Retry-After= None
Server= None
Vary= None
WWW-Authenticate= None
Cache-Control= u'private'
Connection= None
Date= u'Sat, 23 Jul 2016 23:08:37 GMT'
Pragma= None
Trailer= None
Transfer-Encoding= None
Upgrade= None
Via= None
Warning= None
Keep-Alive= None
Allow= None
Content-Encoding= None
Content-Language= None
Content-Length= u'261'
Content-Location= None
Content-MD5= None
Content-Range= None
Content-Type= u'text/html; charset=UTF-8'
Expires= None
Last-Modified= None
Headers= u'Date: Sat, 23 Jul 2016 23:08:37 GMT\r\nContent-Length: 261\r\nContent-Type: text/html; charset=UTF-8\r\nLocation: http://www.google.co.il/?gfe_rd=cr&ei=9fiTV6P6FuWg8weei7rQDA\r\nCache-Control: private'
Additional-Headers= None
###[ Raw ]###
load= '<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">\n<TITLE>302 Moved</TITLE></HEAD><BODY>\n<H1>302 Moved</H1>\nThe document has moved\nhere.\r\n</BODY></HTML>\r\n'
As you can see, the last layer in this one, contain the code I need.
my question is:
Why don't I get the packet with sr() and how can I obtain it to collect the HTML code?
EDIT:
The call to the function:
print Make_Get('www.google.com')[0][Raw]
The function:
def Make_Get(ipp):
ip = DNS_Req(ipp)
synR = IP(dst = ip)/TCP(dport = 80,sport = randint(1024,65535), flags = 'S')
syn_ack = sr1(synR)
getStr = "GET / HTTP/1.1\r\nHost: {}\r\n\r\n".format(ip)
request = (IP(dst= ip) / TCP(dport=80, sport=syn_ack[TCP].dport, seq=syn_ack[TCP].ack, ack=syn_ack[TCP].seq + 1, flags='A')/getStr)
an = sr(request)
return an
The resuls:
Begin emission:
.Finished to send 1 packets.
*
Received 2 packets, got 1 answers, remaining 0 packets
Begin emission:
*Finished to send 1 packets.
Received 1 packets, got 1 answers, remaining 0 packets
[]
First, in HTTP, a correct newline is "\r\n", not "\n".
Second, is there any reason why you use HTTP/1.0 and not HTTP/1.1? If not, you should change your request to:
GET / HTTP/1.1\r\n
Host: www.google.com\r\n
\r\n
Third, the ACK you are getting is usually sent by the server before sending the actual HTTP response to acknowledge your request faster. A second segment is then sent with the HTTP response. You are missing this one in your first show() example.
Have a look here.
To catch this segment, you can use sr() function with its parameter timeout and multi:
ans, unans = sr(request, timeout=2, multi=True)
for c, s in ans:
if s.haslayer(Raw):
print b[Raw]
print("-----------") # just a delimiter
timeout is used to ensure that sr() will stop (value 2 is arbitrary).
multi mean "accept multiple answers for the same stimulus" unless it is there, sr() will stop sniffing after one answer to the request sent.

Install Postfix dovecot with mysql background

I have spent about 3 days to install the Postfix, dovecot and mysql on my VPS server. It has been a very frustrating process. I have googled painfully for 3 days and collected the information piece by piece and eventually made this combination work.
Just want to list steps and all configuration files together, hopefully useful for who is also undergoing the painful process.
make mysql ready, and create database postfix (or whatever the name you want), create mysql user postfix and grant all privilege to postfix database.
Create the following tables:
CREATE TABLE virtual_domains (
id int(11) NOT NULL auto_increment,
name varchar(50) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE virtual_aliases (
id int(11) NOT NULL auto_increment,
domain_id int(11) NOT NULL,
source varchar(100) NOT NULL,
destination varchar(100) NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE virtual_users (
id int(11) NOT NULL auto_increment,
domain_id int(11) NOT NULL,
password varchar(32) NOT NULL,
email varchar(100) NOT NULL,
maildir varchar(255) NOT NULL,
PRIMARY KEY (id),
UNIQUE KEY email (email),
FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Compile Postfix with mysql support, you should see the bunch of postfix configuration files:
main.cf
[root#mail postfix]#postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /var/postfix/usr/sbin
compatibility_level = 2
daemon_directory = /var/postfix/usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6 /binddd
$daemon_directory/$process_name $process_id & sleep 5
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mail_spool_directory = /home
mailq_path = /var/postfix/usr/bin/mailq
manpage_directory = /usr/local/man
meta_directory = /etc/postfix
mydomain = myspeedshow.com
myhostname = mail.yourdoamin.com
mynetworks_style = host
myorigin = $mydomain
newaliases_path = /var/postfix/usr/bin/newaliases
postscreen_greet_banner = "before smtp banner"
postscreen_greet_wait = 2s
postscreen_non_smtp_command_enable = no
postscreen_pipelining_enable = no
queue_directory = /var/spool/postfix
readme_directory = no
recipient_delimiter = +
sample_directory = /etc/postfix
sendmail_path = /var/postfix/usr/sbin/sendmail
setgid_group = postdrop
shlib_directory = no
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_recipient_restrictions =
reject_invalid_hostname,<br>
reject_unknown_recipient_domain,
reject_unauth_pipelining,
permit_mynetworks,
reject_unauth_destination,
reject_rbl_client zen.spamhaus.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client dnsbl.sorbs.net,
reject_rbl_client cbl.abuseat.org,
reject_rbl_client b.barracudacentral.org,
reject_rbl_client dnsbl-1.uceprotect.net,
permit<br>
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtputf8_enable = no
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias- maps.cf,mysql:/etc/postfix/mysql-email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = virtual
virtual_uid_maps = static:5000
master.cf
relay unix - - n - - smtp
flush unix n - n 1000? 0 flush
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
rewrite unix - - - - - trivial-rewrite
proxymap unix - - n - - proxymap
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
discard unix - - n - - discard
tlsmgr unix - - n 1000? 1 tlsmgr
retry unix - - n - - error
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
smtp inet n - n - 1 postscreen
smtpd pass - - n - - smtpd
lmtp unix - - n - - lmtp
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
virtual unix - n n - - virtual
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot /dovecot-lda -f ${sender} -d ${recipient}
mysql-virtual-mailbox-domains.cf
user=postfix
password=yourpassword
host=127.0.0.1
dbname=postfix
query=select name from virtual_domains where name='%s'
mysql-virtual-mailbox-maps.cf
user=postfix
password=yourpassword
dbname=postfix
query=select maildir from virtual_users where email='%s'
mysql-virtual-alias-maps.cf
user=postfix
password=yourpassword
host=127.0.0.1
dbname=postfix
query=select destination from virtual_aliases where source='%s'
The next step is to configure the Dovecot.
10-auth.conf
disable_plaintext_auth = yes
auth_mechanisms = plain login
!include auth-sql.conf.ext
comments out all other !include
auth-sql.conf.ext
passdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf.ext
}
userdb {
driver = static
args = uid=vmail gid=vmail home=/var/vmail/%d/%n
}
10-mail.conf
comments out all mail_location
Here we use Maildir format to store the email in:
/var/vmail/domain/user/Maildir/ folder, in virtual_users table, the column maildir should be in the following format 'yourdomain.com/user/Maildir/'
If you have not populated the virtual_users.maildir column correctly, the postfix will use mailbox format, which store all mail belong to a domain to a file /var/vmail/1.

graphite webapp doesn't show data from all carbon cache process

i am running 4 carbon cache instance behind 1 carbon relay instance. Below is my carbon.conf.
[cache:1]
LINE_RECEIVER_PORT = 2103
PICKLE_RECEIVER_PORT = 2104
CACHE_QUERY_PORT = 7102
STORAGE_DIR = /graphite_data/01
LOCAL_DATA_DIR = /graphite_data/01
[cache:2]
LINE_RECEIVER_PORT = 2203
PICKLE_RECEIVER_PORT = 2204
CACHE_QUERY_PORT = 7202
STORAGE_DIR = /graphite_data/02
LOCAL_DATA_DIR = /graphite_data/02
[cache:3]
LINE_RECEIVER_PORT = 2303
PICKLE_RECEIVER_PORT = 2304
CACHE_QUERY_PORT = 7302
STORAGE_DIR = /graphite_data/03
LOCAL_DATA_DIR = /graphite_data/03
[cache:4]
LINE_RECEIVER_PORT = 2403
PICKLE_RECEIVER_PORT = 2404
CACHE_QUERY_PORT = 7402
STORAGE_DIR = /graphite_data/04
LOCAL_DATA_DIR = /graphite_data/04
I have configured my carbon relay with below configutaion
LINE_RECEIVER_INTERFACE = 0.0.0.0
LINE_RECEIVER_PORT = 2003
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
PICKLE_RECEIVER_PORT = 2004
RELAY_METHOD = consistent-hashing
.
REPLICATION_FACTOR = 1
DESTINATIONS=127.0.0.1:2104:1,127.0.0.1:2204:2,127.0.0.1:2304:3,127.0.0.1:2404:4
I have configured my graphite webapp with the below configuration to get the data from all carbon cache process
STANDARD_DIRS = ['/graphite_data/01',
'/graphite_data/02',
'/graphite_data/03',
'/graphite_data/04']
# You *should* use 127.0.0.1 here in most cases
CARBONLINK_HOSTS = ["127.0.0.1:7102:1", "127.0.0.1:7202:2", "127.0.0.1:7302:3","127.0.0.1:7402:4"]
After configuration , i started pushing data with example-client.py to my carbon relay process. I could see that relay is pushing data to carbon-cache process.
**[root#poc-graphite graphite]# ls /graphite_data/02/system/loadavg_5min.wsp
/graphite_data/02/system/loadavg_5min.wsp
[root#poc-graphite graphite]# ls /graphite_data/03/system/loadavg_1min.wsp
/graphite_data/03/system/loadavg_1min.wsp
[root#poc-graphite graphite]# ls /graphite_data/04/system/loadavg_15min.wsp
/graphite_data/04/system/loadavg_15min.wsp**
But I am not able to see this metrics in my webapp. is there something wrong with configuration.
You should check the path of the twisted plugin with blow commands:
$python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
If in the results exist the path "/usr/local/lib/python2.7/dist-packages", just remove it:
sudo rm -rf /usr/local/lib/python2.7/dist-packages/twiste*
and then
sudo service carbon-cache stop ## wait a few seconds here
sudo service carbon-cache start

Postfix not receiving mail

I setup my Virtualmin using the manual installation because I'm on Ubuntu 3.14 and the automatic install does not support this version.
Because of this now I have problems. Everything works except Postfix.
Here is my postconf -n:
ubuntu#web01:~$ postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
home_mailbox = Maildir/
mailbox_size_limit = 0
mydestination = web01.redacted.net, localhost, localhost.localdomain, localhost
myhostname = web01.redacted.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_inet_interfaces
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual
The error I get in the mail.log is:
Mar 22 08:17:49 web01 postfix/smtpd[27725]: connect from nk11p04mm-asmtpout002.mac.com[17.158.236.237]
Mar 22 08:17:50 web01 postfix/smtpd[27725]: 3ADDE65113: client=nk11p04mm-asmtpout002.mac.com[17.158.236.237]
Mar 22 08:17:50 web01 postfix/cleanup[27729]: 3ADDE65113: message-id=<4FD40961-2187-4B2C-8892-8A7A3BADD07E#icloud.com>
Mar 22 08:17:50 web01 postfix/qmgr[1263]: 3ADDE65113: from=<redacted#icloud.com>, size=1941, nrcpt=1 (queue active)
Mar 22 08:17:50 web01 postfix/error[27730]: 3ADDE65113: to=<redactedName#redacted.co>, orig_to=<hostmaster#redacted.co>, relay=none, delay=0.23, delays=0.2/0.01/0/0.02, dsn=5.1.1, status=bounced (User unknown in virtual alias table)
Mar 22 08:17:50 web01 postfix/cleanup[27729]: 7083565115: message-id=<20140322081750.7083565115#web01.redacted.net>
And this is the /etc/postfix/virtual:
redacted.co redacted.co
hostmaster#redacted.co redactedName#redacted.co
Here is the /etc/aliases:
# See man 5 aliases for format
postmaster: root
The problem was that the initial user in our case redactedName was not found. To solve this problem the user was manually added as per:
redacted.co redacted.co
hostmaster#redacted.co redactedName#redacted.co
redactedName#redacted.co redactedName
This fixed the problem.
I hope someone else finds this useful. It took a lot of debugging and looking at logs to finally understand what the error message was telling me was in fact the error itself. Basically the redactedName#redacted.co was not being redirected to any user.

Resources