Autoreply RULE will hit spam?

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
kdiamond
Normal user
Normal user
Posts: 94
Joined: 2013-03-20 10:51

Autoreply RULE will hit spam?

Post by kdiamond » 2015-02-01 02:38

Hi.

Default Autoreply works good, but only once per user. I would need it to always reply, no matter what. I have created a rule that works, but (unlike emails sent from this account) it will always hit Google SPAM.
Thank you very much for help!


Using Rule, there seems to be few differences in email.

1.
Return-Path: <join@globevoices.com>
Return-Path: <>

2.
Received-SPF: pass (google.com: domain of join@globevoices.com designates 93.103.7.218 as permitted sender) client-ip=93.103.7.218;
Received-SPF: fail (google.com: domain of dbstudio.si does not designate 93.103.7.218 as permitted sender) client-ip=93.103.7.218;

Here are the message sources from both email.

Email sent from the account. Works great!

Code: Select all

Delivered-To: dali.sternisa@gmail.com
Received: by 10.50.41.164 with SMTP id g4csp1479376igl;
        Sat, 31 Jan 2015 16:18:43 -0800 (PST)
X-Received: by 10.194.87.100 with SMTP id w4mr28445245wjz.65.1422749922398;
        Sat, 31 Jan 2015 16:18:42 -0800 (PST)
Return-Path: <join@globevoices.com>
Received: from dbstudio.si (globevoices.com. [93.103.7.218])
        by mx.google.com with SMTP id j10si17841239wib.46.2015.01.31.16.18.41
        for <dali.sternisa@gmail.com>;
        Sat, 31 Jan 2015 16:18:42 -0800 (PST)
Received-SPF: pass (google.com: domain of join@globevoices.com designates 93.103.7.218 as permitted sender) client-ip=93.103.7.218;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of join@globevoices.com designates 93.103.7.218 as permitted sender) smtp.mail=join@globevoices.com;
       dkim=pass header.i=@globevoices.com;
       dmarc=pass (p=QUARANTINE dis=NONE) header.from=globevoices.com
dkim-signature: v=1; a=rsa-sha1; d=globevoices.com; s=mail;
	c=relaxed/simple; q=dns/txt; h=From:Subject:Date:Message-ID:To:MIME-Version:Content-Type;
	bh=OSvNP3iJ2tj+kyA6hkbHjpT6pHA=;
	b=JBBAPaeYg6+6LbK8jI/+9D+QvhUE8+j5hl3omCVvDyJhX9TKeUHNlbhBBZclX2akyWgvXbtQFl86UvrWGt5Vr74yRIP9dlB00EqCYYS7athCnIf0bdFqEd1+Xr9CmTn7z1xRCbwVuNAC3b4a0nU8jCCzVRNsjib2GKhSrCwobKE=
Received: from mail.globevoices.com (localhost [127.0.0.1])
	by dbstudio.si
	; Sun, 1 Feb 2015 01:18:41 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="=_2b88f06f55449c0cec1dc9d52074f526"
Date: Sun, 01 Feb 2015 01:18:40 +0100
From: join@globevoices.com
To: dali.sternisa@gmail.com
Subject: dsadsa
Message-ID: <bfb9cb45f3d9f1a92617a003f3455c60@globevoices.com>
X-Sender: join@globevoices.com
User-Agent: Roundcube Webmail/1.0.1

--=_2b88f06f55449c0cec1dc9d52074f526
Content-Transfer-Encoding: 7bit
Content-Type: text/plain

 

dsadasdsada 
 
--=_2b88f06f55449c0cec1dc9d52074f526
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style=3D'font-size: 10pt'>
<p>dsadasdsada</p>
<div>&nbsp;</div>
</body></html>

--=_2b88f06f55449c0cec1dc9d52074f526--
Email replied by the RULE. Hits Google spam!

Code: Select all

Delivered-To: dali.sternisa@gmail.com
Received: by 10.50.41.164 with SMTP id g4csp1480947igl;
        Sat, 31 Jan 2015 16:24:45 -0800 (PST)
X-Received: by 10.180.99.42 with SMTP id en10mr456243wib.26.1422750285263;
        Sat, 31 Jan 2015 16:24:45 -0800 (PST)
Return-Path: <>
Received: from dbstudio.si (globevoices.com. [93.103.7.218])
        by mx.google.com with SMTP id r1si17852239wib.50.2015.01.31.16.24.44
        for <dali.sternisa@gmail.com>;
        Sat, 31 Jan 2015 16:24:45 -0800 (PST)
Received-SPF: fail (google.com: domain of dbstudio.si does not designate 93.103.7.218 as permitted sender) client-ip=93.103.7.218;
Authentication-Results: mx.google.com;
       spf=fail (google.com: domain of dbstudio.si does not designate 93.103.7.218 as permitted sender) smtp.mail=;
       dmarc=fail (p=QUARANTINE dis=QUARANTINE) header.from=globevoices.com
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Return-Path: <>
Message-ID: <FDA67F8E-9E9C-4109-AE25-8DA759603A34@dbstudio.si>
To: dali.sternisa@gmail.com
From: join@globevoices.com <join@globevoices.com>
Subject: Join Globevoices.com
Content-Transfer-Encoding: quoted-printable
Date: Sun, 1 Feb 2015 01:23:45 +0100
Auto-Submitted: auto-replied
X-hMailServer-LoopCount: 1

Website globevoices.com / dbstudio.si  is under development. We will contact you as soon we setup the submit system. Thank you for your patience.

GV Team.

User avatar
mattg
Moderator
Moderator
Posts: 21256
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Autoreply RULE will hit spam?

Post by mattg » 2015-02-01 03:06

Which version of hMailserver?

Recently changes were made to replies and forwards which may impact on this.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

kdiamond
Normal user
Normal user
Posts: 94
Joined: 2013-03-20 10:51

Re: Autoreply RULE will hit spam?

Post by kdiamond » 2015-02-01 10:13

Which version of hMailserver?

Recently changes were made to replies and forwards which may impact on this.
Thank you for reply Mattg. I had 5.4 and yesterday updated to latest 5.6 - Build 2145. Same thing.

Would it be possible to let default autoreply not to reply just once per user? Or to edit loop count number manually, with default setting to 1 (as it is now). That user could decide if he wants loop protection or not? I believe that was like in mdeamon.

Thank you for your help.

Br,
kd

User avatar
mattg
Moderator
Moderator
Posts: 21256
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Autoreply RULE will hit spam?

Post by mattg » 2015-02-01 16:54

kdiamond wrote:Would it be possible to let default autoreply not to reply just once per user? Or to edit loop count number manually, with default setting to 1 (as it is now). That user could decide if he wants loop protection or not? I believe that was like in mdeamon.
Not possible in hMailserver

Perhaps you could script a reply...
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

kdiamond
Normal user
Normal user
Posts: 94
Joined: 2013-03-20 10:51

Re: Autoreply RULE will hit spam?

Post by kdiamond » 2015-02-01 18:53

Perhaps you could script a reply...
I wish I would know how to write scripts for HMS? Any tutorials, examples? Why is reply RULE causing it to go to spam?. Is this a bug, or could I try something different?

Br,
kd

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Autoreply RULE will hit spam?

Post by percepts » 2015-02-01 19:58

there is an SPF fail in the mail headers you posted. Now that you have upgraded to 5.6 please can you generate the spam again at post headers again as they may be different.

The changes made in 5.6 were related to only fowarding from an account rule (I think) which is not the same as auto reply.

kdiamond
Normal user
Normal user
Posts: 94
Joined: 2013-03-20 10:51

Re: Autoreply RULE will hit spam?

Post by kdiamond » 2015-02-01 21:18

percepts wrote:there is an SPF fail in the mail headers you posted. Now that you have upgraded to 5.6 please can you generate the spam again at post headers again as they may be different.

The changes made in 5.6 were related to only fowarding from an account rule (I think) which is not the same as auto reply.
1st post was made after the upgrade so those are logs from latest 5.6. It might worth mention I have mulitple domains and I use Bind to local IP address rule for outgoing emails as each domain has own IP address.
bind.jpg
Br,
kd

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Autoreply RULE will hit spam?

Post by percepts » 2015-02-01 22:56

SPF checks use Return-Path which is what should be in the SMTP envelope normally. If gmail is failing you on SPF then its probably because the return-path only contains <>. Why it contains only <> I don't know.

I just sent myself a mail from gmail and used auto reply from the receiving account and it wen to gmail no problems. The return-path on my auto reply conatins my account address.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Autoreply RULE will hit spam?

Post by percepts » 2015-02-01 23:01

OK I just checked and your SPF records for dbstudio.si do not include IP 93.103.7.218 which is where the mail was sent from which is why the SPF is failing(I think). They start at 93.103.7.222. A typo in your setup perhaps.

The mail may originally have been from globevoices.com which does have that IP in its spf but the auto reply isn't from them, its from dbstudio.si so I would modify your spf to start at 93.103.7.218
Last edited by percepts on 2015-02-01 23:06, edited 1 time in total.

kdiamond
Normal user
Normal user
Posts: 94
Joined: 2013-03-20 10:51

Re: Autoreply RULE will hit spam?

Post by kdiamond » 2015-02-01 23:04

Yes, using the RULE the Return-Path is missing. The question is the why?

Can I force it with RULE Set header value somehow? I tried but it did not worked.

Thank you for helping me out.

Br,
kd

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Autoreply RULE will hit spam?

Post by percepts » 2015-02-01 23:08

in com api you can set "fromAddress" to a value, save and then it should contain something.

Note: From is informational and not in the smtp envelope. FromAddres is in the smtp envelope.

I don't think setting Return-Path directly in the rule will work as it will just a second one below the null one. You will need to run a function to do it I think.

But also fix your spf which should sort spf fail at gmail.
Last edited by percepts on 2015-02-01 23:12, edited 1 time in total.

kdiamond
Normal user
Normal user
Posts: 94
Joined: 2013-03-20 10:51

Re: Autoreply RULE will hit spam?

Post by kdiamond » 2015-02-01 23:11

percepts wrote:OK I just checked and your SPF records for dbstudio.si do not include IP 93.103.7.218 which is where the mail was sent from which is why the SPF is failing(I think). They start at 93.103.7.222. A typo in your setup perhaps.
I have more domains. I'm using bind to local ip rule, so that outgoing email are sending from correct ip. Please see my previous post, which prevents SPF fail.

dbstudio,si is 93.103.7.218
globevoices.com is 93.103.7.222

It seems as Return path is empty (don't know why), HMS will use one of the domains instead of join@globevoices.com. The strange thing is only RULE will trigger SPF fail. If I sent email from Roundcube through SMPT, everything is great! Also default user Auto-Reply works great, but only once per user, which sadly doesn't work for me.

Br,
Dali

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Autoreply RULE will hit spam?

Post by percepts » 2015-02-01 23:17

yes but following line says spf fail for dbstudio.si at 93.103.7.218 which is correct because the spf for dbstudio.si doesn't contain that IP.
That is how you have configured it. If you don't change your spf or the IP you are binding to then it will always fail gmail SPF check and goto spam.
Received-SPF: fail (google.com: domain of dbstudio.si does not designate 93.103.7.218 as permitted sender) client-ip=93.103.7.218;

kdiamond
Normal user
Normal user
Posts: 94
Joined: 2013-03-20 10:51

Re: Autoreply RULE will hit spam?

Post by kdiamond » 2015-02-01 23:22

percepts wrote:yes but following line says spf fail for dbstudio.si at 93.103.7.218 which is correct because the spf for dbstudio.si doesn't contain that IP.
That is how you have configured it. If you don't change your spf or the IP you are binding to then it will always fail gmail SPF check and goto spam.
Received-SPF: fail (google.com: domain of dbstudio.si does not designate 93.103.7.218 as permitted sender) client-ip=93.103.7.218;
I know. But only RULE will say dbstudio.si for SPF. Mail send from same account (Roundcube) or even default user Auto reply will not say dbstudio.si, but join@globevoices.com, which passes SPF. You see the problem. I don't know where RULE is pulling dbstudio.si from at all.

Thank you
Br,
kd

kdiamond
Normal user
Normal user
Posts: 94
Joined: 2013-03-20 10:51

Re: Autoreply RULE will hit spam?

Post by kdiamond » 2015-02-01 23:26

Aha, I guess if Return-Path is empty (dont know why?) RULE will use SMTP default local host name which is set to dbstudio.si currently.
lhost.jpg
lhost.jpg (20.84 KiB) Viewed 7941 times

kdiamond
Normal user
Normal user
Posts: 94
Joined: 2013-03-20 10:51

Re: Autoreply RULE will hit spam?

Post by kdiamond » 2015-02-01 23:36

Yes, as I have changed SMTP Local host name from dbstudio.si to Globevoices.com SPF works and everything is fine. But now rules from other domains will trigger SPF fail so it's not very good solution.
I guess there should be another rule like "Change SMTP host name" similar to "Bind to local IP"

But the REAL question still remains. Why is the Return-path: <> empty? It should include user email (in my case join@globevoices.com. not local SMPT local host name). I guess USER reply RULE, should be different than SERVER Reply Rule, as User Reply Rule CAN know about user email, SERVER Reply Rule can not.

Br,
kd
Last edited by kdiamond on 2015-02-01 23:43, edited 1 time in total.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Autoreply RULE will hit spam?

Post by percepts » 2015-02-01 23:41

OR make your rule call a function which puts the correct address into FromAddress.

kdiamond
Normal user
Normal user
Posts: 94
Joined: 2013-03-20 10:51

Re: Autoreply RULE will hit spam?

Post by kdiamond » 2015-02-01 23:45

percepts wrote:OR make your rule call a function which puts the correct address into FromAddress.
I wish I knew how to do that :cry:

Please see the previous post updated.

Thank you!

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Autoreply RULE will hit spam?

Post by percepts » 2015-02-02 01:14

kdiamond wrote: If I sent email from Roundcube through SMPT, everything is great! Also default user Auto-Reply works great, but only once per user, which sadly doesn't work for me.
Roundcube is an email client and works different from hmail. Whether it should work the same is a moot point, especially since I did a test and it works OK for me.

You do realise the potential affect of using a rule to reply don't you?
Be warned that if two servers accounts both have auto reply imlemented in the manner you are proposing, you could be sending each other mail at an alarming rate if you haven't coded to stop that from happening.
That is precisely the reason why the built in auto reply only auto replies to a sender once during a single hmailserver service load. The auto reply is cached so hmail knows not to do it again.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Autoreply RULE will hit spam?

Post by percepts » 2015-02-02 01:21

I lied, I tested auto reply above. I just tested using a rule with Reply action and my reply to gmail has <> in Return-path just like yours does.

I suspect that this may have been done to stop mail looping as described in my message immediately above but not 100% sure about that.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Autoreply RULE will hit spam?

Post by percepts » 2015-02-02 01:30

There was following option added to hmailserver.ini in an experimental build of hmail a while back.
;AutoReplyReturnPath=<>
; Override default autoreply "FROM". Example is for null return. <> are only required for null otherwise not needed.
; Default is use recipient's email address
I assume this was added for auto reply functionality to stop mail looping if it occured based in From as opposed to FromAddress.

Reply action from a rule seems to do it always but on FromAddress. Again I suspect it is to stop mail looping but you would need Martin to comment on this to be sure unless Matt or Soren know.

Post Reply