Roundcube Community Forum

Miscellaneous => Roundcube Discussion => Topic started by: ozbahceliler on April 09, 2015, 11:11:38 AM

Title: SPF Problem
Post by: ozbahceliler on April 09, 2015, 11:11:38 AM
Hello,

I have a weird problem, it could be my mistake. I couldn't figure out what's going on.

If I send an email from Mozilla Thunderbird to anywhere - in this case I will send to GMail- no problem, mail goes directly to inbox. Here's the mail header:

Received-SPF: pass (google.com: domain of [email protected] designates myserverip as permitted sender) client-ip=myiphere;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of [email protected] designates myiphere as permitted sender) [email protected];
       dkim=pass [email protected]
Received: from [192.168.1.69] (hostipipip.range86-148.btcentralplus.com [clientip])
by mail.server.here (Postfix) with ESMTPSA id 11CD637002E7
for <[email protected]>; Thu,  9 Apr 2015 15:46:18 +0100 (BST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=domain.co.uk;


all looks good and works fine.

However, if I send an email using Roundcube my email goes to Junk folder (after adding DKIM, now it goes to inbox but still this is not the point). Here's the mail header when I send the email from Roundcube.

Received-SPF: fail (google.com: domain of [email protected] does not designate 2001:41d0:8:24ff::d7b:**** as permitted sender) client-ip=2001:41d0:8:24ff::d7b:8bb6;
Authentication-Results: mx.google.com;
       spf=fail (google.com: domain of [email protected] does not designate 2001:41d0:8:24ff::d7b:**** as permitted sender) [email protected];
       dkim=pass [email protected]
Received: from webmail.domain.co.uk (mail.domain.co.uk [myserveriphere])
by mail.domain.co.uk (Postfix) with ESMTPSA id 487EE37002E5
for <[email protected]>; Thu,  9 Apr 2015 16:02:30 +0100 (BST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=domain.co.uk;


OK, the only thing I can understand for some reason SPF record becoming IPv6 and it can't resolve the record. I tried to google the problem and I've found few people had a similar issue but couldn't find a solution. I'm sure I'm missing a configuration. Can you please help me to resolve this issue?

Best Regards,
Omur
Title: Re: SPF Problem
Post by: SKaero on April 09, 2015, 11:20:40 AM
Make sure you have Roundcube setup to use SMTP.
Title: Re: SPF Problem
Post by: ozbahceliler on April 09, 2015, 11:35:20 AM
I think I am using SMTP,

is this incorrect?

$config['smtp_server'] = 'ssl://mail.domain.co.uk';

// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
// deprecated SSL over SMTP (aka SMTPS))
$config['smtp_port'] = 465;

// SMTP username (if required) if you use %u as the username Roundcube
// will use the current username for login
$config['smtp_user'] = '%u';

// SMTP password (if required) if you use %p as the password Roundcube
// will use the current user's password for login
$config['smtp_pass'] = '%p';

// provide an URL where a user can get support for this Roundcube installation
// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
$config['support_url'] = '';

// this key is used to encrypt the users imap password which is stored
// in the session record (and the client cookie if remember password is enabled).
// please provide a string of exactly 24 chars.
$config['des_key'] = '000000000000000';

// Name your service. This is displayed on the login screen and in the window title
$config['product_name'] = 'Ozbahceliler Webmail';

// ----------------------------------
Title: Re: SPF Problem
Post by: ozbahceliler on April 09, 2015, 12:05:38 PM
OK,

I managed to solve it by adding IPv6 to my SPF record. Now my SPF looks like this

v=spf1 ip4:***.***.139.223 ip6:2001:41d0:8:24ff::d7b:**** mx -all

I hope that would be useful for someone :)

Regards
Omur