Cannot send email to gmail account from postfix - gmail

I am having problem in sending emails in gmail account. I see them in the queue but they are not proccessing.
Looking at the logs I noticed that when I try to send to gmail i receive the following:
Dec 5 12:55:36 lvps81-41-130-77 postfix/smtpd[8797]: connect from adsl-215.176.58.243.tellas.gr[176.58.243.215]
Dec 5 12:55:36 lvps81-41-130-77 postfix/smtpd[8797]: warning: connect to Milter service inet:127.0.0.1:12768: Connection refused
Dec 5 12:55:37 lvps81-41-130-77 postfix/smtpd[8797]: 51E6A4413: client=adsl-215.176.58.243.tellas.gr[176.58.243.215], sasl_method=DIGEST-MD5, sasl_username=donotreply#edentalbook.com
Dec 5 12:55:37 lvps81-41-130-77 postfix/cleanup[8801]: 51E6A4413: message-id=<002a01d24edd$baa3c680$2feb5380$#com>
Dec 5 12:55:37 lvps81-41-130-77 opendkim[31319]: 51E6A4413: DKIM-Signature field added (s=mail, d=edentalbook.com)
Dec 5 12:55:37 lvps81-41-130-77 postfix/qmgr[29641]: 51E6A4413: from=<donotreply#edentalbook.com>, size=2808, nrcpt=1 (queue active)
Dec 5 12:55:37 lvps81-41-130-77 postfix/qmgr[29641]: warning: connect to transport private/smtp-ipv4: No such file or directory
Dec 5 12:55:37 lvps81-41-130-77 postfix/error[8802]: 51E6A4413: to=<grnelgeo#gmail.com>, relay=none, delay=0.62, delays=0.61/0/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Dec 5 12:55:40 lvps81-41-130-77 postfix/smtpd[8797]: disconnect from adsl-215.176.58.243.tellas.gr[176.58.243.215]

Related

Unable to send email - ISPConfig / Roundcube

I have got ISPConfig installed on my VPS and I'm trying to set up the email function.
My Server IP is 146.71.76.30 and hostname is set to dutyhosts.tk
Whenever I try and send an email via Roundcube I am getting the below error in the mail logs
Can someone advise on what I have missed or need to sort?
Aug 25 12:44:06 dutyhosts dovecot: imap-login: Login: user=<support#dutyhosts.tk>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=11098, secured, session=<DBQKD7Otrtx/AAAB>
Aug 25 12:44:06 dutyhosts postfix/pickup[10367]: A6C04A558D: uid=33 from=<support#dutyhosts.tk>
Aug 25 12:44:06 dutyhosts dovecot: imap(support#dutyhosts.tk): Logged out in=451 out=640
Aug 25 12:44:06 dutyhosts postfix/cleanup[11095]: warning: connect to Milter service inet:localhost:11332: Connection refused
Aug 25 12:44:06 dutyhosts postfix/cleanup[11095]: A6C04A558D: message-id=<f003feab44aba7e7cd98fba5afbea994#dutyhosts.tk>
Aug 25 12:44:06 dutyhosts postfix/qmgr[10368]: A6C04A558D: from=<support#dutyhosts.tk>, size=549, nrcpt=1 (queue active)
Aug 25 12:44:08 dutyhosts dovecot: imap-login: Login: user=<support#dutyhosts.tk>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=11102, secured, session=<bZwnD7OtwNx/AAAB>
Aug 25 12:44:08 dutyhosts dovecot: imap(support#dutyhosts.tk): Logged out in=70 out=633
Aug 25 12:44:10 dutyhosts dovecot: imap-login: Login: user=<support#dutyhosts.tk>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=11106, secured, session=<dio+D7Otwtx/AAAB>
Aug 25 12:44:10 dutyhosts dovecot: imap(support#dutyhosts.tk): Logged out in=76 out=546
Aug 25 12:44:10 dutyhosts dovecot: imap-login: Login: user=<support#dutyhosts.tk>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=11108, secured, session=<daxCD7OtxNx/AAAB>
Aug 25 12:44:10 dutyhosts dovecot: imap(support#dutyhosts.tk): Logged out in=120 out=766
Aug 25 12:44:12 dutyhosts postfix/qmgr[10368]: 941C0A5586: from=<dave#dutyhosts.tk>, size=542, nrcpt=1 (queue active)
Aug 25 12:44:12 dutyhosts postfix/trivial-rewrite[11099]: warning: do not list domain dutyhosts.tk in BOTH mydestination and virtual_mailbox_domains
Aug 25 12:44:12 dutyhosts postfix/qmgr[10368]: 79F61A5585: from=<dave#dutyhosts.tk>, size=541, nrcpt=1 (queue active)
Aug 25 12:44:12 dutyhosts postfix/qmgr[10368]: 1459AA5550: from=<dave#dutyhosts.tk>, size=539, nrcpt=1 (queue active)
Aug 25 12:44:12 dutyhosts postfix/smtp[11115]: fatal: valid hostname or network address required in server description: admin#dutyhosts.tk
Aug 25 12:44:12 dutyhosts postfix/smtp[11116]: fatal: valid hostname or network address required in server description: admin#dutyhosts.tk
Aug 25 12:44:12 dutyhosts postfix/smtp[11117]: fatal: valid hostname or network address required in server description: admin#dutyhosts.tk
Aug 25 12:44:12 dutyhosts postfix/smtp[11100]: A6C04A558D: to=<silv3r.sc0rpion#gmail.com>, relay=gmail-smtp-in.l.google.com[172.217.197.26]:25, delay=5.9, delays=0.26/0.04/0.32/5.3, dsn=5.7.26, status=bounced (host gmail-smtp-in.l.google.com[172.217.197.26] said: 550-5.7.26 This message does not have authentication information or fails to 550-5.7.26 pass authentication checks. To best protect our users from spam, the 550-5.7.26 message has been blocked. Please visit 550-5.7.26 https://support.google.com/mail/answer/81126#authentication for more 550 5.7.26 information. r1si9530921qvm.98 - gsmtp (in reply to end of DATA command))
Aug 25 12:44:12 dutyhosts postfix/cleanup[11095]: 7E798A558E: message-id=<20200825124412.7E798A558E#dutyhosts.tk>
Aug 25 12:44:12 dutyhosts postfix/bounce[11118]: A6C04A558D: sender non-delivery notification: 7E798A558E
Aug 25 12:44:12 dutyhosts postfix/qmgr[10368]: 7E798A558E: from=<>, size=3210, nrcpt=1 (queue active)
Aug 25 12:44:12 dutyhosts postfix/trivial-rewrite[11099]: warning: do not list domain dutyhosts.tk in BOTH mydestination and virtual_mailbox_domains
Aug 25 12:44:12 dutyhosts postfix/qmgr[10368]: A6C04A558D: removed
Aug 25 12:44:12 dutyhosts postfix/smtp[11100]: fatal: valid hostname or network address required in server description: admin#dutyhosts.tk
Aug 25 12:44:13 dutyhosts postfix/master[10365]: warning: process /usr/lib/postfix/sbin/smtp pid 11115 exit status 1
Aug 25 12:44:13 dutyhosts postfix/master[10365]: warning: /usr/lib/postfix/sbin/smtp: bad command startup -- throttling
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: private/smtp socket: malformed response
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: private/smtp socket: malformed response
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: private/smtp socket: malformed response
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Aug 25 12:44:13 dutyhosts postfix/master[10365]: warning: process /usr/lib/postfix/sbin/smtp pid 11116 exit status 1
Aug 25 12:44:13 dutyhosts postfix/master[10365]: warning: process /usr/lib/postfix/sbin/smtp pid 11117 exit status 1
Aug 25 12:44:13 dutyhosts postfix/error[11121]: 941C0A5586: to=<dave#dutyhosts.tk>, relay=none, delay=938, delays=937/1.2/0/0.03, dsn=4.3.0, status=deferred (unknown mail transport error)
Aug 25 12:44:13 dutyhosts postfix/error[11122]: 79F61A5585: to=<dave#dutyhosts.tk>, relay=none, delay=999, delays=998/1.2/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: private/smtp socket: malformed response
Aug 25 12:44:13 dutyhosts postfix/qmgr[10368]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Aug 25 12:44:13 dutyhosts postfix/master[10365]: warning: process /usr/lib/postfix/sbin/smtp pid 11100 exit status 1
Aug 25 12:44:13 dutyhosts postfix/error[11121]: 1459AA5550: to=<dave#dutyhosts.tk>, relay=none, delay=571, delays=569/1.4/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Aug 25 12:44:13 dutyhosts postfix/error[11124]: 7E798A558E: to=<support#dutyhosts.tk>, relay=none, delay=1.1, delays=0.02/1.1/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error)
Did you set your server up according to the Perfect Server tutorial?

You have reached a limit for sending mail. Your message was not sent Gmail

We are using Gmail API to send email. As per Gmail documentation we can send upto 500 emails per day but when we send more than 60 email we are getting this error on our Gmail account.
You have reached a limit for sending mail. Your message was not sent.
As per our code logic we are sending text email and one email in every two min to avoid Google API 100 second Quota. We have also checked the API console and in the last few days we have not reached our Quotas limit and not Received any errors but we are getting the above mention Error in our Gmail account. One last thing we want to mention is that we are only using Gmail send service. Thanks in advance.
Edit 1 :
We are only using one email address per email and this is our message original.
> Delivered-To: xyz#gmail.com
Received: by 10.36.69.2 with SMTP id y2csp7268660ita;
Mon, 23 Oct 2017 05:57:25 -0700 (PDT)
X-Received: by 10.157.40.142 with SMTP id s14mr7651348ota.123.1508763444992;
Mon, 23 Oct 2017 05:57:24 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1508763444; cv=none;
d=google.com; s=arc-20160816;
b=00GKWt5YJyup/zRaygHJ3YjdXhfUTp24XlsHFbRPJtoN4umiasNg/fhQ59VSR8cu4Q
Z2CLHOVxD9FoNb0UW3+4SJAHyrAaf2ZUnvbh9kUMNenVSNk1zYX2DaumMnaiUI+75eCj
oNzFEV4i5Ja/WQbr8kYziynh6d3oFgX81JqAC9ptphoZ2L3TJt0rxli/77+eNF2c7HSs
YTXDdsd2i8Hmm+aWaYQ/h5u8YABWmkiOFX/6xqAbxcBH65Ye1uLFR1+uWPPfcmzd13GC
KOyRbcbq5WAMBXI14Xuit+llwE9IgSb6dtiFxJ8oYNHZa4GBsv2HzaTiRrZeoc41rNEK
qWHA==ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed d=google.com; s=arc-20160816;
h=to:subject:message-id:date:mime-version:from:dkim-signature
:arc-authentication-results;
bh=TRygSnH7m96UEJAVfmK31uQcIqHJNyzan4DHUUOb9L0=;
b=HANggRPcRICCeKYpqmsbnYKcsMi8esLWFTf5tPLV8dXcXeLudPJtxPr2nOT5KK8ezt
Orgm6voF+si5jYJInKwLDmCpFrY9jogQQP39yknN9H0SqPH+awtn0HT4dvoeq9Wnr3Sq
dGPfQbqtYyT7T8ISDuT5rsjB2zI61Md8eWOCRO/dbfv+lovyYbfUbwoVG73LhSv4hGeX
2Nk0Lki/4DesnLk98wdUbwchY6Y78Trns1+tfi7awSClXlaobje2K4hz7i1y96R+9kpn
0yYGfTLtlCc65QfsKXJnSF42kZ32HlttuBQRjb5W6ua8gEBCCffxydD/v4cQ3e8iVSaT
UPWw==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=#gmail.com header.s=20161025 header.b=GLxhRGM2;
spf=pass (google.com: domain of xyz#gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=xyz#gmail.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Return-Path: <xyz#gmail.com>
Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65])
by mx.google.com with SMTPS id j196sor1073671oib.38.2017.10.23.05.57.24
for <xyz#gmail.com>
(Google Transport Security);
Mon, 23 Oct 2017 05:57:24 -0700 (PDT)
Received-SPF: pass (google.com: domain of xyz#gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65;
Authentication-Results: mx.google.com;
dkim=pass header.i=#gmail.com header.s=20161025 header.b=GLxhRGM2;
spf=pass (google.com: domain of xyz#gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=xyz#gmail.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20161025;
h=from:mime-version:date:message-id:subject:to;
bh=TRygSnH7m96UEJAVfmK31uQcIqHJNyzan4DHUUOb9L0=;
b=GLxhRGM2PoE2cV4Kv157dJ1SiFzqBCvjV9ksWGdO+3fm+NluMUY5qZ2XeDWsfxEqCV
AarV0FEoPqFEUkeDUpiwwz6FYRlPcqYGX91CQLyitB4QE4FHSzseiPFI8S21xXdqUn8X
wLnNW9k1fPs1y07d8OMP6CKmu5Cf3t2vbCieNj2/Btg4Ga3rDTpKo+LPdbyM0Oddr7ZZ
28W/iX/w3Q23fXZHhnpV5KKUab84df3fjSq5Vh/7WccUeAHIfudJQyn71xwjbpXGRxP+
iIILNOY6OR3lymHWXUki7FADK5/CREGfuKQJO0axZ/EUHYH942TAW/q74G3lGHNb5Dmq
4eqQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:mime-version:date:message-id:subject:to;
bh=TRygSnH7m96UEJAVfmK31uQcIqHJNyzan4DHUUOb9L0=;
b=ThGC7Ye92WeBnpv88tssmK3jxoTh75t0TE0YSwIe7neSPQ9nkd02LfUy2E2I5DYYJl
Yu03UIUCnEyCECDx2N1chki4ifgXBMIXT2MNaN/V3dveaLEc3C8jyF3loTvTSFC63Sv/
fxsQgBQNmtH/RqkxG+c1rFGjclTdvmTaERHB2IiAuVzuEyAXaeFS6pippckq8W4CkfMb
VLawraTAdqKvgfCUEe7O6AdPhsaCSkWNgrBhigIXaVOSEnVAnywNeGxOzxZ6iK/vdUAT
bTJQTap/OL80gGk8or8MMuKDg1wNhv2PWyCUG/OASdY0FELNmj9gkcyeGJMmNBtLVfUy
3fPA==
X-Gm-Message-State: AMCzsaUOyy2JRzefxuZ+o3ROgrkTqFWfyu7Ox69vaaKaM19XX0T+88Th qGn9LmtYLTmLeVaaakvk3IeYDENzVWdRJwFw0BM=
X-Google-Smtp-Source: ABhQp+TqkpdDhP6uWvv5qUap3QIYchZYDradVOJSJlPXHTlHNnZBUXUQ7vdOdo5XThqLprbv/VlFJANYzjGyQg+QpAo=
X-Received: by 10.202.90.3 with SMTP id o3mr6602265oib.27.1508763444353; Mon, 23 Oct 2017 05:57:24 -0700 (PDT)
Received: from 385619130527 named unknown by gmailapi.google.com with HTTPREST; Mon, 23 Oct 2017 05:57:23 -0700
From: XYZ <XYZ#gmail.com>
MIME-Version: 1.0
Date: Mon, 23 Oct 2017 05:57:23 -0700
Message-ID: <CALB+=oPhh7AmZJSyimZXZb38SwNAD7eMFioUFv6GmZzdcWrU9A#mail.gmail.com>
Subject: Important Game
To: xyz#gmail.com
Content-Type: multipart/alternative; boundary="001a113d5edc26a056055c365d7e"
--001a113d5edc26a056055c365d7e
Content-Type: text/plain; charset="UTF-8"

openDMARC Authentication Result: fail

I have problem with opendmarc and gmail (gmail put mails from my servers to spam).
I read many forums and topics but anywhere I can't find solutions for my problem.
If I try mail-tester.com I have 10/10 but gmail still accept my mails.
If I check mail There is:
Authentication-Results: mx.google.com;
dkim=pass header.i=#mydomain.com;
dkim=pass header.i=#mydomain.com;
spf=pass (google.com: domain of madaraszko#mydomain.com designates 11.22.33.44 as permitted sender) smtp.mailfrom=madaraszko#mydomain.com;
dmarc=pass (p=QUARANTINE dis=NONE) header.from=mydomain.com
Received: by mail.mydomain.com (Postfix, from userid 111)
id A4F4160598; Thu, 28 Apr 2016 10:29:48 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mydomain.com; s=mail;
t=1461832188; bh=8fggacpyUWh5Kr8oMgY87yEuuCmYt5ETnFZxhdP9YIE=;
h=From:Subject:Date:References:To:From;
b=B24WlYMHGLqC8d+B5MnBByWUg+zkKqfRSiiRP0pahD5bHGvNCOFCpBkWlklu8pjmJ
oKyShimi91qFf7IcPrvkP4UCAB0KPTR+LX3n4S7pV54JIKXr7hkLQENqsgWiE9CjlU
ijd7JXTp0FZH0SKSh1Un24Pv4bPKl0j10j4OG6A4=
Received: from [10.238.2.155] (mail.otherdomain.com [44.55.66.77])
by mail.mydomain.com (Postfix) with ESMTPSA id 7FCFC60555
for <xxxx#gmail.com>; Thu, 28 Apr 2016 10:29:46 +0200 (CEST)
Authentication-Results: mydomain.com; dmarc=fail header.from=mydomain.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mydomain.com; s=mail;
t=1461832186; bh=8fggacpyUWh5Kr8oMgY87yEuuCmYt5ETnFZxhdP9YIE=;
h=From:Subject:Date:References:To:From;
b=acvw+r2aUiHroR6h/D+NzgRnRWFeci84Vot+gcQJ5vfom2y13QH/3P9mvkUCq230H
sPBDR0Ov3B6b0vz12MUgCXO/lqRGKpKWKWTE+5Z0VY5a6EUrwNo1Rr8Q5EO5Ymjhkf
5Z3SgXHsUUjBeiwuI0AlEa646PMjRgqwqE4skp+U=
in my log on the mail server is
Apr 28 10:34:52 mail opendmarc[23264]: implicit authentication service: mydomain.com
Apr 28 10:34:52 mail opendmarc[23264]: 33EE560555: mydomain.com fail
My opendmarc.conf
AuthservID mydomain.com
PidFile /var/run/opendmarc.pid #Debian default
RejectFailures false
Syslog true
TrustedAuthservIDs mydomain.com
UMask 0002
UserID opendmarc:opendmarc
IgnoreHosts /etc/opendmarc/ignore.hosts
HistoryFile /var/run/opendmarc/opendmarc.dat
File ignore.hosts
localhost
What should I check or change?
I have postfix dovecot spamassasin opendkim and opendmarc
Thanks for help.
Adding
IgnoreAuthenticatedClients true
to the opendmarc.conf did help me. I also have all local IPs (IPv4+IPv6 range and ::1) in my ignore.hosts file, but that didn't help.

Use dkim in phpmailer code with privacy key

I am using PHPMailer.
I added DKIM attributes when sending file.
The code is like:
// $mail is PHPMailer class
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Host = "*******";
$mail->Port = ***;
$mail->Mailer= "SMTP";
//...
$mail->DKIM_domain = 'mydomain.com';
$mail->DKIM_identity = '#mydomain.com';
$mail->DKIM_private = __DIR__ . '/privacy_key_mydomain.txt';
$mail->DKIM_selector = 'default';
$mail->DKIM_passphrase = ''; // only ssl.
//...
(Same as example on: Send mail in phpmailer using DKIM Keys)
When sending to email, such as mine (gmail), I have no problem, and I see that my email is signed by mydomain.com.
I see also, in the email source that DKIM-Signature is sent.
Nevertheless, some of my clients I am sending emails reject my email, with following message (especially for yahoo emails - more that 90% of rejects uses yahoo for their emails).
554 Message not allowed - Headers are not RFC compliant[291]
As I did some workaround, I found this message to be detected as a spam.
I am using CPANEL for my site, which has round-cube - so I test it at round-cube (sending the customer a message with round-cube) - seems OK. No spam detect.
So, I suspect the privacy key file may be incorrect (I have an SSL site - so I use the same privacy key as my own site).
What may be wrong? What shall I check out in order to avoid my emails will be detected as spams?
Here is the email source result:
Delivered-To: myaccount#gmail.com
Received: by 10.114.75.12 with SMTP id y12csp118366ldv;
Tue, 15 Jul 2014 11:44:11 -0700 (PDT)
X-Received: by 10.140.104.49 with SMTP id z46mr36090427qge.74.1405449850437;
Tue, 15 Jul 2014 11:44:10 -0700 (PDT)
Return-Path: <support#mydomain.com>
Received: from lin9.maindomain10.net (lin9.maindomain10.net. [1.2.3.4])
by mx.google.com with ESMTPS id t14si21957304qac.66.2014.07.15.11.44.09
for <myaccount#gmail.com>
(version=TLSv1 cipher=RC4-SHA bits=128/128);
Tue, 15 Jul 2014 11:44:10 -0700 (PDT)
Received-SPF: pass (google.com: domain of support#mydomain.com designates 1.2.3.4 as permitted sender) client-ip=1.2.3.4;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of support#mydomain.com designates 1.2.3.4 as permitted sender) smtp.mail=support#mydomain.com;
dkim=pass header.i=#mydomain.com
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mydomain.com; s=default;
h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Subject:Reply-To:From:To:Date:Subject:To; bh=HBLjhR1eb0w5FQ9aVj60Gu0x3jP9XWQ7LQkpzTRHjfQ=;
b=ECWMCs3iPsjuvlT473K9u3skwyNRVunmnv3p440Nk2ZJVrbuWoO0vgzaWM8gjCC503ADKivdfrrOek8TgTSEI7G4B3WMCHI50PWq68W5rcscYJqErWxuqAVcSl4r5tomk88AYPhHiotCugmRTjwQ2K/JBtHsAvMhTlVQMMXsMl0=;
Received: from mainuser by lin9.maindomain10.net with local (Exim 4.82)
(envelope-from <support#mydomain.com>)
id 1X77hp-0001f9-SH; Tue, 15 Jul 2014 14:44:01 -0400
To: myName Mizrahi <myaccount#gmail.com>
Subject: Statistics from Sample Name site
Date: Tue, 15 Jul 2014 14:44:01 -0400
To: myName Mizrahi <myaccount#gmail.com>
From: "donotreply#mydomain.com" <root#localhost>
Reply-To: Sample Name site <donotreply#mydomain.com>
Subject: Statistics from Sample Name site
Message-ID: <d984a2c6308ef2a97cf6ccfe6292263a#mydomain.com>
X-Priority: 3
X-Mailer: PHPMailer 5.2.4 (http://code.google.com/a/apache-extras.org/p/phpmailer/)
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/html; charset=UTF-8
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - lin9.maindomain10.net
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [927 895] / [47 12]
X-AntiAbuse: Sender Address Domain - mydomain.com
X-Get-Message-Sender-Via: lin9.maindomain10.net: authenticated_id: mainuser/sender_address_domain
When sending message from round-cube, the email source look like this:
Delivered-To: myaccount#gmail.com
Received: by 10.114.75.12 with SMTP id y12csp118605ldv;
Tue, 15 Jul 2014 11:48:53 -0700 (PDT)
X-Received: by 10.224.161.129 with SMTP id r1mr34110372qax.86.1405450132678;
Tue, 15 Jul 2014 11:48:52 -0700 (PDT)
Return-Path: <support#mydomain.com>
Received: from lin9.maindomain10.net (lin9.maindomain10.net. [1.2.3.4])
by mx.google.com with ESMTPS id x8si13226659qas.81.2014.07.15.11.48.52
for <myaccount#gmail.com>
(version=TLSv1 cipher=RC4-SHA bits=128/128);
Tue, 15 Jul 2014 11:48:52 -0700 (PDT)
Received-SPF: pass (google.com: domain of support#mydomain.com designates 1.2.3.4 as permitted sender) client-ip=1.2.3.4;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of support#mydomain.com designates 1.2.3.4 as permitted sender) smtp.mail=support#mydomain.com;
dkim=pass header.i=#mydomain.com
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mydomain.com; s=default;
h=Message-ID:Subject:To:From:Date:Content-Transfer-Encoding:Content-Type:MIME-Version; bh=Bynm51C7RZD/vZ81iEMKjxxLoAJtSmKFcwU/eyFzPs8=;
b=fUX+UKS9Ua0HK35AOBRBJbmqTEuKscCYAsPyxs3If3dhhvb/AvAjl1gR9Rz9AN0EX0mu275wtaN5Y1JWP+8w8VcGebJ9FEWsltCl9nwqL6bos/eEqJxTWjDG6ch9MHo3G0mSE326Pyc13JWa59InSgJyWi8MSstT1POfuEhfe28=;
Received: from localhost.localdomain ([127.0.0.1]:54911 helo=mydomain.com)
by lin9.maindomain10.net with esmtpa (Exim 4.82)
(envelope-from <support#mydomain.com>)
id 1X77mO-0001l7-1O
for myaccount#gmail.com; Tue, 15 Jul 2014 14:48:44 -0400
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
format=flowed
Content-Transfer-Encoding: 7bit
Date: Tue, 15 Jul 2014 14:48:43 -0400
From: support#mydomain.com
To: myaccount#gmail.com
Subject: test
Message-ID: <ed6307c2c9504e8ba9ec21f073d5f863#mydomain.com>
X-Sender: support#mydomain.com
User-Agent: Roundcube Webmail/0.9.5
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - lin9.maindomain10.net
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - mydomain.com
X-Get-Message-Sender-Via: lin9.maindomain10.net: authenticated_id: support#mydomain.com
Round-Cube works with no spam.
What is the main difference that's make the issue?
Thanks :)
5.2.4 is pretty old and buggy - You need to update to the latest PHPMailer from GitHub.

node.js express cluster and high CPU usage

My node.js app uses express, socket.io and talks to mongodb through mongoose. All these are working fine with low cpu usage.
When I made the app run with cluster, it works fine, but the CPU usage really goes very high. Here is what i am doing.
var settings = require("./settings"),
cluster = require('cluster');
cluster('./server')
.use(cluster.logger('logs'))
.use(cluster.stats())
.use(cluster.pidfiles('pids'))
.use(cluster.cli())
.use(cluster.repl(8888))
.listen(7777);
When I check the master.log, I see
[Fri, 21 Oct 2011 02:59:51 GMT] INFO master started
[Fri, 21 Oct 2011 02:59:53 GMT] ERROR worker 0 died
[Fri, 21 Oct 2011 02:59:53 GMT] INFO spawned worker 0
[Fri, 21 Oct 2011 02:59:54 GMT] ERROR worker 0 died
[Fri, 21 Oct 2011 02:59:54 GMT] INFO spawned worker 0
[Fri, 21 Oct 2011 02:59:56 GMT] ERROR worker 0 died
[Fri, 21 Oct 2011 02:59:56 GMT] INFO spawned worker 0
.....
[Fri, 21 Oct 2011 03:11:08 GMT] INFO spawned worker 0
[Fri, 21 Oct 2011 03:11:10 GMT] WARNING shutting down master
[Fri, 21 Oct 2011 03:12:07 GMT] INFO spawned worker 0
[Fri, 21 Oct 2011 03:12:07 GMT] INFO spawned worker 1
[Fri, 21 Oct 2011 03:12:07 GMT] INFO master started
[Fri, 21 Oct 2011 03:12:09 GMT] ERROR worker 1 died
[Fri, 21 Oct 2011 03:12:09 GMT] INFO spawned worker 1
[Fri, 21 Oct 2011 03:12:10 GMT] ERROR worker 1 died
[Fri, 21 Oct 2011 03:12:10 GMT] INFO spawned worker 1
In workers.access.log, I see all console messages, socket.io logs etc...
In workers.error.log, I see the following error messages, looks like something wrong...
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: EADDRINUSE, Address already in use
at HTTPServer._doListen (net.js:1106:5)
at net.js:1077:14
at Object.lookup (dns.js:153:45)
at HTTPServer.listen (net.js:1071:20)
at Object.<anonymous> (/cygdrive/c/HTML5/RENT/test/server/server.js:703:5)
at Module._compile (module.js:402:26)
at Object..js (module.js:408:10)
at Module.load (module.js:334:31)
at Function._load (module.js:293:12)
at require (module.js:346:19)
server.js:703 - points to app.listen(9999);
EDIT: server.js code
var express = require("express"),
fs = require("fs"),
form = require('connect-form'),
app = module.exports = express.createServer(
form({ keepExtensions: true })
),
sys = require("sys"),
RentModel = require("./rent_schema"),
UserModel = require("./track_schema"),
email = require("./email_connect"),
SubscriptionModel = require("./subscription_schema"),
io = require("socket.io"),
fb = require('facebook-js'),
Twitter = require('./Twitter_Analysis'),
Foursquare = require('./Foursquare_Analysis'),
YQL = require("yql"),
settings = require("./settings");
//
var cluster = require('cluster');
cluster(app)
.use(cluster.logger('logs'))
.use(cluster.stats())
.use(cluster.pidfiles('pids'))
.use(cluster.cli())
.use(cluster.debug())
.use(cluster.repl(settings.ADMIN_PORT))
.listen(settings.PORT);
socket = io.listen(app);
.....
.....
//app.listen(settings.PORT);
It looks like you're trying to bind your workers with the same port, that is crashing the workers, but cluster is restarting the workers. So you're in an infinite death cycle.
I'm not sure if you need the app.listen(9999) in your server.js file, which is probably trying to bind port 9999 in all your workers. See the examples in the cluster package for a good example: https://github.com/LearnBoost/cluster/blob/master/examples/express.js

Resources